Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoclose existing PRs when repo is disabled #21242

Closed
rarkins opened this issue Mar 30, 2023 · 2 comments · Fixed by #21263
Closed

Autoclose existing PRs when repo is disabled #21242

rarkins opened this issue Mar 30, 2023 · 2 comments · Fixed by #21263
Assignees
Labels
priority-1-critical A bad bug or work that is holding up a lot of other important features or fixes status:in-progress Someone is working on implementation type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Collaborator

rarkins commented Mar 30, 2023

What would you like Renovate to be able to do?

Have the option to "clean up" existing PRs when a repo is skipped or disabled for either reason:

  • enabled=false in config, or
  • it's a fork without forkProcessing=true

There may be other cases where INFO: Repository is disabled - skipping is true to cover, but not all of them. For example if the repo is archived then we can't make any changes.

If you have any ideas on how this should be implemented, please tell us here.

Introduce a new option pruneBranchesWhenDisabled which defaults to false. The reason to make this opt-in is that it will introduce extra work each run which is not necessary. It would instead be reserved for "cleanup" situations such as caused by #21237

Ideally if the repo cache is in use then we can also save the fact we've already done a cleanup and then not do it the next time we run on the repo, assuming it's still disabled.

Is this a feature you are interested in implementing yourself?

No

@rarkins rarkins added type:feature Feature (new functionality) priority-1-critical A bad bug or work that is holding up a lot of other important features or fixes status:ready labels Mar 30, 2023
@rarkins
Copy link
Collaborator Author

rarkins commented Mar 30, 2023

Steps to reproduce the first example (enabled=false):

  • Create a new repo with .nvmrc and empty renovate.json
  • Let Renovate create a PR to update Node.js
  • Set enabled=false in the renovate.json
  • Re-run Renovate and observe it skips the repo but leaves the PR open

@rarkins rarkins self-assigned this Mar 30, 2023
@rarkins rarkins added status:in-progress Someone is working on implementation and removed status:ready labels Mar 31, 2023
rarkins added a commit that referenced this issue Mar 31, 2023
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 35.31.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-1-critical A bad bug or work that is holding up a lot of other important features or fixes status:in-progress Someone is working on implementation type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants