Skip to content

Commit 527965e

Browse files
authored
chore: update commit-check.yml (#79)
* chore: update commit-check.yml * feat: update reamde and commit-check config file * fix: test self
1 parent 1ccc4e4 commit 527965e

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

.commit-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ checks:
2020
suggest: run command `git config user.name "Your Name"`
2121

2222
- check: author_email
23-
regex: ^\S+@\S+\.\S+$
23+
regex: ^.+@.+$
2424
error: The committer email seems invalid
2525
suggest: run command `git config user.email yourname@example.com`

.github/workflows/commit-check.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ on:
88
jobs:
99
commit-check:
1010
runs-on: ubuntu-latest
11-
permissions:
11+
permissions: # use permissions because of use pr-comments
1212
contents: read
1313
pull-requests: write
14-
repository-projects: write
1514
steps:
1615
- uses: actions/checkout@v4
1716
with:
18-
ref: ${{ github.event.pull_request.head.sha }}
19-
- uses: ./ # self test
17+
ref: ${{ github.event.pull_request.head.sha }} # checkout PR HEAD commit
18+
- uses: ./ # self test
2019
env:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # used by `pr-comments`
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because of use pr-comments
2221
with:
2322
message: true
2423
branch: true

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,16 @@ on:
2323
jobs:
2424
commit-check:
2525
runs-on: ubuntu-latest
26-
permissions:
26+
permissions: # use permissions because of use pr-comments
2727
contents: read
28-
issues: write
2928
pull-requests: write
3029
steps:
3130
- uses: actions/checkout@v4
3231
with:
33-
ref: ${{ github.event.pull_request.head.sha }} # Checkout PR HEAD commit
32+
ref: ${{ github.event.pull_request.head.sha }} # checkout PR HEAD commit
3433
- uses: commit-check/commit-check-action@v1
3534
env:
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because of use pr-comments
3736
with:
3837
message: true
3938
branch: true

0 commit comments

Comments
 (0)