Skip to content

Commit 06b5a80

Browse files
committed
ci: Add pull request template and run commitlint on PR title only
We now ensure the conventional commits format only on PR titles and not on commits to let developers keep commit messages targeted for other developers i.e. describe actual changes to code that users should not care about. And PR titles, on the contrary, must be aimed at end users. For more info, see https://linux-system-roles.github.io/contribute.html#write-a-good-pr-title-and-description Signed-off-by: Sergei Petrosian <[email protected]>
1 parent 5a16718 commit 06b5a80

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

.github/pull_request_template.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Enhancement:
2+
3+
Reason:
4+
5+
Result:
6+
7+
Issue Tracker Tickets (Jira or BZ if any):

.github/workflows/commitlint.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,6 @@ jobs:
2424
- name: Install conventional-commit linter
2525
run: npm install @commitlint/config-conventional @commitlint/cli
2626

27-
# Finding the commit range is not as trivial as it may seem.
28-
#
29-
# At this stage, git's HEAD does not refer to the latest commit in the
30-
# PR, but rather to the merge commit inserted by the PR. So instead we
31-
# have to get 'HEAD' from the PR event.
32-
#
33-
# One cannot use the number of commits
34-
# (github.event.pull_request.commits) to find the start commit
35-
# i.e. HEAD~N does not work, this breaks if there are merge commits.
36-
- name: Run commitlint on commits
37-
run: >-
38-
npx commitlint --from '${{ github.event.pull_request.base.sha }}'
39-
--to '${{ github.event.pull_request.head.sha }}' --verbose
40-
4127
- name: Run commitlint on PR title
4228
run: >-
4329
echo '${{ github.event.pull_request.title }}' |

0 commit comments

Comments
 (0)