Skip to content

Latest commit

 

History

History
55 lines (44 loc) · 1.79 KB

README.md

File metadata and controls

55 lines (44 loc) · 1.79 KB

git-hooks

Git hooks

Convention for RED development

See confluence page

Implemented checks

check_commit_message.sh

Check only pushes on main branch

Try to follow RED convention. What is implemented?

For the commit title line

  • must begin with a Jira ticket ref, in uppercase, like RED-2312 (supported projects are RED, REDQAS, REDOPS, REDDVOPS) followed by
  • optional ! to notify that the commit introduce breaking changes, followed by
  • colon + space : , followed by
  • optional scope in brackets, like {docs} or {redsetup, redapi}, followed by
  • your commit title

Valid examples:

RED-124: my title
RED-456: {core} my title
RED-1234!: This commit introduce breaking changes

Invalid ones:

title without JIRA issue
RED-45:title, missing space
RED-45: {} brackets with empty content

For revert commits, message should begin as follow:

Revert "RED-1234 ....
  • Revert word followed by
  • " space + quotes followed by
  • reverted JIRA ticket ref

Troubleshooting

Error message

You should see this error popup if you tried to merge your PR and your commit message is wrong. What you have to do is refresh your browser page (F5) to go back to this situation: attempt merge

Click on Squash and merge button, to see next dialog: change message

Fix you commit message and click Attempt squash and merge button. valid message

If your commit message is valid, PR will be merge. Otherwise, you will have to do that process again until message is correct.