renovate icon indicating copy to clipboard operation
renovate copied to clipboard

Ignoring PRs through labels/tags, instead of renames

Open tomkerkhove opened this issue 3 years ago • 13 comments

What would you like Renovate to be able to do?

Ignoring PRs through another approach, instead of renames, since Azure DevOps does not allow you to rename a PR once the base branch has been deleted (which happens automatically in our case when abandoning PRs).

Did you already have any implementation ideas?

Using labels/tags to mark a PR to be ignored sounds like a feasible alternative.

tomkerkhove avatar Jun 30 '21 13:06 tomkerkhove

Example: image

tomkerkhove avatar Jun 30 '21 13:06 tomkerkhove

This seems related to feature request #6552, that asks for a "blocked" label to prevent Renovate from rebasing a PR.

HonkingGoose avatar Jun 30 '21 15:06 HonkingGoose

That makes sense, but I'd prefer to ignore it so that it regenerates it. However, the underlying tech should be re-usable.

tomkerkhove avatar Jun 30 '21 15:06 tomkerkhove

Renaming an open PR doesn't achieve anything because Renovate will just rename it back. Renaming is only helpful for closed or merged PRs to prevent them from blocking a new PR. Renaming a merged onboarding PR doesn't really change anything if the repo has a config but if there is no config then renaming results in a new onboarding PR.

So are your use cases for the above closed scenarios, or you want some different open PR ignoring scenario?

rarkins avatar Jun 30 '21 15:06 rarkins

Renaming is only helpful for closed or merged PRs to prevent them from blocking a new PR.

This is my exact use-case where a PR gets abandoned but later on, however, we want it to be ignored.

As per the ignore message, it tells you to rename the PR: image

But it's not possible since the source branch is already gone. (see above)

tomkerkhove avatar Jul 01 '21 05:07 tomkerkhove

So at high level:

  • Adding a certain label to a closed PR should make it essentially invisible to Renovate's check for existing PRs
  • It should make no difference to open PRs
  • It should also work with closed onboarding PRs

Next question is: should it be a fixed/non-configurable label, or configurable? e.g. it could be renovate-ignore

rarkins avatar Jul 01 '21 07:07 rarkins

That's reasonable to me - Configurable is always good but not a must to me

tomkerkhove avatar Jul 01 '21 08:07 tomkerkhove

Let's go with a fixed label "renovate-ignore" and if someone really needs configurable in future then they can propose it.

We'll also need to document any limitations if multiple matching PRs are found but not all have the label. I suspect we'll need to just use the first one we find.

rarkins avatar Jul 01 '21 08:07 rarkins

Thank you!

tomkerkhove avatar Jul 01 '21 09:07 tomkerkhove

Can I pick this up?

bprachi29 avatar Aug 26 '21 16:08 bprachi29

With the upcoming PR we just need to verify that renovate supports tags on PRs in Azure DevOps. If not, I'm happy to open an issue for it.

tomkerkhove avatar Sep 15 '21 09:09 tomkerkhove

@bprachi29 Can you let me know if you still want to be assigned to this issue?

HonkingGoose avatar Aug 31 '22 09:08 HonkingGoose

This is a really needed feature. I went crazy when I accepted the first Onboarding PR too soon, months ago.

gioce90 avatar Apr 15 '24 09:04 gioce90