Skip to content

johnner/mercurial-jira-commit-message-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mercurial hook for jira

The Mercurial hook checks that jira key exist in commit message.

If no jira key provided, hook fails and commit transaction rollback.

Available JIRA projects set in the list JIRA_PROJECTS

Installation

  1. Copy jirakeycheck.py to ~/.hg (or any dir you like)
  2. Add the following lines to $HOME/.hgrc
[hooks]
   #check all outgoing commits
   pretxncommit.jirakeycheck = python:~/.hg/jirakeycheck.py:checkCommitMessage

#Check all incoming commits when you pull. Good for pull requests control pretxnchangegroup.jirakeycheckall = python:~/.hg/jirakeycheck.py:checkAllCommitMessage

3. Set your JIRA project keys in array `JIRA_PROJECTS` in jirakeycheck.py

About

hg commit hook checks jira issue key in commit message

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages