Skip to content
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

Cannot create an auto-merge request when all requirements have already been passed #23

Open
alexwilson opened this issue Mar 10, 2021 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@alexwilson
Copy link
Owner

alexwilson commented Mar 10, 2021

When all PR requirements have already been met, it's not possible to enable auto-merge. Confusingly GitHub's API doesn't return an error message when this has happened.

@alexwilson
Copy link
Owner Author

I'm not sure what the "correct" thing to do here should be. Options include:

  1. Check for any pending requirements, and fail the workflow when there are none
  2. Attempt to "merge" when requirements have been met?

To work around this in this repository, I ordered the approval task after the auto-merge one: https://github.com/alexwilson/enable-github-automerge-action/blob/main/.github/workflows/auto-merge-dependabot.yml

@alexwilson alexwilson added bug Something isn't working help wanted Extra attention is needed labels Mar 15, 2021
@JakeChampion
Copy link
Collaborator

I think it would be perfectly fine to document that the auto-merge should be one of the first steps in a workflow, and that it should definitely run before any automatic approval step.

@JakeChampion
Copy link
Collaborator

@alexwilson, it looks like this also happens if there are no required checks on a project. -- Financial-Times/origami-specialist-title-logos#66

@alexwilson
Copy link
Owner Author

Yeah, I'm not sure what we should do in that case @JakeChampion. Is using this library a fair enough intent that a user does want something to be merged, even with no checks?

Perhaps a new configuration option would accommodate this?

@JakeChampion
Copy link
Collaborator

Yeah, I'm not sure what we should do in that case @JakeChampion. Is using this library a fair enough intent that a user does want something to be merged, even with no checks?

Perhaps a new configuration option would accommodate this?

I personally would want the action by default to error out in the scenario where there are no required checks with a message which gives the different ways to stop it erroring out:
Way 1 - Turn on a setting in the action's config to not error if no required checks
Way 2 - Add at-least one required check to the project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants