-
Notifications
You must be signed in to change notification settings - Fork 502
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
Auto merge support for GitHub #3368
base: main
Are you sure you want to change the base?
Conversation
Auto merge can be enabled via GitHub CLI. That is actually easy and preinstalled on GH runners |
Hey @mberndt123, thank you for this. I was going to suggest the same thing as @987Nabil (you can see it in action here). What would be your usecase for this instead of just add that at the workflow level? |
Thanks @alejandrohdezma , Well I might not want to enable it indiscriminately but only for the PRs created by scala-steward. It can be done, but I also don't want to adapt the CI configuration for all of the dozens of repositories that I'm working on. It's more convenient to just add a command line flag in the scala-steward configuration. I also think there's ample precedent for this as the equivalent Gitlab option is already supported. |
Yeah, that makes sense. In that case I think it would be simpler to just make the call using the HTTP client than adding Caliban and the GitHub GraphQL definition just for one enpdoint. |
I think using gh cli is preferable. If the underlying call ever changes, the CLI call would probably still look the same. |
Yeah, I agree on that but I don't think we can assume Scala Steward will always run on GH actions |
@alejandrohdezma I think it is okay to assume, that if you open GH prs you run on a machine that has the cli. But adding a little check, if it is there and if not log something like |
@scala-steward-org/core any further opinions on adding a dependency with an external CLI? |
If we propperly documentz that this feature requires the CLI and if the absence of the CLI doesn't break anything it is fine with me. |
I would argue against using the Github CLI for this. As far as I can see, it's a single request to a very simple endpoint, which shouldn't be hard to implement using just Scala and an HTTP client. It's just that I'm too busy to work on this right now. |
Hey there,
I've hacked together something for #1960: Auto-merge support on Github, not really to get it merged in its current form but to get the discussion started.
The issue here is that auto-merge is not available through the Github REST API but only through the GraphQL one.
Here are some questions that need answers:
Needless to say, I haven't tried running this and it doesn't really do error handling either.