Thread: git.postgresql.org commit hooks?

git.postgresql.org commit hooks?

From
Craig Ringer
Date:
Hi all

Is it permissible to have on-commit / after-commit hooks added to git.postgresql.org repositories?

I'd like to mirror 2ndQuadrant_bdr.git to GitHub if possible. I'm aware that I can use a cron job, but I'd rather not poll git.postgresql.org if there's a better way.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Re: git.postgresql.org commit hooks?

From
Magnus Hagander
Date:
On Fri, Mar 6, 2015 at 5:50 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
Hi all

Is it permissible to have on-commit / after-commit hooks added to git.postgresql.org repositories?

I'd like to mirror 2ndQuadrant_bdr.git to GitHub if possible. I'm aware that I can use a cron job, but I'd rather not poll git.postgresql.org if there's a better way.


As a general rule, no - we don't want to end up having to maintain and review the result of something like that, and the system is simply not set up to compartmentalize those things enough.

However, there is a generic hook that's there and can be used. This is the hook we use to send commit messages. It also has functionality to "ping" a http url whenever it receives a push. This is what we use to trigger an update of the repository browser on redmine.postgresql.org for example.

Perhaps this ping url could be used to trigger the mirror job for you?

--