DefinitelyTyped / dt-mergebot

The bot which handles auto-merging your PRs
https://devblogs.microsoft.com/typescript/changes-to-how-we-manage-definitelytyped/
MIT License
112 stars 44 forks source link

Moves PRs which need manually accepting for CI to the DT maintainer action queue #386

Closed orta closed 3 years ago

orta commented 3 years ago

New contributors to DT need to have their CI privileges set - this PR changes the DT mergebot to move those PRs directly into the maintainer's TODO list.

Major additions:

orta commented 3 years ago

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/52586 would remove the other GH actions CI step which is what is allowing DT mergebot to think it's green right now

andrewbranch commented 3 years ago

To automatically approve, you can just rerequest each check suite whose conclusion is ACTION_REQUIRED: https://docs.github.com/en/graphql/reference/mutations#rerequestchecksuite

I would recommend doing this on the condition that no files outside the types/ directory are added/removed/modified.

You can also do the same thing with the REST API if for some reason that’s easier, but you’ll need to use the databaseId property instead of the id property of the check suite as returned from the GraphQL API.

There’s also another way to do this at the repo/actions/runs level with the REST API, but that’s not available via GraphQL mutation, and it’s also very difficult to figure out the check run id from the check suite (I don’t think it can even be retrieved with GraphQL at all), so I don’t recommend that.

orta commented 3 years ago

Confirming that this worked locally, triggering https://github.com/DefinitelyTyped/DefinitelyTyped/pull/52627

I'll merge and nurse the deploy

orta commented 3 years ago

Cool, I watched https://github.com/DefinitelyTyped/DefinitelyTyped/pull/52626 get updated by the bot