Skip to content

Commit 4241f13

Browse files
authored
Merge branch 'main' into shenxianpeng-patch-1
2 parents e045b34 + f87ca4d commit 4241f13

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
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 [email protected]`

.github/workflows/commit-check.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@ on:
55
branches: 'main'
66
workflow_dispatch:
77

8-
permissions: # used by `pr-comments`
9-
contents: write
10-
pull-requests: write
11-
128
jobs:
139
commit-check:
1410
runs-on: ubuntu-latest
11+
permissions: # use permissions because of use pr-comments
12+
contents: read
13+
pull-requests: 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

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Install commit-check CLI
22
# For details please see: https://github.com/commit-check/commit-check
3-
commit-check==0.8.4
3+
commit-check==0.8.5
44
# Interact with the GitHub API.
55
PyGithub==2.4.0

0 commit comments

Comments
 (0)