Skip to content

Commit c32e355

Browse files
authored
Merge pull request #13 from scribd/helen/SERF-2048/commit-message-check
[SERF-2048] Use shared workflow to check commit message in PR
2 parents 3c83e3e + 574c82f commit c32e355

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/pr-check.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: PR Check
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- reopened
9+
- synchronize
10+
11+
jobs:
12+
check-commit-message:
13+
name: Check Commit Message
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- name: Check Commit Message
17+
uses: gsactions/commit-message-checker@v2
18+
with:
19+
pattern: '^(?:ci|feat|fix|docs|style|refactor|perf|test|chore)\(?(?:\w+|\s|\-|_)?\)?:\s\w+'
20+
error: "One or more commit messages do not meet the format requirements. Please check the requirements here: https://github.com/scribd/job-notification#commit-messages"
21+
accessToken: ${{ secrets.SCRIBD_GITHUB_RELEASE_TOKEN }}
22+
excludeTitle: true
23+
excludeDescription: true
24+
checkAllCommitMessages: true

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ A GitHub Action for sending job notifications
1212
- [Overwrite repository link](#overwrite-repository-link)
1313
- [Development](#development)
1414
- [Testing](#testing)
15+
- [Commit messages](#commit-messages)
1516
- [Maintainers](#maintainers)
1617

1718
## Quick Start
@@ -78,6 +79,10 @@ steps:
7879

7980
You can test your changes by pushing them to a branch, which will trigger the [test](.github/workflows/test.yml) workflow to send the notifications to the [test-release-notification](https://scribd.slack.com/archives/C04U68KR6CU) channel on Slack.
8081

82+
### Commit messages
83+
84+
Please follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) and [Angular commit message guidelines](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines) for writing commit messages.
85+
8186
## Maintainers
8287

8388
Made with ❤️ by the Service Foundations teams.

0 commit comments

Comments
 (0)