Skip to content

fix(action): improve review mode permissions and prompt quality - #9

Merged
Mearman merged 4 commits into
mainfrom
fix/graphql-permission
Feb 15, 2026
Merged

Mearman merged 4 commits into
mainfrom
fix/graphql-permission

Conversation

@Mearman

@Mearman Mearman commented Feb 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Add Bash(gh api graphql:*) to allowed tools so the bot can run GraphQL queries for identity detection and review thread resolution
  • Remove label management from review prompts and tools — review verdicts already convey approval state, labels are redundant
  • Add PR title validation to post-review guidelines so the reviewer fixes vague or inaccurate titles

Changes

action.yml

  • Added Bash(gh api graphql:*) to COMMON_TOOLS
  • Removed Bash(gh label:*) from COMMON_TOOLS

.github/prompts/shared/02-guidelines.md

  • Removed label management section
  • Added PR title and description checking instructions after review submission

.github/prompts/review/02-red-flags.md

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.
claude[bot]
claude Bot previously approved these changes Feb 15, 2026
@claude claude Bot added the approved label Feb 15, 2026
@Mearman Mearman removed the approved label Feb 15, 2026
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.
@Mearman Mearman changed the title fix(action): allow gh api graphql commands in review mode fix(action): improve review mode permissions and prompt quality Feb 15, 2026
@claude
claude Bot dismissed their stale review February 15, 2026 10:43

Superseded

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@Mearman
Mearman merged commit 7b3eb30 into main Feb 15, 2026
1 check passed
@Mearman
Mearman deleted the fix/graphql-permission branch February 15, 2026 10:56
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant