-
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
feat(git): use git fetching for fork mode (revived) #34467
base: main
Are you sure you want to change the base?
Conversation
@rarkins Please review and see if the intent of your original PR is preserved here. There could of course be other places in the code base that need touching due to codebase changes. There may be a need for additional tests. Please guide/advice. |
config.branchCommits = {}; | ||
const opts = ['ls-remote', '--heads', config.url]; | ||
const url = | ||
preferUpstream && config.upstreamUrl ? config.upstreamUrl : config.url; |
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.
Coverage test fails on this line. Need to trigger syncGit()
with preferUpstream==false in some test..
Revival of renovatebot#13808 Signed-off-by: Jan Høydahl <[email protected]>
e1d615f
to
2ad36c3
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.
Naturally this will need some good testing on a real repo too
(await getDefaultBranch(git)); | ||
delete getCache()?.semanticCommits; | ||
config.currentBranch = config.currentBranch || (await getDefaultBranch(git)); | ||
// istanbul ignore if |
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.
// istanbul ignore if |
Let's aim to test it this time
Signed-off-by: Jan Høydahl <[email protected]>
Marking this as a draft. I'm tempted to focus the energy on #34532 which is currently being updated after reviews, and which builds on this PR and extends/refactors it, and enables baseBranches for forks. |
This fixes #13586.
Changes
Apply code from 3-year old PR #13808 to current main branch.
Context
We need to use renovate in forking mode on two different branches. So I was recommended in #7850 (comment) to revive an old PR to get a starting point.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: