This would not recover the time lost while creating the patch but at least it would prevent it from passing through the builds without a proper ticket state. You can write a post-checkout hook for Git in a way that it parses your branch name and if that contains a Jira id, calls your custom Jira command to manage states.Īs a complementary step, you can install a hook on your code review system that would reject the patch if the ticket is not in in-progress state. This solution assumes you start working by telling it Jira first. In that case, we would want to resolve the ticket when the last chunk is merged. Why don’t we immediately close the ticket ? Because it is quite common to make small checkins in order to keep changes in small, easily reviewable chunks. One approach is to resolve the ticket if it contains a certain keyword ONLY WHEN it is merged to the branch. The client normally caches the session locally. In the example I entered password multiple times, but that was against a demo jira setup. Project: TP user: berk endpoint: custom-commands: - name: begin help: start working on a new ticket options: - name: workspace short: w required: true - name: branch short: b default: "master" args: - name: JIRA_ID required: true script: |- if ! No need to bother people ! No need for micromanagement !įollowing is the custom command begin I have been playing. Creates a local branch with a proper name.Check if workspace exists and ready to create a branch (no uncommitted changes).Now what if we have a custom command that does following: When invoked with -h, tool will display your custom commands as well. Installation is just copying a single binary.īut more importantly, this tool allows you to write your own custom commands with arbitary parameters and options together with help. Since it is a static Go binary, you don’t have to mess with tons of dependencies and their package managers like in some other languages and you don’t have to be careful for not to break any dependency. It allows you to use pretty much every part of the JIRA Rest API. This is a Jira command line client written in Go. This is easily possible with the help of awesome Jira client go-jira by Netflix-Skunkworks What if we automate this flow, while implicitly doing the boring Jira work ? This is a pretty much standard and reasonable flow. Creates a local branch to work on that ticket.Checks out what ticket needs to be done.Saves existing changes to stash or commits them.What does a developer typically do nowadays to start working on a new ticket ? This is a problem that needs to be solved automatically. Also you can not fix this problem by nagging people all the time. Most developers do not care about JIRA because it is mostly useless burden for them.
0 Comments
Leave a Reply. |