-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(github): warn users without "Automatically delete head branches" #38566
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
base: main
Are you sure you want to change the base?
Conversation
| documentationUrl: | ||
| 'https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find us using documentationUrl before - is there any prior art?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, but we should IMO link only our documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think linking to GitHub's official docs will be an issue? Are you concerned about URLs breaking in the future? Or perhaps more that we should "only" try and point to things that we own? (And avoiding a precedent being set, where someone may then think this can be any arbitrary docs?
ffe673e to
93f1283
Compare
As noted in #38324, there could be a bug occur with branches not being automagically deleted, where: 1. repository does not "Automatically delete head branches" 1. `minimumReleaseAge` is used to gate a release update, as the release is not passing that check 1. a group that includes that release is set up 1. a branch is created for all updates except the `minimumReleaseAge` (as expected) 1. the PR is merged 1. the branch is not deleted 1. next time Renovate runs, it sees the branch created - albeit out of date - so it treats this as permission to update the package gated by `minimumReleaseAge` As a step towards fixing this long-term, we can introduce a log warning to inform repo owners that they may be susceptible to issues.
93f1283 to
2693ffe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if we should do this.
-
It is not necessary that users only use the github functionality to delete branches, as some can use GH actions to do so.
-
In some cases we were updating existing branches with PRs, not exactly the same as orphan branches.
| documentationUrl: | ||
| 'https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches', | ||
| }, | ||
| 'Repository does not have "Automatically delete head branches" set, which could cause Renovate to re-use a repository in some cases', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'Repository does not have "Automatically delete head branches" set, which could cause Renovate to re-use a repository in some cases', | |
| 'Repository does not have "Automatically delete head branches" set, which could cause Renovate to re-use a branch in some cases', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see conversation else LGTM
| documentationUrl: | ||
| 'https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, but we should IMO link only our documentation
Changes
As noted in #38324, there could be a bug occur with branches not being
automagically deleted, where:
minimumReleaseAgeis used to gate a release update, as the releaseis not passing that check
minimumReleaseAge(as expected)
date - so it treats this as permission to update the package gated by
minimumReleaseAgeAs a step towards fixing this long-term, we can introduce a log warning
to inform repo owners that they may be susceptible to issues.
Context
Please select one of the below:
Relates to #38325.
AI assistance disclosure
Did you use AI tools to create any part of this pull request?
Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
The public repository: