Git and jira

2,598 views

Published on

Published in: Technology
1 Comment
1 Like
Statistics
Notes
  • Do these have to be run on the client or can they be run as server-side hooks?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
2,598
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
29
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Git and jira

  1. 1. hebinbin.herokuapp.com
  2. 2. Agile development1. Using Git as software versionmanagement tool2. Using JIRA On Demand as our projectmanagement tool3. Ticket Driven Process. Before you beginto program, create ticket.4. No Ticket, No Commit5. Using Pull Request to do code review.
  3. 3. When you get a ticket with ticket numberlike WEB-1234, normally it belongs to oneof the following two types: feature orbugfix.Since, we use pull request, before writedown code, we need to checkout a newbranch.
  4. 4. We decided our branch name should betype-ticketnumber-destinationbranchex:feature-WEB-1234-1.1bugfix-WEB-2345-2.1
  5. 5. Example:we need to add a new feature to 1.1branch and our ticket number is BB-1234(1) git checkout –b feature-BB-1234-1.1origin/1.1(2) git push –u origin feature-BB-1234-1.1(3) Go to JIRA, change status from Opento In Progress.
  6. 6. (4) Begin to commit the codegit add modified_filegit commit -m “BB-1234: message”At here, we should put ticket number incommit message. The merit is that in the future,if we go back to see commit history, it is easilyto understand why we changed this code.
  7. 7. (5) git push(6) Go to stash/github/bitbucket to open apull request, ask some guys to review yourcode.(7) Go to JIRA to log your worked time.(8) Begin to solve other ticket when waitingfor code review result.
  8. 8. (9) Once you get feedback,you should repeat step (4) to step (8)until you get permission to merge the code.(10) Delete local and remote feature branch.(10) Deploy the code to dev/qa server, Go to JIRA tochange status from In Progress to Ready for Verify(11) Assign ticket to reporter to ask him/her to confirm.
  9. 9. (12) When everything goes well, reporter willclose the ticket. Otherwise, reporter willreopen the ticket and you should repeat step(1) to step(11) again.
  10. 10. 1. Easily forget to log work time.2. Easily forget to change status.3. Easily forget to put ticket number incommit message.4. Easily forget to push branch to remoteserver.
  11. 11. Using git hooks and JIRA rest APIpost-checkout hook:1. Automatically change JIRA ticket statusfrom Open to In progress2. Automatically push local branch toremote server
  12. 12. Prepare-commit-msg hook:1. Automatically get ticket number frombranch name, and put it into commitmessage.
  13. 13. Add worked time in commit message.
  14. 14. Commit-msg hook:1. Check commit message has ticketnumber or not2. Check commit message has right workedtime or not
  15. 15. Post-commit hook:1. Automatically update worked time inJIRA.2. Automatically add branch name andcommit message as comment.
  16. 16. https://github.com/hebinbin/git-hooks-jira
  17. 17. Let us make a world better.

×