fix(gerrit): defer change creation to createPr()#39250
fix(gerrit): defer change creation to createPr()#39250felipecrs wants to merge 52 commits intorenovatebot:mainfrom
createPr()#39250Conversation
34af483 to
38b16bd
Compare
Signed-off-by: Felipe Santos <felipe.santos@ericsson.com>
0b1cce2 to
d7a2601
Compare
113b707 to
5aa8581
Compare
5aa8581 to
0b491aa
Compare
e1fdb37 to
e512e13
Compare
|
Is this being worked on, we have been forced to pin the version of Renovate to 41.167.0 which is the version prior to the change where Renovate stopped adding reviewers. Looks like this pr has multiple parts, are all necessary to fix that bug or could it be split into several PRs that could be merged individually? |
|
I'll look into completing this PR tomorrow. |
|
Sorry, change of plans. I'll look into completing this next week or the other. |
…errit-fix-create-pr
928e627 to
1ddaf28
Compare
c6e53b6 to
5acc7f0
Compare
|
Hey! As requested, I just took a look at the change. I left some comments that popped up, but both the approach and the entire diff LGTM! I also thought about an alternative approach while reading your PRs (but I think it is worse than yours):
It might be helpful to keep this alternative approach in mind in the case that, in the future, Renovate changes in some way such that it requires the branch to exist in the remote after branch creation. Since I don't think this is the case currently, your approach looks much simpler and cleaner! |
…errit-fix-create-pr
…errit-fix-create-pr
…errit-fix-create-pr
…rit-fix-create-pr
…errit-fix-create-pr
RahulGautamSingh
left a comment
There was a problem hiding this comment.
ready for review? @felipecrs
|
Yes, absolutely. 😊 |
Changes
Gerrit has a very different workflow compared to other platforms. There is simply no concept of branches for the changes, just the changes themselves.
This PR changes the Gerrit platform implementation to defer the creation of the change to the
createPr()method, rather than letting the change be created while preparing the branch.This is better because it lets most of the standard Renovate platform flow continue as usual, which closes a few gaps:
This PR also refactors part of #35900 and reverts #38288, as these hacks outside of the Gerrit platform can now be dropped.
Finally, this PR also changes Gerrit SCM
deleteBranch()to delete the local branch as opposed to not deleting anything (the default SCM deletes both remote and local branches).Context
Please select one of the below:
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.
Claude Opus 4.6 was used to investigate places that needed updating, implement tests and review the code changes.
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: https://review.gerrithub.io/q/project:felipecrs/renovate-repro-gerrit-defer-change-creation