Description
The license check workflow uses license-eye with:
header:
comment: on-failure
When an invalid license header is detected, license-eye tries to create a pull request review/comment. However, the workflow does not declare the required GITHUB_TOKEN permissions, resulting in:
WARNING Failed to create review comment: 403 Resource not accessible by integration
WARNING Failed to create review comments: 403 Resource not accessible by integration
The relevant workflow is:
.github/workflows/license-check.yml
Suggested solutions:
Option 1: Grant the minimum required permissions
permissions:
contents: read
pull-requests: write
issues: write
pull-requests: write is required for creating PR reviews, while issues: write may be required by the fallback plain-comment mechanism.
Option 2: Disable automatic PR comments
If automatic comments are not required, change the configuration to:
The workflow should choose one of these approaches to avoid the misleading permission warnings. Note that workflows triggered by fork pull requests may still receive a read-only GITHUB_TOKEN.
References:
Are you willing to submit a PR to fix this bug?
Description
The license check workflow uses
license-eyewith:When an invalid license header is detected,
license-eyetries to create a pull request review/comment. However, the workflow does not declare the requiredGITHUB_TOKENpermissions, resulting in:The relevant workflow is:
Suggested solutions:
Option 1: Grant the minimum required permissions
pull-requests: writeis required for creating PR reviews, whileissues: writemay be required by the fallback plain-comment mechanism.Option 2: Disable automatic PR comments
If automatic comments are not required, change the configuration to:
The workflow should choose one of these approaches to avoid the misleading permission warnings. Note that workflows triggered by fork pull requests may still receive a read-only
GITHUB_TOKEN.References:
Are you willing to submit a PR to fix this bug?