2
votes

My client's team lead has asked me to integrate his team's SVN repository with JIRA, so that all source SVN commits show up against JIRA tickets. To achieve this I have activated the JIRA SVN plugin, and written a pre-commit script to reject commits which do not contain a valid JIRA issue.

This task is slightly complicated because a senior member of the team has reservations about driving source control workflow from JIRA issues. As a compromise until the process solidifies, I have been tasked with adding a backdoor '#nojira' to the pre-commit hook. SVN commits containing #nojira will be permitted, but a catch all ticket PROJECT-CATCH_ALL_ISSUE_NUMBER should record these commits.

While there's an obvious alternative solution to this problem (:)) does anybody know of a way to set up a mapping like PROJECT-CATCH_ALL_ISSUE_NUMBER -> #nojira in JIRA's SVN plugin?

I have considered modifying the commit message in the post commit hook to replace #nojira with the catch all issue ID but that also seems wrong on several levels.

1
The requirement is a lot like stackoverflow.com/questions/9170571/… except I need JIRA's SV plugin to invoke something like the grep command to list the files against PROJECT-CATCH_ALL_ISSUE_NUMBER - any thoughts?user1310957

1 Answers

0
votes

A hack would be to use PROJECT-CATCH_ALL_ISSUE_NUMBER rather than #nojira, and then post a comment to PROJECT-CATCH_ALL_ISSUE_NUMBER from the post-commit hook. There might be a cleaner way to add optional workflow though.