Does FishEye have the equivalent functionality of a pre-commit hook and commit acceptance plugin?

We've been usig a pre-commit hook and the JIRA commit acceptance plugin for many years. We're now using FishEye and I'm looking for equivalent functionality. We're planning to upgrade JIRA beyond the supported version of the commit acceptance plugin.

We require our developers to reference a valid JIRA key before commiting to any of our subversion repositories. Does this functionality exist in FishEye?

thanks.

2 answers

This widget could not be displayed.

Commit Policy Plugin is a new, maintained JIRA add-on to replace the Commit Acceptance Plugin. 

It does everything the old plugin did, and a lot more by utilizing modern JIRA features like JQL, drop-in installation and the REST API. And, most importantly, it is updated for new JIRA versions.

Documentation: http://www.midori-global.com/products/jira-commit-policy-plugin/documentation/

This widget could not be displayed.

Well since FishEye is not a repository but a repository viewer the answer would be no.  You don't commit anything to fisheye so there's no "action" available to hook onto.

This should be on your repository.  SVN has pre and post commit hooks for this purpose.  If you have access to your svn environment you can look in the hooks directory and you'll find template hooks there that you can use to edit for this purpose and save them as .sh (unix) or .bat/.cmd (windows) in order to enable them.

We have a number of hooks that do this.  Simple ones just parse the comments for strings that resemble (but don't validate) valid issue numbers.  For example:

-------------------------------------------------------------------------

@echo off

setlocal

set REPOS=%1

set TXN=%2

svnlook dirs-changed %REPOS% -t %TXN% | findstr /b "[Dd]oc">nul

if %errorlevel% gtr 0 (goto wxyz) else exit 0

:wxyz

svnlook log %REPOS% -t %TXN% | findstr /R /i "WXYZ-[0-9][0-9][0-9][0-9]" >nul

if %errorlevel% gtr 0 (goto abc) else exit 0

:abc

svnlook log %REPOS% -t %TXN% | findstr /R /i "ABC-[0-9][0-9][0-9]">nul

if %errorlevel% gtr 0 (goto err) else exit 0

:err

echo                 - YOUR COMMIT WAS DECLINED - 1>&2

echo Please add a Jira issue number to your comment before you commit. 1>&2

echo Format Jira numbers like "WXYZ-1234", "wxyz-1234", or "ABC-1234 abc-1244". 1>&2

echo Separate with spaces if you have more than one to enter. 1>&2

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1>&2

exit 1

---------------------------------------------------------

Again, these have nothing to do with Fisheye.  They are strictly SVN.  You can refer to the Red Beans book (http://svnbook.red-bean.com/) for more information on SVN hooks.

There are ways to validate against JIRA id's and we are using them but I don't have access to the source code for those.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

202 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you