Hacker News new | ask | show | jobs
by yellowsir 3626 days ago
its bad decision making. but to be fair dependency ci will add gitlab and bitbucket in the future. it still sucks that awesome tools like this are github first, git is a central tool and tools arround git should not depend on any hoster at all - imho
1 comments

What alternative decision are you imagining? A service like this can’t depend on Git alone. It needs to know when the repo is updated (e.g. GitHub’s webhooks) and has to publish its results somewhere (e.g. GitHub’s commit statuses). So it only really works with hosted repos.

Since each hosting service has a different API, each integration needs to be built individually. And it makes sense to integrate with GitHub first because it’s the most popular repo host.

Maybe server-side git hooks would do the trick? Can we assume that any "decent" git server will be able to run a bash script? A service could instruct the user to download a couple scripts and put them in .git/hooks. Or just copy and paste a wget command from within the repo root.

https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

> It needs to know when the repo is updated (e.g. GitHub’s webhooks)

post-receive hooks work well for this. I use them to push changes from my laptop up to my server and GitHub (which I use as a free mirror). My server uses a post-receive hook to regenerate a HTML view of the repo.

> has to publish its results somewhere (e.g. GitHub’s commit statuses)

Git has really good email integration.

It's the most popular repo host on HN for sure, but think about all the private repos behind corporate firewalls etc!
Some of which are Github Enterprise :p