Skip to content

Exclude copilot/* branches from migtools branch protection#82189

Open
kaovilai wants to merge 1 commit into
openshift:mainfrom
kaovilai:migtools-branch-protection-exclude-copilot
Open

Exclude copilot/* branches from migtools branch protection#82189
kaovilai wants to merge 1 commit into
openshift:mainfrom
kaovilai:migtools-branch-protection-exclude-copilot

Conversation

@kaovilai

@kaovilai kaovilai commented Jul 21, 2026

Copy link
Copy Markdown
Member

Copilot-authored branches were subject to required PR reviews and enforce_admins like any other branch, since no exclude pattern matched them. This blocks rebase/force-push on Copilot-opened PRs, e.g. migtools/kubevirt-datamover-controller#77.

Adds ^copilot/ to the branch-protection exclude list alongside the existing ^revert-, ^dependabot/, ^konflux-, ^konflux/ patterns, across all 12 migtools repos:

  • filebrowser
  • kopia
  • kubevirt-datamover-controller
  • kubevirt-datamover-plugin
  • kubevirt-velero-plugin
  • oadp-cli
  • oadp-non-admin
  • oadp-vm-file-restore
  • oadp-vmdp
  • udistribution
  • velero-plugin-for-vsm
  • volume-snapshot-mover

Note

Responses generated with Claude

Summary by CodeRabbit

  • Updated branch-protection configuration across all 12 migtools repositories to exclude branches matching ^copilot/.
  • Copilot-authored branches can now bypass required reviews and admin enforcement, enabling rebase and force-push operations for related pull requests.

Copilot-authored branches were subject to required reviews and
enforce_admins like any other branch, blocking rebase/force-push
on PRs such as migtools/kubevirt-datamover-controller#77. Add
^copilot/ to the exclude list alongside the existing revert/
dependabot/konflux exclusions across all 12 migtools repos.

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
@openshift-ci
openshift-ci Bot requested review from awels and eemcmullan July 21, 2026 00:49
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The branch protection exclusion lists for twelve migtools repositories now include the ^copilot/ branch pattern. Other protection and Tide settings remain unchanged.

Changes

Branch protection exclusions

Layer / File(s) Summary
Add copilot/ exclusions
core-services/prow/02_config/migtools/*/_prowconfig.yaml
The twelve repository-specific branch protection configurations exclude branches matching ^copilot/.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: excluding Copilot branches from migtools branch protection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR only changes 12 _prowconfig.yaml branch-protection configs; no test files or Ginkgo titles are modified, so the test-name rule is not implicated.
Test Structure And Quality ✅ Passed PR changes only 12 Prow branch-protection YAMLs; no Ginkgo test code was added or modified, so this check is not applicable.
Microshift Test Compatibility ✅ Passed The PR only changes 12 Prow YAML configs; no Ginkgo test definitions or test code were added or modified.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: The diff only adds ^copilot/ to YAML branch-protection excludes; no Go/Ginkgo tests were added or modified, so SNO compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only Prow branch-protection YAML changed; no deployment manifests, controllers, or scheduling constraints were added.
Ote Binary Stdout Contract ✅ Passed Only Prow YAML branch-protection configs changed; no OTE binary code or stdout writes were modified.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only Prow YAML branch-protection configs changed; no Ginkgo e2e tests or networking code were added, so the IPv6/disconnected check is not applicable.
No-Weak-Crypto ✅ Passed The PR only adds ^copilot/ exclusions in Prow YAML branch-protection configs; no crypto code, weak algorithms, or secret comparisons are present.
Container-Privileges ✅ Passed The PR only changes Prow branch-protection YAML; no container/K8s manifests were touched, and the changed files contain none of the privileged settings.
No-Sensitive-Data-In-Logs ✅ Passed Only branch-protection YAML excludes were changed; no logging statements or sensitive data appeared in the touched files.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaovilai

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 21, 2026
@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 21, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@kaovilai: no rehearsable tests are affected by this change

Note: If this PR includes changes to step registry files (ci-operator/step-registry/) and you expected jobs to be found, try rebasing your PR onto the base branch. This helps pj-rehearse accurately detect changes when the base branch has moved forward.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@core-services/prow/02_config/migtools/filebrowser/_prowconfig.yaml`:
- Line 12: Remove the ^copilot/ branch-name exclusions from the _prowconfig.yaml
files in core-services/prow/02_config/migtools/filebrowser, kopia,
kubevirt-datamover-controller, kubevirt-datamover-plugin,
kubevirt-velero-plugin, oadp-cli, oadp-non-admin, oadp-vm-file-restore,
oadp-vmdp, udistribution, velero-plugin-for-vsm, and volume-snapshot-mover (line
12 in each), or replace them with repository permission controls that identify
the authorized Copilot principal rather than branch names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: fa847e7b-3a4a-4193-8b57-6a8da76c3a28

📥 Commits

Reviewing files that changed from the base of the PR and between 7a105f2 and ae45826.

📒 Files selected for processing (12)
  • core-services/prow/02_config/migtools/filebrowser/_prowconfig.yaml
  • core-services/prow/02_config/migtools/kopia/_prowconfig.yaml
  • core-services/prow/02_config/migtools/kubevirt-datamover-controller/_prowconfig.yaml
  • core-services/prow/02_config/migtools/kubevirt-datamover-plugin/_prowconfig.yaml
  • core-services/prow/02_config/migtools/kubevirt-velero-plugin/_prowconfig.yaml
  • core-services/prow/02_config/migtools/oadp-cli/_prowconfig.yaml
  • core-services/prow/02_config/migtools/oadp-non-admin/_prowconfig.yaml
  • core-services/prow/02_config/migtools/oadp-vm-file-restore/_prowconfig.yaml
  • core-services/prow/02_config/migtools/oadp-vmdp/_prowconfig.yaml
  • core-services/prow/02_config/migtools/udistribution/_prowconfig.yaml
  • core-services/prow/02_config/migtools/velero-plugin-for-vsm/_prowconfig.yaml
  • core-services/prow/02_config/migtools/volume-snapshot-mover/_prowconfig.yaml

- ^dependabot/
- ^konflux-
- ^konflux/
- ^copilot/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Do not use a branch-name prefix as Copilot authentication.

These exclusions bypass the configured reviews and enforce_admins for any principal able to create or update a copilot/* branch; the pattern does not distinguish Copilot-authored branches from attacker- or developer-created branches.

  • core-services/prow/02_config/migtools/filebrowser/_prowconfig.yaml#L12-L12: restrict the namespace at the repository permission layer or remove this exclusion.
  • core-services/prow/02_config/migtools/kopia/_prowconfig.yaml#L12-L12: apply the same identity-based restriction.
  • core-services/prow/02_config/migtools/kubevirt-datamover-controller/_prowconfig.yaml#L12-L12: apply the same identity-based restriction.
  • core-services/prow/02_config/migtools/kubevirt-datamover-plugin/_prowconfig.yaml#L12-L12: apply the same identity-based restriction.
  • core-services/prow/02_config/migtools/kubevirt-velero-plugin/_prowconfig.yaml#L12-L12: apply the same identity-based restriction.
  • core-services/prow/02_config/migtools/oadp-cli/_prowconfig.yaml#L12-L12: apply the same identity-based restriction.
  • core-services/prow/02_config/migtools/oadp-non-admin/_prowconfig.yaml#L12-L12: apply the same identity-based restriction.
  • core-services/prow/02_config/migtools/oadp-vm-file-restore/_prowconfig.yaml#L12-L12: apply the same identity-based restriction.
  • core-services/prow/02_config/migtools/oadp-vmdp/_prowconfig.yaml#L12-L12: apply the same identity-based restriction.
  • core-services/prow/02_config/migtools/udistribution/_prowconfig.yaml#L12-L12: apply the same identity-based restriction.
  • core-services/prow/02_config/migtools/velero-plugin-for-vsm/_prowconfig.yaml#L12-L12: apply the same identity-based restriction.
  • core-services/prow/02_config/migtools/volume-snapshot-mover/_prowconfig.yaml#L12-L12: apply the same identity-based restriction.
📍 Affects 12 files
  • core-services/prow/02_config/migtools/filebrowser/_prowconfig.yaml#L12-L12 (this comment)
  • core-services/prow/02_config/migtools/kopia/_prowconfig.yaml#L12-L12
  • core-services/prow/02_config/migtools/kubevirt-datamover-controller/_prowconfig.yaml#L12-L12
  • core-services/prow/02_config/migtools/kubevirt-datamover-plugin/_prowconfig.yaml#L12-L12
  • core-services/prow/02_config/migtools/kubevirt-velero-plugin/_prowconfig.yaml#L12-L12
  • core-services/prow/02_config/migtools/oadp-cli/_prowconfig.yaml#L12-L12
  • core-services/prow/02_config/migtools/oadp-non-admin/_prowconfig.yaml#L12-L12
  • core-services/prow/02_config/migtools/oadp-vm-file-restore/_prowconfig.yaml#L12-L12
  • core-services/prow/02_config/migtools/oadp-vmdp/_prowconfig.yaml#L12-L12
  • core-services/prow/02_config/migtools/udistribution/_prowconfig.yaml#L12-L12
  • core-services/prow/02_config/migtools/velero-plugin-for-vsm/_prowconfig.yaml#L12-L12
  • core-services/prow/02_config/migtools/volume-snapshot-mover/_prowconfig.yaml#L12-L12
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@core-services/prow/02_config/migtools/filebrowser/_prowconfig.yaml` at line
12, Remove the ^copilot/ branch-name exclusions from the _prowconfig.yaml files
in core-services/prow/02_config/migtools/filebrowser, kopia,
kubevirt-datamover-controller, kubevirt-datamover-plugin,
kubevirt-velero-plugin, oadp-cli, oadp-non-admin, oadp-vm-file-restore,
oadp-vmdp, udistribution, velero-plugin-for-vsm, and volume-snapshot-mover (line
12 in each), or replace them with repository permission controls that identify
the authorized Copilot principal rather than branch names.

@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@kaovilai: 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.

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. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant