fix(action): improve review mode permissions and prompt quality - #9
Merged
Merged
Conversation
The comment hygiene prompt instructs the bot to run gh api graphql for bot identity detection and review thread resolution, but the allowedTools pattern only included Bash(gh api:*) which doesn't match gh api graphql subcommands.
Labels are redundant with review verdicts. Replace label management with PR title validation — the reviewer now checks and fixes vague or inaccurate PR titles after submitting a review.
There was a problem hiding this comment.
Both commits are correct. The graphql permission enables bot identity detection and review thread management as required by the hygiene prompts. Replacing label management with PR title checking is a better use of the reviewer's capabilities — verdicts already signal review state, but title validation catches a common issue.
Add $BOT_NAME (from the bot_name input, default: claude[bot]) to the envsubst variable list so prompts can reference the bot identity directly. Remove the now-redundant Bash(gh api graphql:*) from allowed tools since identity detection no longer requires a GraphQL query.
Replace the gh api graphql viewer query with the $BOT_NAME variable which is resolved at prompt composition time. This avoids a command that was being denied by allowedTools pattern matching when the bot wrapped it in a variable assignment.
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bash(gh api graphql:*)to allowed tools so the bot can run GraphQL queries for identity detection and review thread resolutionChanges
action.ymlBash(gh api graphql:*)toCOMMON_TOOLSBash(gh label:*)fromCOMMON_TOOLS.github/prompts/shared/02-guidelines.md.github/prompts/review/02-red-flags.md