How do we verify commit messages for a push?

前端 未结 5 686
执笔经年
执笔经年 2020-12-01 04:28

Coming from CVS, we have a policy that commit messages should be tagged with a bug number (simple suffix \"... [9999]\"). A CVS script checks this during commits and rejects

5条回答
  •  Happy的楠姐
    2020-12-01 05:11

    You didn't mention what is your bug tracker, but if it is JIRA, then the add-on named Commit Policy can do this for without any programming.

    You can set up a commit condition which requires the commit message to match a regular expression. If it doesn't, the push is rejected, and the developer must amend (fix) the commit message, then push again.

提交回复
热议问题