Skip to content

CNTRLPLANE-2561: Add automated PR review comment handling for HyperShift - #73642

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:masterfrom
bryan-cox:CNTRLPLANE-2561
Jan 30, 2026
Merged

openshift-merge-bot[bot] merged 2 commits into
openshift:masterfrom
bryan-cox:CNTRLPLANE-2561

Conversation

@bryan-cox

@bryan-cox bryan-cox commented Jan 16, 2026

Copy link
Copy Markdown
Member

Summary

Adds the HyperShift Review Agent workflow - an automated system that uses Claude Code to address PR review comments on PRs created by the HyperShift Jira Agent.

What This PR Adds

Step Registry Workflow

  • hypershift-review-agent workflow with setup and process steps
  • Queries GitHub for open PRs authored by app/hypershift-jira-solve-ci
  • Analyzes review threads to identify comments needing attention
  • Runs Claude Code to address review feedback
  • Pushes changes back to PR branches

CI Jobs

Job Type Schedule
periodic-review-agent Periodic Every 3 hours (8:00-23:00 UTC)
review-agent-single-pr Presubmit (optional) On-demand via /test review-agent-single-pr

Configuration

  • Uses claude-ai-helpers container image
  • Authenticates via Vertex AI (GCP service account)
  • Processes up to 10 PRs per run (configurable via REVIEW_AGENT_MAX_PRS)

Files Changed

  • ci-operator/config/openshift/hypershift/openshift-hypershift-main.yaml - Job definitions
  • ci-operator/step-registry/hypershift/review-agent/ - New workflow and step definitions
  • ci-operator/jobs/openshift/hypershift/ - Generated Prow jobs

🤖 Generated with Claude Code

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 16, 2026
@openshift-ci-robot

openshift-ci-robot commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

@bryan-cox: This pull request references CNTRLPLANE-2561 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary

Add a Prow job that automatically addresses review comments on PRs created by the jira-solve job using Claude Code's /utils:address-reviews command from the ai-helpers repository.

What it does

  1. Queries GitHub for open PRs from the hypershift-community fork that were created by the jira-agent
  2. Identifies PRs with unresolved review threads using GitHub's GraphQL API
  3. Runs Claude Code with the /utils:address-reviews command to analyze and address review comments
  4. Pushes changes back to the PR branch

Workflow steps

  • Setup: Verifies Claude CLI is available
  • Process: Queries GitHub, filters PRs with pending reviews, runs Claude for each, pushes changes

Configuration

  • Runs daily at 10:00 AM UTC (1 hour after jira-agent at 9:00 AM UTC)
  • Processes up to 5 PRs per run (configurable via REVIEW_AGENT_MAX_PRS)
  • Uses same GitHub App tokens and Vertex AI authentication as jira-agent
  • Rate limits at 60 seconds between PRs

Files added

  • ci-operator/step-registry/hypershift/review-agent/ - Workflow and step definitions
  • ci-operator/config/openshift/hypershift/openshift-hypershift-main.yaml - Periodic job config

Relationship to Jira Agent

