pull-request icon indicating copy to clipboard operation
pull-request copied to clipboard

One PR with auto-merge option enabled

Open dmitrysimkin opened this issue 4 years ago • 10 comments

Is it possible to create a PR with auto-merge option enabled? it's in beta now, docs are here

dmitrysimkin avatar Jan 12 '21 15:01 dmitrysimkin

Thanks for the suggestion!

It's not yet available through the API. We will need it to become available there then once our project dependency hub CLI adds it, we can easily include it as an option.

We can monitor the discussions there: https://github.community/t/enabling-auto-merge-on-a-pr-using-the-api/150797?u=wei https://github.community/t/enable-auto-merge-for-repository-via-api-v3/151331?u=wei Doc: https://docs.github.com/en/free-pro-team@latest/rest/reference/pulls

wei avatar Jan 12 '21 16:01 wei

@wei Potentially now possible as per https://github.community/t/enabling-auto-merge-on-a-pr-using-the-api/150797/5 ?

dmitrysimkin avatar Sep 22 '21 12:09 dmitrysimkin

It seems like it's only available over graphql api. https://docs.github.com/en/graphql/reference/mutations#enablepullrequestautomerge

We could use hub api graphql to make the request. PR welcome!

wei avatar Sep 22 '21 13:09 wei

Could you explain a little bit @wei ? What is hub ?

waghanza avatar Jan 14 '22 13:01 waghanza

@waghanza sure, it's https://hub.github.com/

wei avatar Jan 14 '22 19:01 wei

You mean this action could use a cli tool ?

waghanza avatar Jan 14 '22 19:01 waghanza

@waghanza it already does : )

wei avatar Jan 14 '22 20:01 wei

Have you thought about moving to https://cli.github.com/?

with gh you can use

gh pr merge --auto

https://github.com/cli/cli/issues/2619#issuecomment-976452610

maxisam avatar Feb 06 '22 05:02 maxisam

It will result in a rewrite which may affect backwards compatibility. Ideally hub should support this too if gh already does.

wei avatar Feb 08 '22 04:02 wei

Well, I doubt if they will keep support hub for long. It doesn't make too much sense to maintain 2 tools doing the same job

maxisam avatar Feb 08 '22 05:02 maxisam

Thank you for opening this issue. Per the updated README, we are in process of archiving this repository, and encourage using gh pr create directly in your workflows instead.

heiskr avatar Jun 12 '23 17:06 heiskr