Archive for the ‘VCS integration’ Category
Our apologies to those wishing to use the mercurial hook who have been unable to find it. We have restored the hook, and it is now available again by clicking Modules Library in the footer.
A much requested feature in VCS integration is the ability to close issues using the commit message. We have (finally) implemented this, but as usual, have decided to go a little bit further. In The Bug Genie 3.2, you will optionally be able to use your commit message to navigate through the issue’s workflow, using only basic syntax.
So how does this work?
You may have noticed that incoming emails allows you to navigate through the workflow. We work in a near identical fashion. The difference is how the message is structured.
In incoming emails, you use a syntax similar to this:
resolve issue resolution=WONTFIX This is my comment ---
The workflow steps and parameters are all on separate rows.
In VCS integration, we don’t have this luxury so we compact everything together:
Fixes issue 1 (resolve issue: resolution=WONTFIX)
Simply place the workflow step in brackets, and if there are parameters for the step, just place them after a ‘: ‘ delimiter. You can also have multiple parameters:
Fixes issue 1 (resolve issue: resolution=WONTFIX status=kittens)
You may also wish to perform multiple transitions at once, this can be done by using a ‘, ‘ delimiter after the parameters. You don’t have to supply parameters either:
Fixes issue 1 (confirm issue, resolve issue: resolution=WONTFIX, reopen issue)
If a workflow step fails, or if it doesn’t exist, you won’t be notified; so while there is no risk of a mistyped commit breaking the commit process, you may want to double check to see if your workflow step was applied.
Similarly to incoming emails, the workflow steps are just as they are in the toolbar when viewing an issue, so there is little to learn.
If you are eager to try this out, this feature will be appearing in our github repository later today. It will also be included in 3.2 beta 3, along with a working module (it has been broken as a result of the database changes).
Following my previous post, all the proposed changes to VCS Integration have been made, and this means some important changes for you upon the release of The Bug Genie 3.2:
- Upon upgrading, the module will be disabled until you upgrade its database from module config. This will be made clear to you, in the mean time commits can’t be checked in.
- Your hooks will need reconfiguring. We are now using the project key instead of the project ID, so minor changes to your hooks will be necessary. This is simply a matter of replacing a number with a word, project keys are visible in the projects list in configuration. As a note to those who want to try out the latest code from next, due to an unrelated issue, the direct access method (via tbg_cli) still uses ID-based access, even though it says to use the key.
The upgrade process is necessary due to various database changes we have made. The script will import all your old commits, and set the new settings so that they match the previous configuration. You can, afterwards, go through and alter the projects to take advantage of the new features – such as different access methods for different projects.
The script will import all projects which had VCS Integration enabled beforehand to have it on for issue-affecting commits only, all with the same access method and (if using the HTTP method), the same passkey. The URLs for each project will be imported from the old settings.
Testers wanted! If you want to give this a try, feel free to check out the next branch from github and give it a go! There are probably some loose-ends to tie, so please let us know if you find any problems.
What else is new? Naturally, quite a few problems were found in the main code, which were fixed. One of most note to those of you who use the inbuilt scrum support was a bug where anyone can change the scrum colours. This has now been fixed, and only those who have permission to edit issues can have this magical power.
For the next release of The Bug Genie 3, there will be some exciting improvements to the VCS Integration module. Here is a taste of what is up to come!
Improved setup and configuration
Setting up the module is a bit confusing at the moment, with project IDs being used which aren’t really visible, as well as it not being clear where the projects are set up. We will be moving the project-specific parts of VCS Integration to project configuration, allowing the access method and passkey to be set on a per-project basis, as well as improving the configuration so that it is a lot clear what you need to do after typing in the boxes.
Better support for repository browsers
Setting up a repository browser is a bit confusing at the moment, with details split over three boxes, some of which don’t apply in all cases. We will be merging all the boxes into one for each kind of page to be viewed (index page, diff page etc.), with %placeholders% so that it is easier to set up the URLs. This also means that The Bug Genie will support any repository browser under the sun, as long as the fields are inputted correctly.
A lot of users have requested that it should be possible to localise the words which The Bug Genie picks up. The pick-up words will now be user customisable, as well as supporting cases where no word is wanted at all. Picking up of issue mentions will become better too thanks to some new API functions.
Not just commits that apply to issues!
VCS Integration will also (optionally) pick up ALL commits. This means on the project commits page, you can see a list of all commits ever made to the repository (since setting up). This isn’t quite inbuilt repository browsing, but it will help with keeping track of things. This will also mean database changes, but an added bonus is users of Gitorious will be able to have commit boxes displayed on their issue, as data will no longer be stored in the database on the basis of file changes – instead commits.
Hopefully this should give you a taste of what is to come. Along with fixing any bugs (there is one with Git we are meaning to look at), this should help improve this slightly unloved feature of The Bug Genie. Thanks to all who have suggested improvements!
The Bug Genie 3 supports linking the tracker with your github projects, so you can update your issues in The Bug Genie from your github commits. This feature is ready to roll, but we really need it testing before we release, and this is where you come in!
If you would like to test out this great feature, please do and let us know about any issues you experience in your testing. This is how:
- Install The Bug Genie 3 from trunk. (beta 3 will not work)
- Create a project and some issues in it (for testing, remember their issue numbers!)
- Go to the VCS integration configuration page, and choose HTTP mode. You will also need to set a passkey for http access (NOTE: If you use The Bug Genie with other VCS systems, using the direct access method, these will need to be reconfigured to use HTTP access).
- Set the repository type for your project to Github, and enter anything in the URL box. Then enter your project name into the final box.
- In your Github project, set a post-receive hook to point to http://www.your-tbg-installation.com/vcs_integration/report/PROJECTID/github/?passkey=YOURPASSKEY, replacing the hostname, path and passkey as appropriate. The project ID can be found on the project tab of VCS Integration configuration.
- Now you can try it out, using the exact same commit format as normal commits.
If you encounter issues or need help, just drop a line on the bugtracker or the forum and I will give you a hand. Also, please refer to the inbuilt wiki for further details.
Thank you for your help!
The VCS integration module is progressing nicely, and we are now looking for users to contribute modules for their favourite version control systems.
To finalize the module, we need hooks for the following systems:
- Subversion (done)
- Github (in progress)
- Bazaar (in progress)
If you have the time, and are able to write a hook for any of these systems, please write a comment if you want to help out. Hooks for systems which are not listed on the above list are welcomed, though we will not release until the above are supported (maybe excluding CVS).
The hook specification is attached to this post, and if there are errors please let me know. If you are working on a hook, please let me know via a comment (so the above list can be updated), though please note that hooks will need to be licensed under version 1.1 of the MPL.
You will likely want a copy of the module for testing purposes. A branch of The Bug Genie 2.1.0 with the module included (replacing SVN integration) can be found in the /branches/vcs_integration directory in the Subversion repository. Refer to the Sourceforge.net project page for further details. If you find any issues with this, they can be filed in the relevant product on the bugtracker. A test release for translators will be made in the near future.
Thanks for your help!
VCS integration specification (obsolete)