Browse Source

Update commit message policy

Giving both the issue number and URL is redundent in the message.
GitLab can automatically close the issue using the URL, so only
give the URL so it can be viewed in the log.
merge-requests/21/head
Ian McInerney 6 years ago
committed by Wayne Stambaugh
parent
commit
2e5b8d0a8f
  1. 8
      Documentation/development/commit-message-format.md
  2. 2
      helpers/git/fixes_alias

8
Documentation/development/commit-message-format.md

@ -17,7 +17,7 @@ automatically close the issue and add a link to your commit in the issue.
For example, the following line will automatically close issue #1234567:
Fixes #1234567 | https://gitlab.com/kicad/code/kicad/issues/1234567
Fixes https://gitlab.com/kicad/code/kicad/issues/1234567
There is an [alias](#commit_fixes_alias) to simplify this step.
You can read more about automatic issue closing in the
@ -70,8 +70,8 @@ Following is an example of a properly formatted commit message:
CHANGED: "Wire" lines now optionally include data on the line style,
width and color if they differ from the default.
Fixes #594059 | https://gitlab.com/kicad/code/kicad/issues/594059
Fixes #1405026 | https://gitlab.com/kicad/code/kicad/issues/1405026
Fixes https://gitlab.com/kicad/code/kicad/issues/594059
Fixes https://gitlab.com/kicad/code/kicad/issues/1405026
# Git aliases file # {#commit_git_aliases}
@ -89,7 +89,7 @@ most recent commit to include the bug report link:
For example, the command below will append a line to the last commit message:
Fixes #1234567 | https://gitlab.com/kicad/code/kicad/issues/1234567
Fixes https://gitlab.com/kicad/code/kicad/issues/1234567
## 'changelog' alias # {#commit_changelog_alias}

2
helpers/git/fixes_alias

@ -7,7 +7,7 @@
fixes = "!f() { \
COMMIT_MSG=$(git log -1 --format=medium | tail -n +5 | sed -e 's/^ //'); \
git commit --amend -m \"${COMMIT_MSG}\n\nFixes #$1 | https://gitlab.com/kicad/code/kicad/issues/$1\"; \
git commit --amend -m \"${COMMIT_MSG}\n\nFixes https://gitlab.com/kicad/code/kicad/issues/$1\"; \
}; f"

Loading…
Cancel
Save