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 to auto merge PRs #2485

Merged
merged 2 commits into from
Aug 21, 2020

Conversation

michaelbeaumont
Copy link
Contributor

@michaelbeaumont michaelbeaumont commented Jul 27, 2020

Description

With this PR, we can add labels automerge or autosquash to merge the PR when it becomes ready. Additionally, autoupdate will merge changes from the base branch into the PR.

This workflow needs to be in the target branch before it can work (i.e. this PR needs to be merged first)

One small limitation is that the workflow isn't triggered when a PR becomes out of date, it will only update it if another trigger happens and it sees it's out of date.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Added labels for change area (e.g. area/nodegroup), target version (e.g. version/0.12.0) and kind (e.g. kind/improvement)
  • Make sure the title of the PR is a good description that can go into the release notes

@michaelbeaumont
Copy link
Contributor Author

michaelbeaumont commented Jul 27, 2020

Hmm nevermind, the action is essentially useless. There needs to be a GITHUB_TOKEN set because workflow-triggered actions can't trigger other workflows (i.e. the post merge checks won't run) and GITHUB_TOKEN isn't available in forks. :(
pascalgn/automerge-action#46 (comment)

This is mostly alleviated by using the new pull_request_target event.

Copy link
Collaborator

@cPu1 cPu1 left a comment

Choose a reason for hiding this comment

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

Great improvement to the PR workflow! 🎉

It will always fail for forks and it's unlikely that a PR review
will be the step before an automerge (usually the label comes after
an approval OR a check completes).
In cases where it would have triggered the workflow and a merge,
the user can always manually merge after their approval anyway.
@michaelbeaumont michaelbeaumont merged commit 1cc9746 into eksctl-io:master Aug 21, 2020
@michaelbeaumont michaelbeaumont deleted the automerge branch August 21, 2020 09:36
hacktoberfun added a commit to hacktoberfun/hacktoberfest-pr-sink that referenced this pull request Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-and-release skip-release-notes Causes PR not to show in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants