Reputation: 3056
I am new to writing git hooks. Here's what I'd like to do:
Once a branch XYZ is merged into master (on remote); write a hook that changes the status of a JIRA ticket associated with branch XYZ from "pending approval" to "prod ready".
My research into this so far:
POST
transaction + OAuth API
). post-merge
or
post-receive
git hook to do this. The hook would essentially get the
Branch name (my branch name is enforced to be the same as Jira name)
; and then do a POST using JIRA API to change the status as
mentioned above. My questions:
If so, what githook should I
be using? post-merge
or post-receive
?
Should I be using web hooks or githook?
Can anyone point me to an example to get me started?
Thanks
Upvotes: 2
Views: 1609
Reputation: 3056
Found the answer ...Here's how to do it - for those interested:
https://confluence.atlassian.com/adminjiracloud/configuring-workflow-triggers-776636696.html
Upvotes: 3