This is a companion workflow to the hypershift-jira-agent (PR #70147):

Aspect Jira Agent Review Agent
Purpose Create PRs from Jira issues Address review comments on PRs
Schedule Daily 9:00 AM UTC Daily 10:00 AM UTC
Input Jira issues with issue-for-agent label PRs created by Jira Agent
Output Draft PRs Updated PR branches
Command /jira-solve /utils:address-reviews

Jira

https://issues.redhat.com/browse/CNTRLPLANE-2561


🤖 Generated with Claude Code via /jira:solve [CNTRLPLANE-2561](https://issues.redhat.com//browse/CNTRLPLANE-2561)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 16, 2026
@openshift-ci

openshift-ci Bot commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot

openshift-ci-robot commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

@bryan-cox: This pull request references CNTRLPLANE-2561 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary

Add a Prow job that automatically addresses review comments on PRs created by the jira-solve job using Claude Code's /utils:address-reviews command from the ai-helpers repository.

What it does

  1. Queries GitHub for open PRs from the hypershift-community fork that were created by the jira-agent
  2. Identifies PRs with unresolved review threads using GitHub's GraphQL API
  3. Runs Claude Code with the /utils:address-reviews command to analyze and address review comments
  4. Pushes changes back to the PR branch

Workflow steps

  • Setup: Verifies Claude CLI is available
  • Process: Queries GitHub, filters PRs with pending reviews, runs Claude for each, pushes changes

Configuration

  • Runs daily at 10:00 AM UTC (1 hour after jira-agent at 9:00 AM UTC)
  • Processes up to 5 PRs per run (configurable via REVIEW_AGENT_MAX_PRS)
  • Uses same GitHub App tokens and Vertex AI authentication as jira-agent
  • Rate limits at 60 seconds between PRs

Files added

  • ci-operator/step-registry/hypershift/review-agent/ - Workflow and step definitions
  • ci-operator/config/openshift/hypershift/openshift-hypershift-main.yaml - Periodic job config

Relationship to Jira Agent

This is a companion workflow to the hypershift-jira-agent (PR #70147):

Aspect Jira Agent Review Agent
Purpose Create PRs from Jira issues Address review comments on PRs
Schedule Daily 9:00 AM UTC Daily 10:00 AM UTC
Input Jira issues with issue-for-agent label PRs created by Jira Agent
Output Draft PRs Updated PR branches
Command /jira-solve /utils:address-reviews

Jira

https://issues.redhat.com/browse/CNTRLPLANE-2561


🤖 Generated with Claude Code via /jira:solve [CNTRLPLANE-2561](https://issues.redhat.com//browse/CNTRLPLANE-2561)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 16, 2026
@bryan-cox
bryan-cox force-pushed the CNTRLPLANE-2561 branch 3 times, most recently from b1becbc to 3465b41 Compare January 16, 2026 19:07
@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

Add a new Prow workflow that automatically addresses review comments
on PRs created by the jira-agent using Claude Code's /utils:address-reviews
command from the ai-helpers repository.

The workflow:
- Queries GitHub for open PRs from hypershift-community fork
- Identifies PRs with "Generated with Claude Code" attribution
- Checks for unresolved review threads using GraphQL API
- Runs /utils:address-reviews on each PR with pending reviews
- Pushes changes back to the fork branch

This is a companion workflow to the hypershift-jira-agent that creates
the initial PRs. The review-agent runs 1 hour after the jira-agent to
pick up any review comments on newly created PRs.

Ref: CNTRLPLANE-2561

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

…s format

The authorization check was failing for users like jparrill who are
listed in OWNERS_ALIASES but not recognized because the OWNERS file
uses a filters-based format instead of simple top-level lists.

Changes:
- Replace get_owners_and_aliases() and is_in_owners_file() with a single
  get_all_authorized_users() function that builds one combined set
- Add all users from all aliases in OWNERS_ALIASES upfront
- Parse both simple format (top-level approvers/reviewers) and
  filters-based format (nested under filters key)
- Simplify is_authorized_author() to check combined set then fallback
  to org membership

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@bryan-cox: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-hypershift-main-review-agent-single-pr openshift/hypershift presubmit Presubmit changed
periodic-ci-openshift-hypershift-main-periodic-review-agent N/A periodic Periodic changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@csrwng

csrwng commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@csrwng

csrwng commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

/pj-rehearse ack

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 30, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@csrwng: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot openshift-ci-robot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jan 30, 2026
@openshift-ci

openshift-ci Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox, csrwng

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci

openshift-ci Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

@bryan-cox: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 3909cf0 into openshift:master Jan 30, 2026
18 checks passed
richardsonnick pushed a commit to richardsonnick/release that referenced this pull request Feb 10, 2026
…ift (openshift#73642)

* feat(step-registry): Add hypershift-review-agent workflow

Add a new Prow workflow that automatically addresses review comments
on PRs created by the jira-agent using Claude Code's /utils:address-reviews
command from the ai-helpers repository.

The workflow:
- Queries GitHub for open PRs from hypershift-community fork
- Identifies PRs with "Generated with Claude Code" attribution
- Checks for unresolved review threads using GraphQL API
- Runs /utils:address-reviews on each PR with pending reviews
- Pushes changes back to the fork branch

This is a companion workflow to the hypershift-jira-agent that creates
the initial PRs. The review-agent runs 1 hour after the jira-agent to
pick up any review comments on newly created PRs.

Ref: CNTRLPLANE-2561

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(step-registry): hypershift-review-agent OWNERS parsing for filters format

The authorization check was failing for users like jparrill who are
listed in OWNERS_ALIASES but not recognized because the OWNERS file
uses a filters-based format instead of simple top-level lists.

Changes:
- Replace get_owners_and_aliases() and is_in_owners_file() with a single
  get_all_authorized_users() function that builds one combined set
- Add all users from all aliases in OWNERS_ALIASES upfront
- Parse both simple format (top-level approvers/reviewers) and
  filters-based format (nested under filters key)
- Simplify is_authorized_author() to check combined set then fallback
  to org membership

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
richardsonnick pushed a commit to richardsonnick/release that referenced this pull request Feb 18, 2026
…ift (openshift#73642)

* feat(step-registry): Add hypershift-review-agent workflow

Add a new Prow workflow that automatically addresses review comments
on PRs created by the jira-agent using Claude Code's /utils:address-reviews
command from the ai-helpers repository.

The workflow:
- Queries GitHub for open PRs from hypershift-community fork
- Identifies PRs with "Generated with Claude Code" attribution
- Checks for unresolved review threads using GraphQL API
- Runs /utils:address-reviews on each PR with pending reviews
- Pushes changes back to the fork branch

This is a companion workflow to the hypershift-jira-agent that creates
the initial PRs. The review-agent runs 1 hour after the jira-agent to
pick up any review comments on newly created PRs.

Ref: CNTRLPLANE-2561

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(step-registry): hypershift-review-agent OWNERS parsing for filters format

The authorization check was failing for users like jparrill who are
listed in OWNERS_ALIASES but not recognized because the OWNERS file
uses a filters-based format instead of simple top-level lists.

Changes:
- Replace get_owners_and_aliases() and is_in_owners_file() with a single
  get_all_authorized_users() function that builds one combined set
- Add all users from all aliases in OWNERS_ALIASES upfront
- Parse both simple format (top-level approvers/reviewers) and
  filters-based format (nested under filters key)
- Simplify is_authorized_author() to check combined set then fallback
  to org membership

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
memodi pushed a commit to memodi/release that referenced this pull request Feb 18, 2026
…ift (openshift#73642)

* feat(step-registry): Add hypershift-review-agent workflow

Add a new Prow workflow that automatically addresses review comments
on PRs created by the jira-agent using Claude Code's /utils:address-reviews
command from the ai-helpers repository.

The workflow:
- Queries GitHub for open PRs from hypershift-community fork
- Identifies PRs with "Generated with Claude Code" attribution
- Checks for unresolved review threads using GraphQL API
- Runs /utils:address-reviews on each PR with pending reviews
- Pushes changes back to the fork branch

This is a companion workflow to the hypershift-jira-agent that creates
the initial PRs. The review-agent runs 1 hour after the jira-agent to
pick up any review comments on newly created PRs.

Ref: CNTRLPLANE-2561

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(step-registry): hypershift-review-agent OWNERS parsing for filters format

The authorization check was failing for users like jparrill who are
listed in OWNERS_ALIASES but not recognized because the OWNERS file
uses a filters-based format instead of simple top-level lists.

Changes:
- Replace get_owners_and_aliases() and is_in_owners_file() with a single
  get_all_authorized_users() function that builds one combined set
- Add all users from all aliases in OWNERS_ALIASES upfront
- Parse both simple format (top-level approvers/reviewers) and
  filters-based format (nested under filters key)
- Simplify is_authorized_author() to check combined set then fallback
  to org membership

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
dhensel-rh pushed a commit to dhensel-rh/release that referenced this pull request Feb 19, 2026
…ift (openshift#73642)

* feat(step-registry): Add hypershift-review-agent workflow

Add a new Prow workflow that automatically addresses review comments
on PRs created by the jira-agent using Claude Code's /utils:address-reviews
command from the ai-helpers repository.

The workflow:
- Queries GitHub for open PRs from hypershift-community fork
- Identifies PRs with "Generated with Claude Code" attribution
- Checks for unresolved review threads using GraphQL API
- Runs /utils:address-reviews on each PR with pending reviews
- Pushes changes back to the fork branch

This is a companion workflow to the hypershift-jira-agent that creates
the initial PRs. The review-agent runs 1 hour after the jira-agent to
pick up any review comments on newly created PRs.

Ref: CNTRLPLANE-2561

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(step-registry): hypershift-review-agent OWNERS parsing for filters format

The authorization check was failing for users like jparrill who are
listed in OWNERS_ALIASES but not recognized because the OWNERS file
uses a filters-based format instead of simple top-level lists.

Changes:
- Replace get_owners_and_aliases() and is_in_owners_file() with a single
  get_all_authorized_users() function that builds one combined set
- Add all users from all aliases in OWNERS_ALIASES upfront
- Parse both simple format (top-level approvers/reviewers) and
  filters-based format (nested under filters key)
- Simplify is_authorized_author() to check combined set then fallback
  to org membership

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
weinliu pushed a commit to weinliu/release that referenced this pull request Mar 6, 2026
…ift (openshift#73642)

* feat(step-registry): Add hypershift-review-agent workflow

Add a new Prow workflow that automatically addresses review comments
on PRs created by the jira-agent using Claude Code's /utils:address-reviews
command from the ai-helpers repository.

The workflow:
- Queries GitHub for open PRs from hypershift-community fork
- Identifies PRs with "Generated with Claude Code" attribution
- Checks for unresolved review threads using GraphQL API
- Runs /utils:address-reviews on each PR with pending reviews
- Pushes changes back to the fork branch

This is a companion workflow to the hypershift-jira-agent that creates
the initial PRs. The review-agent runs 1 hour after the jira-agent to
pick up any review comments on newly created PRs.

Ref: CNTRLPLANE-2561

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(step-registry): hypershift-review-agent OWNERS parsing for filters format

The authorization check was failing for users like jparrill who are
listed in OWNERS_ALIASES but not recognized because the OWNERS file
uses a filters-based format instead of simple top-level lists.

Changes:
- Replace get_owners_and_aliases() and is_in_owners_file() with a single
  get_all_authorized_users() function that builds one combined set
- Add all users from all aliases in OWNERS_ALIASES upfront
- Parse both simple format (top-level approvers/reviewers) and
  filters-based format (nested under filters key)
- Simplify is_authorized_author() to check combined set then fallback
  to org membership

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
sdodson pushed a commit to sdodson/release that referenced this pull request Mar 8, 2026
…ift (openshift#73642)

* feat(step-registry): Add hypershift-review-agent workflow

Add a new Prow workflow that automatically addresses review comments
on PRs created by the jira-agent using Claude Code's /utils:address-reviews
command from the ai-helpers repository.

The workflow:
- Queries GitHub for open PRs from hypershift-community fork
- Identifies PRs with "Generated with Claude Code" attribution
- Checks for unresolved review threads using GraphQL API
- Runs /utils:address-reviews on each PR with pending reviews
- Pushes changes back to the fork branch

This is a companion workflow to the hypershift-jira-agent that creates
the initial PRs. The review-agent runs 1 hour after the jira-agent to
pick up any review comments on newly created PRs.

Ref: CNTRLPLANE-2561

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(step-registry): hypershift-review-agent OWNERS parsing for filters format

The authorization check was failing for users like jparrill who are
listed in OWNERS_ALIASES but not recognized because the OWNERS file
uses a filters-based format instead of simple top-level lists.

Changes:
- Replace get_owners_and_aliases() and is_in_owners_file() with a single
  get_all_authorized_users() function that builds one combined set
- Add all users from all aliases in OWNERS_ALIASES upfront
- Parse both simple format (top-level approvers/reviewers) and
  filters-based format (nested under filters key)
- Simplify is_authorized_author() to check combined set then fallback
  to org membership

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
tareqalayan pushed a commit to tareqalayan/release that referenced this pull request Mar 13, 2026
…ift (openshift#73642)

* feat(step-registry): Add hypershift-review-agent workflow

Add a new Prow workflow that automatically addresses review comments
on PRs created by the jira-agent using Claude Code's /utils:address-reviews
command from the ai-helpers repository.

The workflow:
- Queries GitHub for open PRs from hypershift-community fork
- Identifies PRs with "Generated with Claude Code" attribution
- Checks for unresolved review threads using GraphQL API
- Runs /utils:address-reviews on each PR with pending reviews
- Pushes changes back to the fork branch

This is a companion workflow to the hypershift-jira-agent that creates
the initial PRs. The review-agent runs 1 hour after the jira-agent to
pick up any review comments on newly created PRs.

Ref: CNTRLPLANE-2561

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(step-registry): hypershift-review-agent OWNERS parsing for filters format

The authorization check was failing for users like jparrill who are
listed in OWNERS_ALIASES but not recognized because the OWNERS file
uses a filters-based format instead of simple top-level lists.

Changes:
- Replace get_owners_and_aliases() and is_in_owners_file() with a single
  get_all_authorized_users() function that builds one combined set
- Add all users from all aliases in OWNERS_ALIASES upfront
- Parse both simple format (top-level approvers/reviewers) and
  filters-based format (nested under filters key)
- Simplify is_authorized_author() to check combined set then fallback
  to org membership

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
eliorerz pushed a commit to eliorerz/release that referenced this pull request Jun 3, 2026
…ift (openshift#73642)

* feat(step-registry): Add hypershift-review-agent workflow

Add a new Prow workflow that automatically addresses review comments
on PRs created by the jira-agent using Claude Code's /utils:address-reviews
command from the ai-helpers repository.

The workflow:
- Queries GitHub for open PRs from hypershift-community fork
- Identifies PRs with "Generated with Claude Code" attribution
- Checks for unresolved review threads using GraphQL API
- Runs /utils:address-reviews on each PR with pending reviews
- Pushes changes back to the fork branch

This is a companion workflow to the hypershift-jira-agent that creates
the initial PRs. The review-agent runs 1 hour after the jira-agent to
pick up any review comments on newly created PRs.

Ref: CNTRLPLANE-2561

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(step-registry): hypershift-review-agent OWNERS parsing for filters format

The authorization check was failing for users like jparrill who are
listed in OWNERS_ALIASES but not recognized because the OWNERS file
uses a filters-based format instead of simple top-level lists.

Changes:
- Replace get_owners_and_aliases() and is_in_owners_file() with a single
  get_all_authorized_users() function that builds one combined set
- Add all users from all aliases in OWNERS_ALIASES upfront
- Parse both simple format (top-level approvers/reviewers) and
  filters-based format (nested under filters key)
- Simplify is_authorized_author() to check combined set then fallback
  to org membership

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants