grafana / grafana-plugin-examples

189 stars 53 forks source link

Add auto-approve and auto merge into automatic update action #364

Closed Ukochka closed 1 month ago

Ukochka commented 2 months ago

Add ability to auto approve PR created by grafana-plugin bot to be able to automerge

tolzhabayev commented 2 months ago

I think you can skip the auto approve completely, as it doesn't make much of a difference.

SCR-20240905-kdwr

The bot user has the power to skip approvals and just merge it directly once the checks are green.

You would probably need something like https://github.com/re-actors/alls-green to ensure checks are actually green before merging.

A couple of examples on how to do it: https://jhale.dev/posts/auto-merging-prs/

Ukochka commented 2 months ago

@jackw Auto-merge option is already in github and it is enabled for this repo. When all the requirements are there - it will be automatically merged. I thought we need only approval, but I see that we actually need something else instead. @tolzhabayev shared the example

tolzhabayev commented 2 months ago

I think auto merge is not actually auto merge but an option you have to click on while the CI pipeline is running so that it will be merged once its done. But if you do not "click the button" it will not actually merge anything - e.g. this PR is not automatically merged although approved and all checks are green.

Ukochka commented 2 months ago

@tolzhabayev yeah, that's why I was thinking auto-approve will help, but seems like no and we need to use auto-merge action to do so

jackw commented 2 months ago

@Ukochka It seems we already have an action here that other repos are using to achieve this auto approve n merge of dependabot PRs?

CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

Ukochka commented 2 months ago

@tolzhabayev @jackw Hey guys, I have added merge part to this github actions. And I left approval part just to be sure. I think all-green is not needed here, because auto-merge anyway checks if everything is passed as I understand

jackw commented 2 months ago

@mckn I'm under the impression this action is intended only for the examples repo and isn't for plugin developers to use in their repos.

tolzhabayev commented 1 month ago

@Ukochka fixed the CLA check https://github.com/grafana/grafana-plugin-examples/pull/364#issuecomment-2334119860