You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As is often the case, this new GitHub feature is not exposed via the API (neither REST nor GraphQL). Once it is available in one of the APIs, then the Go client library for that API will need to have the new setting added... and after that, this provider can be updated. It's unfortunately a long cycle.
Reacted by Jono Spiro, Krzysztof Kozmic, Ben Abrams and mattcanty-ikigai
Reacted by Iiro Niinikoski, Carlos Clemente and Kurt McAlpine
@jcudit apparently there is a lib for the graphql API already added to the project: github.com/shurcooL/githubv4
I noticed that the graphql lib (v4) is not used in the repository logic just yet. If one wants to suggest a PR for adding the auto-merge using v4, would that be ok?
This seems to just enable/disable automerge on specific PR; for this to work you have to allow automerge at repository level, and after a brief look at the graphql explorer, it does not seem to be exposed via the v4 API yet.
@RTodorov yes! PRs are welcome in general. However, as pointed out above, the v4 mutation does not apply to the repository level. We will need to wait on better support.
Hello,
I'd like to have this functionality as well so i'm opening an issue with the go-github (and possibly implementing it as well). I hope this is okay 😄
Activity
kpfleming commentedon Jan 5, 2021
As is often the case, this new GitHub feature is not exposed via the API (neither REST nor GraphQL). Once it is available in one of the APIs, then the Go client library for that API will need to have the new setting added... and after that, this provider can be updated. It's unfortunately a long cycle.
entropitor commentedon Feb 17, 2021
The API is actually already setting the value to false when you call it 😭 Is it still not there, or just not documented?
(If you have a repository resource and you change anything else, and the toggle was true, it will be false after apply)
emmekappa commentedon Mar 17, 2021
It's now exposed through a GraphQL mutation
Github thread: https://github.community/t/enabling-auto-merge-on-a-pr-using-the-api/150797/5
GraphQL doc reference: https://docs.github.com/en/graphql/reference/mutations#enablepullrequestautomerge
majormoses commentedon Mar 18, 2021
The next step is getting an issue and merged functionality into https://github.com/google/go-github so we can get ready to consume it.
jcudit commentedon Mar 22, 2021
🤔 does
go-githubleverage the GraphQL API? If not, we'd be able to use our GraphQL client to toggle this configuration directly.majormoses commentedon Mar 23, 2021
Oh I completely forgot we dont rely as heavily on that library anymore.
RTodorov commentedon Apr 8, 2021
@jcudit apparently there is a lib for the graphql API already added to the project: github.com/shurcooL/githubv4
I noticed that the graphql lib (v4) is not used in the repository logic just yet. If one wants to suggest a PR for adding the auto-merge using v4, would that be ok?
s4nji commentedon Apr 8, 2021
This seems to just enable/disable automerge on specific PR; for this to work you have to allow automerge at repository level, and after a brief look at the graphql explorer, it does not seem to be exposed via the v4 API yet.
jcudit commentedon Apr 27, 2021
@RTodorov yes! PRs are welcome in general. However, as pointed out above, the v4 mutation does not apply to the repository level. We will need to wait on better support.
mungojam commentedon Aug 19, 2021
It's now available on the GitHub REST API and the GraphQL one
Richard-de-Vries commentedon Sep 1, 2021
Hello,
I'd like to have this functionality as well so i'm opening an issue with the go-github (and possibly implementing it as well). I hope this is okay 😄
Richard-de-Vries commentedon Sep 1, 2021
Okay, i've added the option to the library. Now in the upcoming release we can make use of this property.
lauraseidler commentedon Sep 14, 2021
This is great news - I'd also love to see this land as soon as possible, and could also provide a PR. If I'm seeing this correctly, this would need:
go-githubto the now released v39allow_auto_mergeongithub_repositoryNot sure if it makes sense to do these in one PR, probably better to update first, and then implement separately? @jcudit any pointers?
Add `allow_auto_merge` option for repositories
jcudit commentedon Sep 28, 2021
Lets focus on getting v39 added to the project first. Aiming to land in the next release.
Add `allow_auto_merge` option for repositories
Add `allow_auto_merge` option for repositories
usmonster commentedon Oct 13, 2021
In case it wasn't seen, #923 is waiting to be reviewed & hopefully merged. 👀
Add `allow_auto_merge` option for repositories (#923)
Add `allow_auto_merge` option for repositories (integrations#923)