Comments (11)
Thos are pretty bad error messages from their API if you ask me 🙈, it had me running in circles. Would you be open for parsing these error messages or even wrapping the entire exception with a custom error message, like:
catch (e) {
core.error("Unable to enable automerge. Make sure you have enabled branch protection with at least one status check marked as required. See https://github.com/peter-evans/enable-pull-request-automerge#conditions for more information.")
throw e
}
from enable-pull-request-automerge.
I would be happy to parse and capture the clean status
error, because I think we can be fairly confident about what that means and how it occurs. I would prefer to capture and handle that one specifically, rather than output a custom error message for all exceptions.
from enable-pull-request-automerge.
Hi. @williamboman I am also getting a similar error :(
Error: ["Pull request Pull request is in unstable status"]
from enable-pull-request-automerge.
I've not seen this error before. Is it happening consistently, or just occasionally?
My best guess is that it's attempting to enable automerge before it's ready
You could try waiting a few seconds in a workflow step to see if that solves it. Perhaps there is a small delay on GitHub's side before the PR is ready, as you suggest.
from enable-pull-request-automerge.
What do you think about doing this inside this workflow instead? I feel like it'd be neat if one did not have to worry about these race conditions. I've come up with a somewhat naive approach in #344. Wdyt?
from enable-pull-request-automerge.
So I actually debugged this a bit closer and I don't believe this is happening because of some race condition, there has to be something else going on. I added a retry mechanism that sleeps for 30s before retrying, but it's still consistently failing with the same error, even if the PR checks are all registered and even completed.
from enable-pull-request-automerge.
I think I know what it might've been. I had not made any checks explicitly required under the repo settings - I had only enabled the checkbox itself. If you don't manually add specific checks that are required I believe GitHub's native automerge feature simply doesn't apply
"from enable-pull-request-automerge.
Ah, yes. You must have at least one required check set.
It's mentioned in the "conditions" section here.
https://github.com/peter-evans/enable-pull-request-automerge#conditions
The clean status
error makes sense now. The pull request had no pending checks and was already able to be merged. I think this error message is new, because when I was developing the action and testing it I never saw that message. Previously, I think it just failed silently.
from enable-pull-request-automerge.
Cool! I went ahead and implemented it in #345! Not sure if you want logging in the helper module, but that's where I'd put it.
from enable-pull-request-automerge.
Merged and released. Thanks!
I think we can consider this closed. If other error messages emerge we can handle those separately.
from enable-pull-request-automerge.
Hi all,
I am facing this issue. Even with all conditions met.
It works when using it in a simple github action but in a composite action it fails with:
Error: Unable to enable automerge. Make sure you have enabled branch protection with at least one status check marked as required. See https://github.com/peter-evans/enable-pull-request-automerge#conditions for more information.
Error: Request failed due to following response errors:
- ["Pull request Pull request is in clean status"]
Maybe it is also related to the fact that the composite action is located in the same repo, where it should open a PR but still it is kind of confusing.
Do you maybe have a an idea?
Quick update: The Pull request was opened against some branch, which did not have any branch protection. It works now.
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
- 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.