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

meta: automatically update PRs that have auto merge enabled #17097

Merged
merged 15 commits into from Feb 18, 2024
Merged

Conversation

ephys
Copy link
Member

@ephys ephys commented Feb 17, 2024

This PR adds a replacement for the merge queue. Instead of using the merge queue, we can assign the automerge label to a PR to make the CI automatically merge the PR when ready, as well as update it if it becomes outdated.

Added the automerge label on this PR to test it.

@ephys ephys added automerge and removed automerge labels Feb 17, 2024
@ephys ephys marked this pull request as ready for review February 17, 2024 20:35
.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
.github/workflows/automerge.yml Outdated Show resolved Hide resolved
@ephys ephys marked this pull request as draft February 17, 2024 21:06
@ephys ephys added automerge and removed automerge labels Feb 17, 2024
@ephys ephys marked this pull request as ready for review February 17, 2024 21:13
@ephys ephys marked this pull request as draft February 17, 2024 21:14
@ephys ephys marked this pull request as ready for review February 17, 2024 21:15
@ephys
Copy link
Member Author

ephys commented Feb 17, 2024

Hmmm. The CI checks are not running and I don't know if that's because the PR was a draft or if it's because a bot added the merge commit

When a pull request is merged by this action, the merge will not trigger other GitHub workflows. Similarly, when another GitHub workflow creates a pull request, this action will not be triggered. This is because an action in a workflow run can't trigger a new workflow run. However, the workflow_run event is triggered as expected.

I guess we'll see the next time something is merged


Also I'm realizing that we don't need the bot to handle the merging into develop part. We can synchronize the automerge label with the "enable auto-merge" button, and have it only auto-update instead.

Keeping undrafted to test things, sorry for the notifications. I'll request a re-review when ready

@ephys ephys marked this pull request as draft February 17, 2024 21:47
@ephys ephys changed the title meta: implement automerge meta: automatically update PRs that have auto merge enabled Feb 17, 2024
@ephys ephys removed the automerge label Feb 17, 2024
@ephys
Copy link
Member Author

ephys commented Feb 17, 2024

OK, new approach! This new version does not merge the PR to the target branch anymore.

Instead, we'll use github's native auto-merge, and this new action will keep the PR updated so the automerge can happen. It will run every time a commit is added to main, and will merge main back into every PR that targets it and has auto-merge enabled

@ephys ephys marked this pull request as ready for review February 17, 2024 22:22
@ephys ephys requested a review from WikiRik February 17, 2024 22:22
@ephys ephys enabled auto-merge (squash) February 18, 2024 13:06
@ephys ephys merged commit e863fc1 into main Feb 18, 2024
51 checks passed
@ephys ephys deleted the ephys/automerge branch February 18, 2024 13:25
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.

None yet

2 participants