gitjiraatlassian-fisheye

JIRA + fisheye + git -> how to repair missing links?


When using Subversion, JIRA, and fisheye, it's easy enough to edit a log message to fix the JIRA number. With git, not so much. Once a commit is pushed to a shared repo, modifying the commit is fraught.

Is there some other mechanism in these products to allow for fixing the links between commits and JIRAs if someone typos and pushes?


Solution

  • One mechanism is to use hooks to prevent pushes with typos.

    A pre-commit hook on your local repo can check the pattern fits (but doesn't check remote jira so you keep offline capability). This prevents developers committing without a properly formed jira reference.

    A pre-receive or update hook on the server does a more complete check (like ensuring all commits have a jira reference that is valid / open / assigned to them).

    This isn't bulletproof but it should be good enough.