Skip to content

Commit 56db78d

Browse files
committed
Raising commit message quality
1 parent e53fdb8 commit 56db78d

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.gitattributes export-ignore
55
.github/ export-ignore
66
.gitignore export-ignore
7+
.gitmessage export-ignore
78
.php_cs export-ignore
89
.travis.yml export-ignore
910
bin/increment-application-version export-ignore

.github/CONTRIBUTING.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ Thanks for considering to contribute to the `LeanPackageValidator`. Please follo
66

77
- Ensure the coding standard compliance before committing or opening pull requests by running `composer cs-fix` in the root directory of this repository.
88

9+
- Use the provided [commit message template](../.gitmessage), which follows the [rules](http://chris.beams.io/posts/git-commit/) described by Chris Beams, and configure it via `composer configure-commit-template` prior to committing.
10+
911
- All upstreamed contributions __MUST__ use [feature / topic branches](https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows) to ease their merging.

.gitmessage

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Subject line
2+
3+
# - Capitalise the subject line and do not end it with a period
4+
# - Use the imperative mood in the subject line
5+
# - Summarise changes in around 50 (soft limit, hard limit at 69)
6+
# characters or less in the subject line
7+
# - Separate subject line from body with a blank line
8+
Optional subject body
9+
# - Capitalise the subject body
10+
# - Use the subject body to explain what and why vs. how
11+
# - Wrap the subject body at 72 characters

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"bin": ["bin/lean-package-validator"],
2929
"scripts": {
3030
"test": "phpunit",
31-
"cs-fix": "php-cs-fixer fix . -vv || true"
31+
"cs-fix": "php-cs-fixer fix . -vv || true",
32+
"configure-commit-template": "git config --add commit.template .gitmessage"
3233
},
3334
"require-dev": {
3435
"phpunit/phpunit": "^4.8 || ^5.0",

0 commit comments

Comments
 (0)