Skip to content

Commit 7af2268

Browse files
authored
ci: add workflow to check PR name before merging (#55)
* ci: add workflow to check PR name before merging * docs: add CONTRIBUTING.md for monorepo * chore: add labeling PR when failing * fix: add permissions to workflow * feat: add BREAKING CHANGE in regex * docs: update CONTRIBUTING.md
1 parent ae1a113 commit 7af2268

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"LABEL": {
3+
"name": "no-conventional-pr-name"
4+
},
5+
"CHECKS": {
6+
"regexp": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|BREAKING CHANGE){1}(([w-.]+))?(:) ([w ])+([sS]*)$",
7+
"ignoreLabels": ["WIP"]
8+
},
9+
"MESSAGES": {
10+
"success": "All OK",
11+
"failure": "Failing CI test",
12+
"notice": ""
13+
}
14+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "PR Conventional Title Checker"
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- edited
7+
- synchronize
8+
9+
jobs:
10+
check-title:
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: thehanimo/pr-title-checker@v1.4.0
17+
with:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
pass_on_octokit_error: false
20+
configuration_path: .github/pr-conventional-title-checker-config.json

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Contribute
2+
3+
Each package has its own specifications for contribution. Please refer to the `CONTRIBUTING.md` file in the package you want to contribute to.
4+
5+
- [eslint-plugin](packages/eslint-plugin/CONTRIBUTING.md)
6+
7+
## Conventional commits
8+
9+
We use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) to automate the release process.
10+
Later on, we will add a `CHANGELOG.md` file to each package, which will be automatically updated on each release.

0 commit comments

Comments
 (0)