Skip to content

Commit 443fb6a

Browse files
authored
feat: add GITHUB_TOKEN environment variables to action.yml (#181)
* feat: add GH_TOKEN and GITHUB_TOKEN environment variables in action.yml * fix: remove GITHUB_TOKEN requirement for pr-comments feature in README * fix: Remove GITHUB_TOKEN from commit-check workflow Removed GITHUB_TOKEN environment variable for self test. * fix: remove GH_TOKEN from action.yml environment variables
1 parent 8b2b2d4 commit 443fb6a

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

.github/workflows/commit-check.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
with:
1717
fetch-depth: 0 # Required for merge-base checks
1818
- uses: ./ # self test
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed for PR comments
2119
with:
2220
message: true
2321
branch: true

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ jobs:
5252
with:
5353
fetch-depth: 0 # Required for merge-base checks
5454
- uses: commit-check/commit-check-action@v2
55-
env:
56-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed for PR comments
5755
with:
5856
message: true
5957
branch: true
@@ -123,7 +121,7 @@ jobs:
123121
- Default: `false`
124122

125123
> [!IMPORTANT]
126-
> `pr-comments` is an experimental feature. By default, it's disabled. To use it, you need to set `GITHUB_TOKEN` in the GitHub Action.
124+
> `pr-comments` is an experimental feature. By default, it's disabled.
127125
>
128126
> 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).
129127

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,4 @@ runs:
6969
DRY_RUN: ${{ inputs.dry-run }}
7070
JOB_SUMMARY: ${{ inputs.job-summary }}
7171
PR_COMMENTS: ${{ inputs.pr-comments }}
72+
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)