diff --git a/.commit-check.yml b/.commit-check.yml index 15ac7e4..7d5e579 100644 --- a/.commit-check.yml +++ b/.commit-check.yml @@ -20,6 +20,6 @@ checks: suggest: run command `git config user.name "Your Name"` - check: author_email - regex: ^\S+@\S+\.\S+$ + regex: ^.+@.+$ error: The committer email seems invalid suggest: run command `git config user.email yourname@example.com` diff --git a/.github/workflows/commit-check.yml b/.github/workflows/commit-check.yml index 422d944..7ee0be4 100644 --- a/.github/workflows/commit-check.yml +++ b/.github/workflows/commit-check.yml @@ -8,17 +8,16 @@ on: jobs: commit-check: runs-on: ubuntu-latest - permissions: + permissions: # use permissions because of use pr-comments contents: read pull-requests: write - repository-projects: write steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.sha }} - - uses: ./ # self test + ref: ${{ github.event.pull_request.head.sha }} # checkout PR HEAD commit + - uses: ./ # self test env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # used by `pr-comments` + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because of use pr-comments with: message: true branch: true diff --git a/README.md b/README.md index 1646fb9..c9a5963 100644 --- a/README.md +++ b/README.md @@ -23,17 +23,16 @@ on: jobs: commit-check: runs-on: ubuntu-latest - permissions: + permissions: # use permissions because of use pr-comments contents: read - issues: write pull-requests: write steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.sha }} # Checkout PR HEAD commit + ref: ${{ github.event.pull_request.head.sha }} # checkout PR HEAD commit - uses: commit-check/commit-check-action@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because of use pr-comments with: message: true branch: true