Comments (15)
@Celebrate-Reinhard
i did not split the automerge part to be in a seperated yml workflow
the checks and the automerge is in the same yml in my case
try to check it at the same way , also verify that atleast one check that you are running is required ( you can set it to be required in the protected branch rule ) .
i also made sure that the automerge job runs first
`
jobs:
AutoMerge_PRClose:
runs-on: preProdCi
timeout-minutes: 30
steps:
- uses: actions-ecosystem/action-add-labels@v1
with:
labels: automerge
- uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.MERGE_SECRET }}
pull-request-number: ${{github.event.pull_request.number}}
merge-method: squash
create_virtual_environment:
runs-on: preProdCi
needs: [ AutoMerge_PRClose ]
`
from enable-pull-request-automerge.
Thank you, @izavads!
also verify that atleast one check that you are running is required ( you can set it to be required in the protected branch rule ) .
This is exactly what I missed!
i did not split the automerge part to be in a seperated yml workflow
I also reverted my split and it's now again like desribed yesterday.
Details for everyone with the same issue like me.
This is how it should look like:
I just had to define the CI jobs as "required before merging"
Before, the CI jobs ran and they even could fail, but they were not required. So the PR was always in a merge ready state from the very beginning. And being in that state the auto-merge flag cannot be set; not by UI and not by @peter-evans 's action.
from enable-pull-request-automerge.
I think this error should be caught and display a more helpful error message, basically extending the error message matching that was done in #345, I'll open a PR
from enable-pull-request-automerge.
👍 We're observing the same issue
from enable-pull-request-automerge.
same error here
some of my config details...
- name: Create Pull Request
id: stepIdCpr
uses: peter-evans/create-pull-request@v4
with:
branch: acceptance-promotion
token: ${{ secrets.... }}
- name: Enable Pull Request Automerge
if: steps.stepIdCpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.... }}
pull-request-number: ${{ steps.stepIdCpr.outputs.pull-request-number }}
merge-method: merge
...and debug output that might help investigating the issue:
##[debug]Evaluating condition for step: 'Enable Pull Request Automerge'
##[debug]Evaluating: (success() && (steps.stepIdCpr.outputs.pull-request-operation == 'created'))
...
##[debug]......Evaluating String:
##[debug]......=> 'pull-request-operation'
##[debug]....=> 'created'
...
##[debug]Expanded: (true && ('created' == 'created'))
##[debug]Result: true
##[debug]Starting: Enable Pull Request Automerge
##[debug]Loading inputs
##[debug]Evaluating: secrets....
...
##[debug]Evaluating: steps.stepIdCpr.outputs.pull-request-number
...
##[debug]Result: '42'
##[debug]Evaluating: github.repository
...
##[debug]Loading env
Run peter-evans/enable-pull-request-automerge@v2
...
Fetching pull request ID
##[debug]PullRequestId: 'PR_...
Enabling auto-merge on pull request ID PR_...
Error: Request failed due to following response errors:
- ["Pull request Pull request is in unstable status"]
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Enable Pull Request Automerge
from enable-pull-request-automerge.
Since you all seemed to experience this at the same time, it's likely that it's an issue on GitHub's side. The action itself has not changed in any way.
from enable-pull-request-automerge.
@peter-evans Thanks for the quick answer!
In my case: I try to use your (great) action for just some days now. So I cannot ensure that it worked before.
@novotl @izavads Did it work for you before?
from enable-pull-request-automerge.
@Celebrate-Reinhard I am a new user as well.
from enable-pull-request-automerge.
Ah, my misunderstanding. In that case, please check that you are fulfilling the conditions described here:
https://github.com/peter-evans/enable-pull-request-automerge#conditions
from enable-pull-request-automerge.
@peter-evans , yeah I've created a PAT and using it as a secret , auto merge is also enabled under the pull request setting. still getting the same message.
from enable-pull-request-automerge.
@peter-evans @novotl @Celebrate-Reinhard
Thanks Peter , I was missing 1 condition (3) : 'The pull request must be in a state where requirements have not yet been satisfied.'
My issue was that the automerge job was set to wait for the job that makes the state to be satisfied , which breaks the condition mentioned above ....
Once moved the automerge job to be the first job without any dependency it works as expected .
from enable-pull-request-automerge.
Once moved the automerge job to be the first job without any dependency it works as expected .
Can you give more details how exactly you did it?
I tried the same and split them up into two different workflows. -> Same error:
While some checks are still running (and therefor the auto-merge requirements are not satisfied), the auto merge is already failing 🤔
In the screenshot the button already says "Merge pull request". I have the feeling that that is already wrong. Shouldn't that be anything like "prepare for automerge"?
from enable-pull-request-automerge.
@peter-evans suggestion for making your docu even clearer:
The pull request base must have a branch protection rule with at least one requirement enabled.
In most cases a good candidate for this is a CI job with integration tests that runs for every PR anyway. Add that one inSettings > Branches > Branch protection rule > Require status checks to pass before merging
Thank you for your help and the great action you created!
from enable-pull-request-automerge.
In our case another repo admin removed the branch protection rule, so there was no required condition to wait for and it could be merged immediately. After adding back the required check all works fine 👍 .
from enable-pull-request-automerge.
Thanks @williamboman
Released as v2.2.0
/ v2
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
- 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.