-
Notifications
You must be signed in to change notification settings - Fork 59
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 optional auto merge job #40
Conversation
I'm relatively certain this isn't going to work. |
Hmm maybe it would work if you give |
It doesn't. :-( That would actually be very intuitive, but I've done a lot of experimenting with the Actions permissions model in the past (attempting to enable a use-case almost exactly like this one), and it just doesn't work here. The problem, more specifically, is that the Basically, what I want github to do here is grant the write token (as well as full secrets access) to any PRs from people with write access or above, regardless of the PR origin. Such users would be able to push to the upstream anyway, so it wouldn't affect security, but it would make a lot of automation and use-cases possible (especially on private repositories) which are now today impossible. This has been suggested to them as an official feature request, but no word on implementation. |
It looks like there is a workaround: https://github.com/ridedott/merge-me-action#github-actions # Depending on branch protection rules, a manually populated
# `GITHUB_TOKEN_WORKAROUND` environment variable with permissions to
# push to a protected branch must be used. This variable can have an
# arbitrary name, as an example, this repository uses
# `GITHUB_TOKEN_DOTTBOTT`.
#
# When using a custom token, it is recommended to leave the following
# comment for other developers to be aware of the reasoning behind it:
#
# This must be used as GitHub Actions token does not support
# pushing to protected branches.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} The comment refers to https://github.com/ridedott/merge-me-action/blob/master/.github/workflows/continuous-integration.yaml#L178 |
That token would need to be unencrypted though, opening up branch pushing to the entire world. The only way to hide the token from global eyes would be to tuck it into |
Hmm, this is a bit of a rabbit hole. It looks like there were already some improvements: |
E.g. this action has listed |
Ooooooh! This is very nice and yes, I think it could be used to solve this. I'll give this some thought… |
I want to mention that scala steward also has a |
I need to update the PR to v2 of the action - it also shows how to configure it to:
|
@djspiewak you can see it in action in this repo: https://github.com/moia-oss/scynamo/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged |
Might try this again in |
Using https://github.com/marketplace/actions/merge-me
Fixes #39