Skip to content

Commit

Permalink
Merge branch 'main' into feat/add_sky_trace
Browse files Browse the repository at this point in the history
  • Loading branch information
seeflood authored Mar 25, 2022
2 parents 2fa1dd0 + b5514e1 commit b95b255
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"LABEL": {
"name": "title needs formatting",
"color": "EEEEEE"
},
"CHECKS": {
"prefixes": ["fix: ", "feat: ","doc: ","ci: ","chore: "],
"regexp": "docs\\(v[0-9]\\): ",
"regexpFlags": "i",
"ignoreLabels" : ["dont-check-PRs-with-this-label", "meta"]
},
"MESSAGES": {
"success": "All OK",
"failure": "Failing CI PR title check",
"notice": ""
}
}
19 changes: 19 additions & 0 deletions .github/workflows/pr_title_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "PR Title Checker"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: thehanimo/pr-title-checker@v1.3.4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: ".github/pr-title-checker-config.json"
15 changes: 14 additions & 1 deletion docs/en/development/explanation-for-github-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,20 @@ The ignore list is in `.licenserc.yaml`. You can add new types into it.
##### For more details of this tool
See https://github.com/marketplace/actions/license-eye#docker-image for details

#### TODO: PR title lint
#### PR title lint
In order to standardize PR title, we add this check action. You can learn more in https://github.com/thehanimo/pr-title-checker.

##### config the pr title check
If the title is in either `prefixes` or `regexp`, the check will pass. Otherwise , a label `title needs formatting` will be added to that pull request.
`regexpFlags` mean regular expression flags, such as : `i`(Case-insensitive search) `g`(Global search) .
```
"CHECKS": {
"prefixes": ["fix: ", "feat: ","doc: "],
"regexp": "docs\\(v[0-9]\\): ",
"regexpFlags": "i",
"ignoreLabels" : ["dont-check-PRs-with-this-label", "meta"]
}
```
~~#### TODO: PR body lint?~~
#### TODO: Code style lint
For example,find out `go xxx()` without `recover`
Expand Down
15 changes: 14 additions & 1 deletion docs/zh/development/explanation-for-github-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,20 @@ The ignore list is in `.licenserc.yaml`. You can add new types into it.
##### For more details of this tool
See https://github.com/marketplace/actions/license-eye#docker-image for details

#### TODO: PR title lint
#### PR title lint
In order to standardize PR title, we add this check action. You can learn more in https://github.com/thehanimo/pr-title-checker.

##### config the pr title check
If the title is in either `prefixes` or `regexp`, the check will pass. Otherwise , a label `title needs formatting` will be added to that pull request.
`regexpFlags` mean regular expression flags, such as : `i`(Case-insensitive search) `g`(Global search) .
```
"CHECKS": {
"prefixes": ["fix: ", "feat: ","doc: "],
"regexp": "docs\\(v[0-9]\\): ",
"regexpFlags": "i",
"ignoreLabels" : ["dont-check-PRs-with-this-label", "meta"]
}
```
~~#### TODO: PR body lint?~~
#### TODO: Code style lint
For example,find out `go xxx()` without `recover`
Expand Down

0 comments on commit b95b255

Please sign in to comment.