auto-reply icon indicating copy to clipboard operation
auto-reply copied to clipboard

Add a `has-conflicts` badge to PRs automatically

Open ashmaroli opened this issue 7 years ago • 6 comments

GitHub status already reports a list of conflicts in a PR and disables merge as a consequence. It'd be better if JekyllBot could piggyback on that status and automatically add a has-conflicts label to such PRs or use Jekyll's existing pending-resolution label.

ashmaroli avatar May 07 '18 17:05 ashmaroli

Maybe also add a comment to the PR letting the author/maintainers know that there are new conflicts that need to be resolved?

I'm not sure exactly how this would work though. Would every open PR need to be checked for conflicts each time a commit is added to master?

pathawks avatar May 08 '18 16:05 pathawks

Maybe also add a comment to the PR letting the author/maintainers know that there are new conflicts that need to be resolved?

That's a good idea. But I'm :-1: on it as its only going to leave behind Off-topic comments that the maintainers will have to manually minimize.. Instead, I favor the silent labeling. We, the maintainers then shout-out to the author if we're not able to resolve the conflicts ourselves (either from lack of branch-access, or from lack of time, or from lack of the know-how to best proceed further..)

Would every open PR need to be checked for conflicts each time a commit is added to master?

Yeah, that's how I vision it.. But how hard would it be for a Bot to traverse open PRs in reverse order and check for a conflict status from Github..? Definitely faster than a human doing the same, anyways.. :stuck_out_tongue:

ashmaroli avatar May 08 '18 16:05 ashmaroli

We, the maintainers then shout-out to the author if we're not able to resolve the conflicts ourselves

👎 I'd rather minimize a comment than handle all conflicts.

DirtyF avatar May 08 '18 16:05 DirtyF

I'd rather minimize a comment that handle all conflicts.

Probably that's how the rest of team feels as well.. :+1:

ashmaroli avatar May 08 '18 16:05 ashmaroli

According to https://developer.github.com/v3/repos/merging/ @jekyllbot could add a label if a merge returns a Status: 409 Conflict

Maybe something to check in https://github.com/parkr/auto-reply/blob/master/labeler/pending_rebase.go#L48

DirtyF avatar May 08 '18 17:05 DirtyF

Yeah, checking if we get a 409 and adding some kind of unmergable label would be helpful feedback for maintainers, especially those using mobile. 📱

parkr avatar May 08 '18 18:05 parkr