We use Git and Jira in my office. Normally we use the create branch button to just create the branch. I have 2 python files I run, 1 on when a branch is created and 1 when it is merged and subsequently deleted.
My question is: How would I implement this as a hook for when a new branch is created (or first commit of a new branch) and when the branch is deleted? I was thinking that it would go under either update or post-recieve.
#Script
python foo.py --create
python foo.py --delete
Its as simple as that, but im not sure which part of the life cycle it would go in while looking at the different hooks available.
I was reading update.sample, post-update.sample, etc. I saw that in update.sample, there are two sections:
refs/heads/*,delete)
refs/heads/*,commit)
which i was thinking would be the sections i am interested in, given the variables referenced in those sections of code, but I was thinking that this could be a Local Commit / New Branch or Local Delete Branch, which doesnt work. I wanted to do this for like i said, after it occurs on the server.