-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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(gerrit): use commit message footers to store source branch name #29802
Conversation
I don't like the idea of doing this as a breaking change. We can/should search for the old hashtag too. (syntax untested)
|
@NiasSt90, yeah, keeping backwards compatibility is doable. But it would be considerably more difficult to do:
I'm just not sure if it's worth it. As I mentioned, Gerrit support is still marked as experimental. |
use the existing
migration?
combine the old and the new tests....instead of change the old ones.
because it's easy doable.... |
Does Renovate always recreate changes from scratch and only retain their source branch and commit ids? I thought Renovate would sometimes just rebase changes, in which case I would expect to write code to migrate such change from hashtag to footer. Also, hashtags won't be gone from Gerrit once a new patchset is published with the footer. We would need to write code for it. |
Or maybe you mean we should search for both kind of changes and let it be. Someday users would end up merging or closing all changes and then there won't be more changes with hashtags. We don't necessarily need to do housekeeping of removing the hashtags. Is that what you meant? |
Yes, we search and extract from both sources (hashtags and commit-msg) but we only write the This way we don't lost/forget old changes (even closed ones) and accidentally reopen (or better recreate) them but all new created changes have the new location for their sourceBranch. |
Alright. I can work on this. @rarkins no objections I suppose? |
Done. Here is an example of a change that was "migrated". Note that the hashtag was not removed. https://review.gerrithub.io/c/felipecrs/gerrit-jenkins/+/1196601 |
Note that I updated the documentation to mention that support for hashtags will be removed once support for Gerrit is graduated from experimental. I don't like technical debts, and I think that's a fair compromise. |
Co-authored-by: HonkingGoose <[email protected]>
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.
The docs look good to me.
Co-authored-by: Michael Kriese <[email protected]>
…se-footers-gerrit
@NiasSt90 can you review/approve? |
Yes, but not until Monday |
@NiasSt90 just a friendly reminder. :) |
FWIIW I have been self-hosting this PR since its creation, no issues. |
Needs 7 conversations resolved |
@rarkins, they are all resolved to me: |
🎉 This issue has been resolved in version 37.422.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…enovatebot#29802) Co-authored-by: HonkingGoose <[email protected]> Co-authored-by: Michael Kriese <[email protected]>
Changes
This changes the approach used to store and retrieve the source branch information in Gerrit. Instead of relying on hashtags, we now store the source branch information in a commit message footer named
Renovate-Branch
.I believe the new approach is a lot friendlier for the end user. Less hacky, more intuitive, and better looking. Kind of aligns with the Gerrit way of doing things (like how they store and retrieve the change id using the
Change-Id
footer).Here is an example of how it was:
https://review.gerrithub.io/c/felipecrs/gerrit-jenkins/+/1196601/1//COMMIT_MSG
And here is an example on how it is now:
https://review.gerrithub.io/c/felipecrs/gerrit-jenkins/+/1196702
Context
I had proposed this in #18961 (comment), but we concluded to do this post-merge of the Gerrit support given for how long that PR was being dragged on already.
So, I finally got around to doing this.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: