From 60c21cdc95e2ea587b53c229cd0076537716c581 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Wed, 25 Feb 2026 20:44:13 +0200 Subject: [PATCH 1/4] feat: add GH_TOKEN and GITHUB_TOKEN environment variables in action.yml --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index 68df492..901a169 100644 --- a/action.yml +++ b/action.yml @@ -69,3 +69,5 @@ runs: DRY_RUN: ${{ inputs.dry-run }} JOB_SUMMARY: ${{ inputs.job-summary }} PR_COMMENTS: ${{ inputs.pr-comments }} + GH_TOKEN: ${{ github.token }} + GITHUB_TOKEN: ${{ github.token }} From 74063e936694cab6221052d26760e7957837fe5a Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Wed, 25 Feb 2026 20:49:17 +0200 Subject: [PATCH 2/4] fix: remove GITHUB_TOKEN requirement for pr-comments feature in README --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 826bc2e..6da81e2 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,6 @@ jobs: with: fetch-depth: 0 # Required for merge-base checks - uses: commit-check/commit-check-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed for PR comments with: message: true branch: true @@ -123,7 +121,7 @@ jobs: - Default: `false` > [!IMPORTANT] -> `pr-comments` is an experimental feature. By default, it's disabled. To use it, you need to set `GITHUB_TOKEN` in the GitHub Action. +> `pr-comments` is an experimental feature. By default, it's disabled. > > This feature currently doesn’t work with forked repositories. For more details, refer to issue [#77](https://github.com/commit-check/commit-check-action/issues/77). From abe6b8de1e8ee6f6a1d72c1cfc86fa222d346f44 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Wed, 25 Feb 2026 21:04:13 +0200 Subject: [PATCH 3/4] fix: Remove GITHUB_TOKEN from commit-check workflow Removed GITHUB_TOKEN environment variable for self test. --- .github/workflows/commit-check.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/commit-check.yml b/.github/workflows/commit-check.yml index d9faf0e..b68a5dc 100644 --- a/.github/workflows/commit-check.yml +++ b/.github/workflows/commit-check.yml @@ -16,8 +16,6 @@ jobs: with: fetch-depth: 0 # Required for merge-base checks - uses: ./ # self test - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed for PR comments with: message: true branch: true From 0fcfa74b3bf09e320f5cafb42dd600ef8130c6d7 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Wed, 25 Feb 2026 21:05:57 +0200 Subject: [PATCH 4/4] fix: remove GH_TOKEN from action.yml environment variables --- action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/action.yml b/action.yml index 901a169..98552ef 100644 --- a/action.yml +++ b/action.yml @@ -69,5 +69,4 @@ runs: DRY_RUN: ${{ inputs.dry-run }} JOB_SUMMARY: ${{ inputs.job-summary }} PR_COMMENTS: ${{ inputs.pr-comments }} - GH_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}