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

AutoMerge via GraphQL mutation? #78

Closed
falconmick opened this issue Jun 25, 2021 · 3 comments
Closed

AutoMerge via GraphQL mutation? #78

falconmick opened this issue Jun 25, 2021 · 3 comments
Labels
wontfix This will not be worked on

Comments

@falconmick
Copy link

Ahoy @vsoch thought I would make a separate issue for this, less of an issue more of an idea.

Have you done any looking into enabling auto merge? Theoretically you could just manually form the GraphQL query and just use post like you currently are doing, basically it would be a more conviluted POST request with a weird body instead of a bog standard POST call like you already have. https://docs.github.com/en/graphql/guides/forming-calls-with-graphql

It appears that there isn't a plain ole boring API endpoint for this and it's not a parameter on the Create Pull Request API endpoint unfortunately. I would try to form this as a PR so I could show an example of how it could look but I've never done python and I wouldn't know where to start

the API reference is here:
https://docs.github.com/en/graphql/reference/mutations#enablepullrequestautomerge

@vsoch
Copy link
Owner

vsoch commented Jun 25, 2021

That’s a interesting idea. My personal opinion on the matter is that auto merge is something that can be enabled on the level of the repository, once, and should have thought put into that decision and not dictated by an automated action. From a functional standpoint, if someone wants auto merge they can enable it regardless of any particular workflow, and if they really just want to skip the PR any changes could be pushed directly to the intended branch. So I don’t see a strong use case for the action here, but it would be interesting to think about cases when this would be desirable to be automated.

@falconmick
Copy link
Author

Unless I’m wrong (wouldn’t be first time) the auto merge option just adds a new merge option on PR’s that will once clicked merge the PR after all checks complete. I’m yet to find a way to instruct GitHub to automatically merge prs without any interaction on my behalf. The linked mutation is equivalent to clicking that manual auto merge button that shows up when you’ve enabled the feature

@stale
Copy link

stale bot commented Aug 24, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Aug 24, 2021
@stale stale bot closed this as completed Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants