-
Notifications
You must be signed in to change notification settings - Fork 189
Description
Often, new users will mistakenly push a merge commit to a PR, causing prow to then apply a large number of sig/ and area/ labels based on what files were changed in the merge, and then mergecommitblocker tags it with its label and adds a comment explaining what the user did wrong. But since owners-label only ever adds labels, and never removes them, the erroneously-added labels stay there even after the user force-pushes over the bad merge PR, screwing up everyone's searches/filters/etc.
It would be cool if owners-label could be smart and not add labels based on commits that will need to be reverted.
It looks like owners-label always just adds all labels based on every file currently in the PR, rather than diffing against the last push. So it can just ignore any push containing a merge commit, and then it will re-sync correctly after the user force-pushes over the merge commit.