Comments (4)
Hi @grintor
Thank you for sharing this workflow. I'm aware of pull_request_target
being a workaround for needing a PAT, but was a bit hesitant to suggest this because it can be misused and potentially dangerous. However, it does look like you have made it safe with the USER_ALLOWLIST
. I still would recommend people use a PAT, but I'm sure some users would prefer this solution.
When I have some time I'll test this out and likely add it to the readme. For now I'll leave this issue open for people to find. Thanks!
from enable-pull-request-automerge.
Thanks @peter-evans,
I did fine one caveat in doing it this way though. Since "events triggered by the GITHUB_TOKEN will not create a new workflow run", you cannot have any workflows that are triggered by the merge event created by this workflow.
So for example, if you have some CD workflow meant to deploy the main branch upon a new merge, that workflow will not be triggered when using a GITHUB_TOKEN here. That may or may not affect a given repository, but it's good to be aware of for when it does. I was scratching my head for quite a while trying to figure out why another workflow wasn't running on my main branch merges.
from enable-pull-request-automerge.
Ah yes, that is quite a big downside. I expect most use cases will have a workflow that runs on push to the main branch.
from enable-pull-request-automerge.
I had time to test auto-merging dependabot PRs. I've added an example in the readme.
https://github.com/peter-evans/enable-pull-request-automerge#dependabot-example
The conclusion is the same, you can use GITHUB_TOKEN
but the merge won't trigger further workflow runs. Use a PAT if that is necessary.
from enable-pull-request-automerge.
Related Issues (20)
- Unable to auto approve HOT 3
- Failing to auto-merge pull request to separate repository HOT 2
- Branch is not deleted HOT 1
- step "Enable Pull Request Automerge" has been skipping HOT 4
- Auto merge fails with node warnings HOT 6
- Getting warning in actions about unexpected input 'merge-method' HOT 3
- Automerge can't find recently created PR HOT 2
- Feat: Add https proxy env support HOT 2
- Error: Can't enable auto-merge for this pull request. HOT 3
- Error: Pull Request is not mergable HOT 2
- Error: Could not resolve to a PullRequest with the number of 0.
- Error: This endpoint requires you to be authenticated. HOT 5
- Error "Pull request is in clean status" HOT 11
- Pull request is in unstable status HOT 15
- Automerging the PR vs enabling the automerge flag HOT 1
- Does this action work with merge queues? HOT 2
- Action doesn't work without "Require approvals" HOT 2
- Action fails after new release v2.4.0 HOT 6
- Alternative to approve pull request action HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enable-pull-request-automerge.