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

Auto merge main branch on update for branches with auto-merge enabled #306

Merged
merged 2 commits into from
Apr 23, 2021

Conversation

mbarrien
Copy link
Contributor

@mbarrien mbarrien commented Apr 22, 2021

Adds auto-updating of PR branches with the content of the base branch, if the PR branch is marked for auto-merge in Github.

I have examined the Typescript code in https://github.com/tibdex/auto-update/blob/main/src/index.ts for security but have not examined the Javascript that it compiles into, and I have also examined the Github Action that they use to release new Github Actions versions. This PR specifically locks the branch to tag v2.1.2 rather than v2; the underlying release process reassigns the vX and vX.Y tag on minor and patch releases, and this hopefully minimizes (although does not eliminate) the possibility of malicious code being introduce into the action.

Note that we have set up the action to only trigger on pushes to main branch; if a PR has a base branch that is not main, the action is not triggered automatically. However, the next time main is pushed to, it will run on all branches, including branches where main is not the target.

In the case of merge conflicts, the action will add a comment to the PR and not merge, which should hopefully notify the PR author to take action.

This is intended to be a replacement for the use of CZI's auto-merge bot; the combination of this Github Action and Github auto-merge should fully replace the need for the bot.

@czimergebot czimergebot merged commit e68091b into main Apr 23, 2021
@czimergebot czimergebot deleted the mbarrien/auto-update branch April 23, 2021 17:29
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.

3 participants