Skip to content

Commit 0cf0aeb

Browse files
committed
Update the README.md
1 parent f4cc68b commit 0cf0aeb

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
11
# github-status-checks-commit-message-regex
2-
Check if a pull request, matches a regex pattern in either title/body (firstline/rest) of the commit message
2+
3+
A simple python scripts, that checks if the commit message in the pull request matches a defined regex pattern
4+
5+
Just requires a plain Github workflow to run, on ubuntu-latest (or anything that has python3)
6+
7+
## Example status check Github Action workflow
8+
```yml
9+
name: Check commit message
10+
on: [pull_request]
11+
12+
jobs:
13+
check-commit-message:
14+
name: Check commit message
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check commit message
18+
uses: mnj/github-status-checks-commit-message-regex@v1
19+
with:
20+
pattern: '([A-Z][A-Z0-9]+-[0-9]+)' # Match all upper casee Jira ticket ids
21+
```
22+
23+
## License
24+
25+
This project is released under the terms of the [MIT License](LICENSE)

0 commit comments

Comments
 (0)