A team created a workflow that should comment on planning issues when the agent-plan label is applied. The workflow must not create branches or pull requests. A maintainer reports that the planning workflow failed after a Copilot-generated issue was labeled. Which option best explains the failure? Select one answer.
Workflow: validate-agent-plan
Event: issues.labeled
Actor: github-copilot[bot]
Job: comment-plan-status
Run gh issue comment "$ISSUE_NUMBER" --body "Planning review required before execution."
gh: Resource not accessible by integration
Process completed with exit code 1.
permissions:
contents: read
issues: read
pull-requests: noneChoose an answer
Tap an option to check your answer.
Correct answer: The token cannot write the issue comment.
Why this is the answer
The workflow failed because the github-copilot[bot] actor, which triggered the workflow, does not have the necessary permissions to write issue comments. The error message "gh: Resource not accessible by integration" indicates that the bot's token lacks write access to issues. Although the workflow's permissions block specifies issues: read, it does not grant issues: write or issues: comment which is required for the gh issue comment command. The workflow used the correct issues.labeled trigger for the scenario. The pull-requests: none permission is irrelevant to commenting on an issue. While a human maintainer could comment, the problem is specifically about the bot's permissions, not who initiated the action.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed