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.
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.
We decided our branch name should betype-ticketnumber-destinationbranchex:feature-WEB-1234-1.1bugfix-WEB-2345-2.1
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.
(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.
(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.
(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.
(12) When everything goes well, reporter willclose the ticket. Otherwise, reporter willreopen the ticket and you should repeat step(1) to step(11) again.
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.
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
Prepare-commit-msg hook:1. Automatically get ticket number frombranch name, and put it into commitmessage.