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

Automerge backport PRs #20

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

JackPGreen
Copy link
Contributor

@JackPGreen JackPGreen commented Jan 21, 2025

Backport PRs are raised (at least, when through the GitHub Action) via a bot account (github-actions[bot]) rather than the original PR author. It's easy for the original author to miss that they must merge this PR as it won't appear on their list of authored PRs.

Specifically, this was raised from feedback in hz-docs - one PR could be backported to several versions, and in each PR a CODEOWNER must review and someone must merge the PR - this PR removes the explicit requirement to merge. I don't see a scenario where someone would raise a backport PR without the intention of merging it when possible.

Tested here.

Fixes: #19

@JackPGreen JackPGreen requested a review from ldziedziul January 21, 2025 12:48
@JackPGreen JackPGreen self-assigned this Jan 21, 2025
- name: Enable PR automerge
shell: ${{ env.shell }}
run: |
gh pr merge ${PR_NUMBER} \
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is an important change of the behavior. Perhaps consult with the current users of the script.

Also, I see alternatives:

  • assigning the original PR creator as the reviewer
  • modifying the backport script itself to support --auto-merge flag
  • calling gh pr merge --squash --auto since we're on the newly created backporting branch and gh can infer the PR from the current branch:
gh pr merge --help
Merge a pull request on GitHub.

Without an argument, the pull request that belongs to the current branch
is selected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an important change of the behavior. Perhaps consult with the current users of the script.

Despite being raised from docs-feedback, similar feedback has arisen there as well - https://hazelcast.slack.com/archives/C07K9EK3V18/p1737475848890849?thread_ts=1737464062.993599&cid=C07K9EK3V18

I'll split this PR so we can get the comment fix earlier.

Also, I see alternatives:

  • assigning the original PR creator as the reviewer
  • modifying the backport script itself to support --auto-merge flag
  • calling gh pr merge --squash --auto since we're on the newly created backporting branch and gh can infer the PR from the current branch:
gh pr merge --help
Merge a pull request on GitHub.

Without an argument, the pull request that belongs to the current branch
is selected.

Discussed here.

Copy link
Collaborator

@ldziedziul ldziedziul Jan 21, 2025

Choose a reason for hiding this comment

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

I'll split this PR so we can get the comment fix earlier.

Sounds good

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'll split this PR so we can get the comment fix earlier.

#21

.github/actions/backport/action.yml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backport PRs should auto-merge
2 participants