-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Refactor forkMode to use git fetching #13586
Comments
This comment was marked as outdated.
This comment was marked as outdated.
I see this issue is marked as currently we're caught between a rock and a hard place, as if I change my repo's default branch to be the "oldest" maintenance branch activately maintained, then other parts of our workflow fall apart (eg. GitHub will stop closing issues that get a commit in our "newest" maintenance branch via commit messages, because it only considers the default branch for that). I also wonder if manually changing the target branch by editing the Renovate PR would be a viable workaround? |
It was released and then reverted, because the original problem was found to be due to token permissions and the implementation was an it hacky. Therefore it is not currently in progress, but someone could might make quick work of it if they take the original PR. If you edit the target branch then Renovate will cease updating the PR unless you manually request a rebase. |
Editing the target branch doesn't work because the PR now includes newest commits in the main branch :( Even after asking Renovate to rebase. So I effectively have to edit every single PR created by Renovate in two ways: A) edit the PR target branch and B) locally check it out, rebase and drop extraneous commits and force push. But maybe a new GitHub API can be used during fork synchronization, see my comment in #7850. |
Describe the proposed change(s).
Today
forkMode
is supported only for GitHub, and nearly 100% of code is within https://github.com/renovatebot/renovate/blob/main/lib/platform/github/index.tsI would like to refactor it to improve the functionality with GitHub and also add the possibility for other platform support.
Use
upstream
terminologyToday we have the term
parentRepo
. Let's use the termupstream
instead, to align with GitHub's terminology.Perform upstream fetching using
git
Today we use this API call:
renovate/lib/platform/github/index.ts
Lines 425 to 439 in 9f7d024
But with our
git
layer, we should instead use that to fetch instead, by making our git "upstream aware". Doing so would also mean we can more easily supportbaseBranches
, which is unsupported today forforkMode
. Withingit
we should refer to that upstream/parent asupstream
and "fetch from upstream". This can possibly be done in phases, such as usinggit
to sync upstream default branch only initially before expanding it to supportbaseBranches
.The text was updated successfully, but these errors were encountered: