Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow for automatically rebasing open PRs #2612

Conversation

timflannagan
Copy link
Contributor

Description of the change:
Introduce a workflow that's reponsible for automatically rebasing open
PRs when a commit has landed in the default (e.g. master) branch. Ensure
a comment is posted on that PR when the rebasing action job has failed.

Motivation for the change:
This repository currently specifies the "require branches to be up-to-date before merging" branch protection rule for the master branch to avoid merging PRs that break or regress master builds.

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive

Introduce a workflow that's reponsible for automatically rebasing open
PRs when a commit has landed in the default (e.g. master) branch. Ensure
a comment is posted on that PR when the rebasing action job has failed.

Signed-off-by: timflannagan <timflannagan@gmail.com>
@openshift-ci openshift-ci bot requested review from awgreene and exdx February 3, 2022 18:39
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2022
Comment on lines +10 to +12
- uses: peter-evans/rebase@v1
with:
base: master
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we'll need to give this workflow a custom PAT token to ensure that automatic rebasing works as intended. We've seen in the o-f/combo repository PRs that are way behind the latest HEAD of master fail to be rebased when commits that change the workflow definitions as doing so requires the workflow PAT token scope to be present.

Copy link
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

Great work @timflannagan, we'll keep an eye out for the need for a PAT token.

@openshift-ci
Copy link

openshift-ci bot commented Feb 3, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awgreene, timflannagan

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [awgreene,timflannagan]

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

@awgreene
Copy link
Member

awgreene commented Feb 3, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 3, 2022
@openshift-merge-robot openshift-merge-robot merged commit ac4de75 into operator-framework:master Feb 3, 2022
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants