Comments (7)
someone who does not have write permissions to the repository
I misread this bit of context! It's not acting as I was expecting because I am the repo owner. @peter-evans Thanks for the clarification!
Though having a disable option could be handy, for now I'm accepting it as a limitation where maintainers have to manually disable automerge when they make changes themselves. To me this issue can be considered resolved then. But I'll leave it for you to close in case you wanna decide if mutation for disable is worth your time implementing. :)
from enable-pull-request-automerge.
@alfieyfc The documentation suggests that it is automatically disabled when the base
of the PR is changed. I don't think you need to explicitly disable it in a workflow.
After you enable auto-merge for a pull request, if someone who does not have write permissions to the repository pushes new changes to the head branch or switches the base branch of the pull request, auto-merge will be disabled. For example, if a maintainer enables auto-merge for a pull request from a fork, auto-merge will be disabled after a contributor pushes new changes to the pull request.
from enable-pull-request-automerge.
There is a GraphQL mutation for disable, though. So if for some reason the automated disable outlined in the documentation doesn't work for your use case I think I can add it to the action.
https://docs.github.com/en/graphql/reference/mutations#disablepullrequestautomerge
from enable-pull-request-automerge.
I'll close it for now then. It can always be reopened if there is a need for it in future.
from enable-pull-request-automerge.
@peter-evans Hello there 👋 I'm back thinking of reopening this feature request since auto_merge_enabled
had become a pull_request
event type.
The scenario would be someone carelessly enabling auto-merge for a PR that has a base
branch we don't want to allow auto-merging. So the action would quickly check if base
branch is valid for auto-merge. Then, if not, the action will disable it.
I tried searching for other actions that can disable auto-merge but didn't find anything suitable. Any suggestions?
from enable-pull-request-automerge.
After thinking a bit more about this, I'm not sure that adding it to this action makes sense since "enable" is in the title of the action.
I would recommend using github-script to call the disable API. The query should look very similar to the code I have here to enable.
from enable-pull-request-automerge.
@peter-evans Makes sense! I'll try to set it up for my workflow. Thanks for the reply! 🙏
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
- Doesn't work with GitHub Enterprise HOT 1
- 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
- A Personal Access Token is not actually required. A GITHUB_TOKEN will work HOT 4
- 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.