From utils
Lists PRs and issues needing your attention. Identifies blockers like unresolved comments, merge conflicts, and unanswered questions across authored, reviewed, and participated threads.
How this command is triggered — by the user, by Claude, or both
Slash command
/utils:gh-attention [--repo <org/repo>]The summary Claude sees in its command listing — used to decide when to auto-load this command
## Name utils:gh-attention ## Synopsis ## Description The `utils:gh-attention` command identifies pull requests and issues that are waiting for your action. It scans PRs you've authored, PRs where you're requested as a reviewer, and PRs where you've participated in discussions. For each, it detects specific states where you are the blocker: unresolved review comments, unanswered PR conversation comments, change requests you haven't addressed, merge conflicts, and unanswered questions on assigned issues. This command helps cut through notification noise by focusing only on actionable ite...
utils:gh-attention
/utils:gh-attention [--repo <org/repo>]
The utils:gh-attention command identifies pull requests and issues that are waiting for your action. It scans PRs you've authored, PRs where you're requested as a reviewer, and PRs where you've participated in discussions. For each, it detects specific states where you are the blocker: unresolved review comments, unanswered PR conversation comments, change requests you haven't addressed, merge conflicts, and unanswered questions on assigned issues.
This command helps cut through notification noise by focusing only on actionable items where others are waiting for your input.
Check gh CLI installation and authentication:
gh version || echo "gh CLI not installed. Install from https://cli.github.com/"
gh auth status || gh auth login
Parse arguments:
--repo <org/repo> flagGet current username:
CURRENT_USER=$(gh api user -q .login)
If --repo is provided:
If no --repo argument:
Find all open PRs where you're involved:
a. PRs authored by you:
gh search prs --author=@me --state=open --json number,repository,title,url,isDraft --limit 100
b. PRs where you're requested as reviewer:
gh search prs --review-requested=@me --state=open --json number,repository,title,url,isDraft --limit 100
c. PRs where you've commented/reviewed:
gh search prs --commenter=@me --state=open --json number,repository,title,url,isDraft --limit 100
Find all open issues assigned to current user:
gh search issues --assignee=@me --state=open --json number,repository,title,url --limit 100
Combine and deduplicate PRs from steps 1a, 1b, and 1c
Filter out draft PRs immediately to reduce API calls
Extract unique repositories from the results
Use GraphQL for efficient data fetching: GraphQL allows us to fetch all needed data in a single query and provides direct access to the isResolved field on review threads.
For each PR (non-draft only):
Fetch all PR data using GraphQL:
Split the repository owner and name from <REPO> (format: owner/name).
gh api graphql -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
number
title
url
createdAt
author { login }
mergeable
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
comments(first: 20) {
nodes {
author { login }
body
createdAt
path
line
}
}
}
}
reviews(first: 50) {
nodes {
author { login }
state
submittedAt
body
}
}
comments(first: 100) {
nodes {
author { login }
body
createdAt
}
}
commits(last: 50) {
nodes {
commit {
committedDate
}
}
}
}
}
}' -f owner='<OWNER>' -f name='<NAME>' -F number=<PR_NUMBER>
Parse the GraphQL response to extract:
Determine your role in the PR:
author.login == CURRENT_USER: You are the PR authorFor each issue:
Fetch issue data using GraphQL:
gh api graphql -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
issue(number: $number) {
number
title
url
body
comments(first: 100) {
nodes {
author { login }
body
createdAt
}
}
}
}
}' -f owner='<OWNER>' -f name='<NAME>' -F number=<ISSUE_NUMBER>
Parse the GraphQL response to extract issue details and comments
Detection logic differs based on your role (determined in Step 2.3):
For each PR where author.login == CURRENT_USER:
mergeable field from Step 2mergeable == "CONFLICTING", flag as CRITICALMerge conflict needs resolutionFor each PR (from GraphQL data), check for any pending review feedback:
Check for unresolved review threads:
isResolved == false (direct from GraphQL)isOutdated == false (ignore outdated code comments)dependabot, renovate, openshift-ci-robot, openshift-ci)last_comment.author.login == CURRENT_USER, skip (you already responded)path:line - @author commented (X days ago) with snippet (first 80 chars)Check for unaddressed change request reviews - Only for PRs you authored:
author.login == CURRENT_USER:
state == "CHANGES_REQUESTED"submittedAt with commit dates (commits.nodes[].commit.committedDate)@reviewer requested changes (X days ago)Check for unanswered PR comments (general conversation comments):
author.login != CURRENT_USERdependabot, renovate, openshift-ci-robot, openshift-ci)body contains @{CURRENT_USER} OR body contains ?@author commented in PR conversation (X days ago) with snippet (first 80 chars)Combine and flag as HIGH priority if any of: unresolved threads, unaddressed change requests (if you're the author), or unanswered PR comments exist
For each assigned issue (from GraphQL data):
Find your last comment timestamp:
author.login == CURRENT_USERCheck for questions after your last comment:
createdAt > your_last_comment_timestampbody contains @{CURRENT_USER} OR body contains ?author.login != CURRENT_USERdependabot, renovate, openshift-ci-robot, openshift-ci)Also check the issue body for unanswered questions if you haven't commented yet
For each unanswered question:
@author asked a question (X days ago)createdAt to calculate waiting timeFor each detected item:
3 days ago, 5 hours ago, just nowPrimary sort: By priority level
Secondary sort: By waiting time (oldest first within each priority)
Header:
Found X items requiring attention across Y repositories
For each item, display:
[PRIORITY_LEVEL] Repository: org/repo
PR #123: Title of the pull request
URL: https://github.com/org/repo/pull/123
Reason: [specific reason - e.g., "2 unresolved comment threads"]
Waiting: X days since last comment
Details:
• path/to/file.go:45 - @reviewer asked about error handling (2 days ago)
"Should we add retry logic here?"
• path/to/other.go:120 - @reviewer requested refactoring (3 days ago)
"Consider extracting this into a helper function"
Footer summary:
Summary:
1 PR with merge conflicts
3 PRs with review feedback
1 issue with unanswered questions
If no items found:
✓ No items requiring attention! All caught up.
No repositories found:
No open PRs or assigned issues found.
API rate limit hit:
⚠️ GitHub API rate limit reached after checking X items.
Try using --repo <org/repo> to narrow the scope.
Rate limit resets at: [timestamp from gh api rate_limit]
Authentication failure:
❌ GitHub CLI not authenticated.
Run: gh auth login
Repository access denied:
⚠️ Unable to access repository <org/repo> (private or insufficient permissions)
Skipping...
The command outputs a prioritized list of actionable items with:
Exit codes:
0: Success (items found or no items found)1: Error (authentication failure, gh CLI not found)/utils:gh-attention
Output:
Found 3 items requiring attention across 2 repositories
[HIGH] Repository: openshift/console
PR #5678: Add dark mode toggle
URL: https://github.com/openshift/console/pull/5678
Reason: 2 unresolved review threads
Waiting: 3 days since last comment
Details:
• src/components/Header.tsx:120 - @designer commented (3 days ago)
"Can we use the theme constant instead of hardcoding?"
• src/styles/theme.css:15 - @reviewer commented (2 days ago)
"Should this support high contrast mode?"
[HIGH] Repository: openshift/origin
PR #1234: Fix authentication timeout bug
URL: https://github.com/openshift/origin/pull/1234
Reason: 1 change request, 1 unresolved thread
Waiting: 2 days since review
Details:
• @reviewer-name requested changes (2 days ago)
"Please add unit tests for the timeout logic"
• pkg/auth/handler.go:45 - @reviewer commented (1 day ago)
"Should we log this error before returning?"
[LOW] Repository: openshift/enhancements
Issue #234: Enhancement proposal for new API
URL: https://github.com/openshift/enhancements/issues/234
Reason: Unanswered question
Waiting: 4 days since question
Details:
• @team-member asked a question (4 days ago)
"@you What's the timeline for implementing this?"
Summary:
2 PRs with review feedback
1 issue with unanswered questions
/utils:gh-attention --repo openshift/origin
Output:
Found 1 item requiring attention in openshift/origin
[HIGH] Repository: openshift/origin
PR #1234: Fix authentication timeout bug
URL: https://github.com/openshift/origin/pull/1234
Reason: Change request not addressed
Waiting: 2 days since review
Details:
• @reviewer-name requested changes (2 days ago)
"Please add unit tests for the timeout logic"
Summary:
1 PR with unaddressed change requests
/utils:gh-attention
Output:
✓ No items requiring attention! All caught up.
--repo <org/repo>: (Optional) Limit check to a specific repository. If omitted, checks all repositories with your open PRs or assigned issues.npx claudepluginhub anirudhagniredhat/openshift-ai-helpers --plugin utils/gh-attentionLists PRs and issues needing your attention. Identifies blockers like unresolved comments, merge conflicts, and unanswered questions across authored, reviewed, and participated threads.
/pr-listDisplays open pull requests in the current repository, grouped by priority (high, medium, low) based on commit type, with title, author, elapsed time, approvals, and line changes.
/huntScans open issues and PRs, ranks them by readiness, and recommends what to work on next. Uses signed shiplog reviews to determine review status.
/pr-listLists open PRs in the current repo, prioritized by type (fix/release/feat/update), with summaries and approval counts.
/pr-listLists open PRs in the current repo, ranked by priority (high/medium/low) with summaries, author, age, and diff stats.
/pr-listLists open PRs for the current repository, ordered by priority (high/medium/low), with summaries, review count, and elapsed time since opening.