Skip to content

feat(gerrit): add support for labels through hashtags#35900

Merged
rarkins merged 23 commits intorenovatebot:mainfrom
felipecrs:gerrit-labels-as-hashtags
Jul 4, 2025
Merged

feat(gerrit): add support for labels through hashtags#35900
rarkins merged 23 commits intorenovatebot:mainfrom
felipecrs:gerrit-labels-as-hashtags

Conversation

@felipecrs
Copy link
Copy Markdown
Contributor

@felipecrs felipecrs commented May 12, 2025

Changes

This PR adds support for labels in the renovate.json config file for the Gerrit platform. In Gerrit, labels are done through hashtags.

Example:

image

{
  "packageRules": [
    {
      "matchPackageNames": ["dependency-name"],
      "labels": [
        "hi there",
        "hi+there",
        "hi-there",
        "hi_there",
        "hi/there",
        "hi%there",
        "hi=there",
        "hi.there",
        "hi;there",
        "hi^there",
        "hi~there",
        "hi@there",
        "hi$there",
        "hi#there"
      ]
    }
  ]
}

Therefore, this PR also adds support for rebaseLabel, stopUpdatingLabel, and keepUpdatedLabel for the Gerrit platform.

EDIT: the following is no longer part of this PR.

Furthermore, it changes the rebase instructions to prefer rebaseLabel instead. This is especially important in Gerrit because otherwise updating the commit message will cause the CI pipelines to be triggered.

image

Context

This is a missing feature in the Gerrit platform, and I thought it would be nice to have it.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@felipecrs felipecrs force-pushed the gerrit-labels-as-hashtags branch from 686ea3f to c408b07 Compare May 12, 2025 17:02
@felipecrs felipecrs marked this pull request as ready for review May 12, 2025 20:03
@felipecrs
Copy link
Copy Markdown
Contributor Author

@viceice, @rarkins, this PR has no dependency on #35661, and it is simpler to review.

Comment thread lib/util/git/index.ts Outdated
Comment thread lib/modules/platform/types.ts Outdated
@felipecrs felipecrs requested a review from rarkins May 24, 2025 19:04
Comment thread lib/modules/platform/gerrit/index.ts Outdated
Comment thread lib/util/git/index.ts Outdated
Comment thread lib/modules/platform/types.ts Outdated
Comment thread lib/modules/platform/gerrit/index.spec.ts Outdated
Comment thread lib/modules/platform/gerrit/index.ts Outdated
Comment thread lib/modules/platform/gerrit/scm.ts
Comment thread lib/util/git/index.ts Outdated
@felipecrs felipecrs requested review from rarkins and viceice May 26, 2025 04:14
Copy link
Copy Markdown
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm beside the two conversations

Comment thread lib/util/git/index.ts Outdated
Comment thread lib/modules/platform/types.ts Outdated
@felipecrs felipecrs requested a review from viceice June 6, 2025 12:11
@felipecrs felipecrs marked this pull request as draft June 12, 2025 18:55
@felipecrs felipecrs marked this pull request as ready for review June 12, 2025 18:56
@felipecrs
Copy link
Copy Markdown
Contributor Author

@rarkins feel free to merge this as well. I will send a follow up PR adapting to #36374.

@felipecrs
Copy link
Copy Markdown
Contributor Author

@rarkins @viceice my understanding is that this PR is ready to merge. Can you please look into it? This is a gentle ping.

@rarkins rarkins enabled auto-merge July 4, 2025 08:44
@rarkins rarkins dismissed their stale review July 4, 2025 08:44

Outdated

@rarkins rarkins added this pull request to the merge queue Jul 4, 2025
Merged via the queue into renovatebot:main with commit 8db486b Jul 4, 2025
40 checks passed
@renovate-release
Copy link
Copy Markdown

🎉 This PR is included in version 41.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@felipecrs felipecrs deleted the gerrit-labels-as-hashtags branch July 11, 2025 12:26
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants