#150 open
Tekkub

Call webhooks when an annotated tag is pushed

Reported by Tekkub | April 8th, 2008 @ 06:29 PM

When an annotated tag is pushed, please call the webhook and pass the tag name, message, timestamp, etc and the ref it points to.

Anno-tags will respond to `git cat-file -t ` as "tag", whereas a branch or non-anno tag responds as "commit"

IRC log (in case you forgetted):

<Tekkub> hey defunkt, are the webhooks only called for commit pushes?  I want to catch when a tag is pushed and it doesn't appear to get called
<defunkt> they're called on post-receive
<Tekkub> but doesn't that get called on any push that contains something?  even if it's just a new branch/tag pointing at an existing commit
* schacon has quit (Read error: 110 (Connection timed out))
<defunkt> i'm not sure about the specifics
<defunkt> if post-receive gets called, the webhook gets executed
* jrun (n=jrun@CPE-70-92-138-57.wi.res.rr.com) has joined #github
<defunkt> actually it's possible that we could have missed an edge case
<Tekkub> let me push a branch that points at existing commits and see if it calls my hook
<Tekkub> nope, doesn't appear to
<Tekkub> hrm... interesting... 
<Tekkub> if I make a new branch, so the change is from 0000000 --> someSHA1 I get no hook call
<defunkt> we ignore any 0000000s
<Tekkub> if I make a fast-forward merge on that same branch, the commits are allready there, I get a hook call
* jbunster has quit ()
<Tekkub> new branches and tags are always 0000's to something...
<defunkt> people were pushing mirrors with tons of branches, so we opted to ignore 0000
<defunkt> instead of creating 40 useless post-hooks
<Tekkub> hrm... well okey, a compromise then *grin*
<Tekkub> new branches and non-anno tags are just empty anyway, so screw those
<Eridius> if someone pushes 40 branches, why can't you combine that into one post-hook with the information for all 40 branches?
<Tekkub> but an anno-tag is an object of it's own, not just a dumb pointer, so a hook call when an anno tag is pushed would be nice
<defunkt> Eridius: because so far no one has complained but Tekkub :)
<Eridius> heh
<Tekkub> RAWR COMPLAIN!
<Tekkub> hey, it's what I'm good at
<Tekkub> plus I use anno-tags for releases.. and it'd be super handy to automate the package/release process so all I have to do is push a tag
<defunkt> Tekkub: i'm not entirely sure we can tell if it's a tag on our side
<defunkt> what we get is shabefore shaafter ref
<defunkt> i'd have to look at a tag push and see how it differs
* Eridius has quit (Remote closed the connection)
<Tekkub> yea, I'm not certain how a anno tag push is different
* Eridius (n=eridius@growl/Eridius) has joined #github
<defunkt> Tekkub: automated releases would be hot, tho
<Tekkub> I just know the anno tag contains it's own message, timestamp, etc and a pointer to a commit
<defunkt> Tekkub: if you make a bug for this i can investigate post-launch
<Tekkub> I'm playing with a rails app that catches your hooks
<Tekkub> first prio: commit emails
<Tekkub> second: pushing to a mirror repo
<defunkt> sweet
<Tekkub> third: fun crap with anno tags (if I can)
<Tekkub> the commit emails are the one thing that my boss bitches about with out convertion to git
<defunkt> Tekkub: it's plausible that the "ref" passed on a new tag is somehow special
<defunkt> if so, we could just regexp it and let it pass through
<Tekkub> second is trac, but I think he's going to write a private ticketting system for us
<Eridius> defunkt: you can use `git cat-file -t sha1` to find out the type
<Tekkub> ah there you go :)
<defunkt> can i pass that the repo's path
<Eridius> heh, it only says "tag" if it's an annotated tag
<Eridius> if it's a dumb tag, it says commit (since the tag is really just a handle on the commit)
<Tekkub> yea just "tag"
* timocratic has quit ()
<Eridius> defunkt: what do you mean, the repo's path? you can use the env vars to specify where the .git dir is
<Tekkub> also says "commit" if you use a branch name
* cliffstah has quit (Read error: 104 (Connection reset by peer))
<defunkt> Eridius: that is what i mean
* cliffstah (n=cliffsta@ip68-103-105-64.ks.ok.c...) has joined #github
<Tekkub> so there you are, a 0000 _. something change that comes back as "tag"

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Tags