chdsbd / kodiak

๐Ÿ”ฎ A bot to automatically update and merge GitHub PRs

Home Page:https://kodiakhq.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hide kodiakhq status until automerge label has been added

paescuj opened this issue ยท comments

We're using Kodiak for auto-merging only some specific pull requests while most of the pull request are merged by hand.

It's a bit annoying to have the "kodiakhq: status โ€” ๐Ÿ›‘ cannot merge (missing automerge_label: 'automerge')" message on every pull request, especially since external contributors don't have the permission to add this label anyway.

It would be very great to have an option to hide those status messages until the automerge label has been added to a pull request.

If you agree on such an option, I'm happy to submit a pull request. (I might need some initial help though as this would be my first pull request on this repository)

Or as an alternative if that's not possible, make it look less like an error, maybe like:

Before:

kodiakhq: status โ€” ๐Ÿ›‘ cannot merge (missing automerge_label: 'automerge')

Proposed:

kodiakhq: status โ€” Ignored (no automerge label)

I think it's good to have Kodiak set something when it examines a PR, but we can probably make the missing automerge label a little more friendly.

I think the fix would be to update this code:

await block_merge(
api,
pull_request,
f"missing automerge_label: {config.merge.automerge_label!r}",
)

to be something like:

await api.dequeue()
await api.set_status(f"Ignored (no automerge label: {config.merge.automerge_label!r})")

I think it's good to have Kodiak set something when it examines a PR, but we can probably make the missing automerge label a little more friendly.

Agreed as the default behavior ๐Ÿ‘๐Ÿป It would be perfect if it could be user configurable, but I recognize that might be out of scope for what most users would need/want.

I'm okay with adding a config option for this.

One catch is that if Kodiak is merging a PR, but someone removes the auto merge label, we need to say something to remove the previous "merging PR" status message.
Otherwise, Yeah,

I'm okay with adding a config option for this.

One catch is that if Kodiak is merging a PR, but someone removes the auto merge label, we need to say something to remove the previous "merging PR" status message. Otherwise, Yeah,

Thanks, @chdsbd!
I've submitted a PR (#757) which addresses all of this.