Skip to content

fix(prompts): use dynamic bot identity for comment filtering - #4

Merged
Mearman merged 3 commits into
mainfrom
fix/dynamic-bot-identity
Feb 13, 2026
Merged

Mearman merged 3 commits into
mainfrom
fix/dynamic-bot-identity

Conversation

@Mearman

@Mearman Mearman commented Feb 13, 2026

Copy link
Copy Markdown
Member

Problem

Comment cleanup was hardcoded to filter for claude[bot], which wouldn't work if a different bot name is configured via the bot_name input.

Solution

Query the bot's own identity at runtime via GraphQL viewer query and use that for filtering. This ensures comment cleanup works regardless of the configured bot name.

Summary

Replaces hardcoded claude[bot] with dynamic bot identity lookup via GraphQL viewer query. Updates cleanup instructions to:

  1. Query bot identity with gh api graphql
  2. List all reviews/comments for context
  3. Filter to identify only own items using $BOT_LOGIN variable

This ensures cleanup works with any configured bot name and improves context awareness.

Query bot identity at runtime via `gh api user` instead of hardcoding
`claude[bot]`. This ensures comment cleanup works regardless of which
bot name is configured in the action inputs.
@Mearman
Mearman force-pushed the fix/dynamic-bot-identity branch from 98915b3 to 636d37b Compare February 13, 2026 19:30
@github-actions
github-actions Bot dismissed a stale review February 13, 2026 19:35

Superseded

github-actions[bot]
github-actions Bot previously approved these changes Feb 13, 2026
@github-actions
github-actions Bot dismissed their stale review February 13, 2026 19:40

Superseded

@github-actions github-actions 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.

Correctly replaces hardcoded bot identity with dynamic lookup. The GraphQL viewer query works with existing permissions and the two-step approach (list all, then filter own) properly handles context awareness.

@Mearman
Mearman merged commit 982bc87 into main Feb 13, 2026
1 check passed
@Mearman
Mearman deleted the fix/dynamic-bot-identity branch February 13, 2026 19:42
@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