From utils
Automates approval of open PRs from red-hat-konflux[bot] by posting /lgtm and /approve comments after verifying CI checks pass and labels are missing.
How this command is triggered — by the user, by Claude, or both
Slash command
/utils:auto-approve-konflux-prs <target-repository>The summary Claude sees in its command listing — used to decide when to auto-load this command
## Name utils:auto-approve-konflux-prs ## Synopsis /utils:auto-approve-konflux-prs <target-repository> ## Description The command automates the approval of open PRs created by the `red-hat-konflux[bot]` for the given repository. It filters all open PRs from the given repository, checks whether the PR already has `/lgtm` and `/approve` comments, verifies that all required checks (CI jobs or other mandatory checks) have passed, and if any labels/comments are missing and all checks succeed, posts `/lgtm` and `/approve` comments to trigger approval. This ensures that PRs are only auto-ap...
utils:auto-approve-konflux-prs
/utils:auto-approve-konflux-prs
The command automates the approval of open PRs created by the red-hat-konflux[bot] for the given repository.
It filters all open PRs from the given repository, checks whether the PR already has /lgtm and /approve comments, verifies that all required checks (CI jobs or other mandatory checks) have passed, and if any labels/comments are missing and all checks succeed, posts /lgtm and /approve comments to trigger approval.
This ensures that PRs are only auto-approved if all required checks succeed and the author is red-hat-konflux[bot], reducing the risk of approving failing or unauthorized changes.
OWNER/REPO format.
The command executes the following workflow:
The command only processes PRs authored by red-hat-konflux[bot]. If a PR from any other author is encountered, it reports an error such as below:
⚠️ Only PRs from red-hat-konflux[bot] can be automatically processed
and exits.
Fetch all open PRs authored by red-hat-konflux[bot] for the specified repository:
gh pr list --repo <target-repository> --author app/red-hat-konflux --state open --json number,title,baseRefName,labels
gh pr view <PR_NUMBER> --repo <target-repository> --json statusCheckRollup,labels
⚠️ Skipping PR #<PR_NUMBER>: CI checks not all passed
Inspect labels:
Add missing labels via comments:
Log each action:
✅ Added /lgtm and/or /approve to PR #<PR_NUMBER>: <PR_TITLE> (merge into <MERGE_BRANCH>)
red-hat-konflux[bot] in a repository:/utils:auto-approve-konflux-prs openshift/multiarch-tuning-operator
Output:
Processing 3 open Konflux PRs...
[1/3] PR #84 - chore(deps): update konflux references (merge into main)
✅ Added /lgtm and /approve (all CI passed)
[2/3] PR #83 - chore(deps): update konflux references (merge into v1.x)
⚠️ Skipping: CI checks not all passed
[3/3] PR #82 - chore(deps): update konflux references (merge into fbc)
✅ Added /lgtm (already had /approve, all CI passed)
Summary:
✅ Processed 2 PRs successfully, 1 skipped due to CI failures
GitHub CLI (gh): Must be installed and authenticated
brew install gh (macOS) or see GitHub CLI docsgh auth logingh auth statusAccess to GitHub Repositories: Must have read access to repos where PRs are located
red-hat-konflux[bot]: Reports error and exits.gh auth login.app/red-hat-konflux.npx claudepluginhub rvanderp3/ai-helpers --plugin utils/auto-approve-konflux-prsAutomates approval of open PRs from red-hat-konflux[bot] by posting /lgtm and /approve comments after verifying CI checks pass and labels are missing.
/address-pr-commentsTriages and addresses PR comments from code review bots: analyzes feedback, prioritizes issues, fixes valid concerns, and declines incorrect suggestions.
/handle-pr-commentsSystematically addresses all PR review comments — fixes issues, responds to threads, and iterates until all checks pass and no new reviews appear.
/approve-prApproves a pull request after verifying CI checks, test coverage, diff review, and branch status via GitHub CLI.
/reviewReviews a GitHub PR and posts a signed shiplog review comment with disposition, scope, and follow-ups. Enforces cross-model gate rules and updates the PR body snapshot.
/pr-reviewResponds to GitHub PR review comments for specified PR numbers or all open PRs using agents to address issues, push fixes, and generate summaries.