Commit Graph

512 Commits

Author SHA1 Message Date
Florian Greinacher 21c011ad44 fix(gitlab): skip branch status when no pipeline found, retry after PR creation (#41130)
* fix(gitlab): skip branch status when no pipeline found, retry after PR creation

On GitLab with MR pipelines, posting a commit status without a
pipeline_id causes GitLab to create an unwanted branch pipeline.

Skip posting the status in setBranchStatus() when no pipeline is found
after retries. Retry setting branch statuses after ensurePr() in the
with-pr block so that the MR pipeline created by GitLab can be found.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix(gitlab): gate skip-status-without-pipeline behind experimental flag

Move the behavior that skips setting a branch status check when no
pipeline is found behind the RENOVATE_X_GITLAB_SKIP_STATUS_WITHOUT_PIPELINE
experimental environment variable. Without the flag, the original
behavior of always posting the status is preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test(gitlab): restore original 'sets branch status' test case

Keep the original test that verifies branch status is set without
the experimental flag alongside the new skip-behavior test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(docs): sort experimental env var headers alphabetically

Move RENOVATE_X_GITLAB_SKIP_STATUS_WITHOUT_PIPELINE after
RENOVATE_X_GITLAB_MERGE_REQUEST_DELAY to satisfy alphabetical
ordering requirement in self-hosted-experimental.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(gitlab): address PR review comments for skip-status-without-pipeline

Use strict `=== 'true'` check for env var, update docs wording, and
add test coverage for the new experimental flag behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-27 16:45:46 +00:00
Jalil David Salamé Messina 99a3ac22af fix(jsonata): updates when version and digest changed (#38308)
* fix(jsonata): updates when version and digest changed (#36461)

Cherry-picked from #38066 and fixed regression #38252.

Uses the test from #38298 to confirm the regression is not reintroduced.

* fix: review comments

Signed-off-by: Jalil David Salamé Messina <jalil.salame@gmail.com>
Change-Id: I6a6a69641345ca16b82a9e082aa1b19b13e267bf

* fix: issues introduced by branch update

I didn't resolve the merge conflict properly.

Signed-off-by: Jalil David Salamé Messina <jalil.salame@gmail.com>

---------

Signed-off-by: Jalil David Salamé Messina <jalil.salame@gmail.com>
2026-02-27 16:09:45 +00:00
rngcntr bd7214d04b feat: Log PR labels on PR creation (#41450)
With the current logs, there was no way other than inspecting the actual
PR to determine the PR labels. As a consequence, debugging PR labels
with a dry run was simply not possible. This makes more complex labeling
rules extremely hard to debug.

This commit adds the computed PR labels to the log output when actually
creating a PR as well as when performing a dry run.
2026-02-25 13:08:11 +00:00
Felipe Santos 7ebba26236 feat: add commitHourlyLimit (#36226)
* feat: add `commitHourlyLimit`

Signed-off-by: Felipe Santos <felipe.santos@ericsson.com>

* Update docs/usage/configuration-options.md

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* Remove date optionality

* Fix lint comment

* Fix coverage

* Restore contents of commit.spec.ts

* Use ! somewhere else too

* Change optional parameter to nullish

* Refactor `!` to use proper check

* Fix set-branch-commit.spec.ts lint

* Fix test coverage

* Apply suggestions from code review

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* Split commit-limit-reached into two

* Fix review comments

* Use toUTC() where applicable

* Simplify another test to utc()

---------

Signed-off-by: Felipe Santos <felipe.santos@ericsson.com>
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-02-19 18:00:32 +00:00
renovate[bot] 6f64ce68c9 build(deps): update dependency croner to v10 (main) (#41283)
* build(deps): update dependency croner to v10

| datasource | package | from  | to     |
| ---------- | ------- | ----- | ------ |
| npm        | croner  | 9.1.0 | 10.0.1 |

* fix: migration

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-02-18 09:28:19 +00:00
renovate[bot] 645a28c77c build(deps): update dependency prettier to v3.8.1 (main) (#39779)
* build(deps): update dependency prettier to v3.8.1

| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.6.2 | 3.8.1 |

* fixup prettier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2026-02-18 08:41:34 +00:00
Sergei Zharinov b02897fab1 refactor(lint): Fix lint violations (#40965)
* refactor(lint): Fix lint violations

* Update lib/modules/versioning/versioning-metadata.spec.ts

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>

---------

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-02-06 15:34:33 +00:00
Sergei Zharinov 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +00:00
Johannes Feichtner c396b58e35 fix(workers): re-attempt platform automerge only in case of new commits (#40028) 2026-02-03 10:08:12 +00:00
Zack Kanter 7373eae466 chore(logging): include PR number when detecting existing branch PR (#40832)
feat(logging): include PR number when detecting existing branch PR

Include the PR number in debug log messages when:
- An existing open branch PR is found ("Found existing branch PR #123")
- A closed PR already exists ("Closed PR #123 already exists")

This aids debugging by making it easier to correlate log entries with
specific PRs when reviewing Renovate logs.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 08:07:48 +00:00
Sergei Zharinov 2b0e80b884 feat!: Switch to ESM modules (#40756) 2026-01-29 14:21:41 +00:00
Jamie Tanna cb49754391 fix(self-hosted)!: don't use shell: true for postUpgradeTasks (#40230)
To make sure that we're using secure defaults, we can make sure that
this is off-by-default.

Self-hosted administrators will be able to turn this back in if they
wish.
2026-01-29 13:28:05 +00:00
RahulGautamSingh e958373dbf chore: replace URL.parse (#40703)
* replace URL.parse

* fix test

* fix import extensions

* coverage

* add tests

---------

Co-authored-by: Jamie Tanna <jamie.tanna@mend.io>
2026-01-27 16:19:02 +00:00
Sergei Zharinov c5b0a74f82 refactor: Remove constructor parameter properties (#40712) 2026-01-27 11:16:26 +00:00
Teemu Matilainen bde55d5462 fix: workingDirTemplate must be relative to the repo root (#40068)
* fix: `workingDirTemplate` must be relative to the repo root

The `postUpgradeTasks.workingDirTemplate` did not work correctly,
as the working directory is the directory where Renovate is executed.

Thus prepend the paths with `localDir`, i.e. the repository root.

* refactor: use the return value of ensureLocalDir

The function already expands the path.
2026-01-27 06:59:26 +00:00
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00
renovate[bot] acacad57c6 chore(deps): update linters (main) (#40277)
* chore(deps): update linters

| datasource | package              | from   | to     |
| ---------- | -------------------- | ------ | ------ |
| npm        | eslint-plugin-oxlint | 1.36.0 | 1.38.0 |
| npm        | typescript-eslint    | 8.50.1 | 8.52.0 |

* chore: enable oxlint gha format

* chore: fix lint

* chore: fix lint

* chore: fix lint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-01-14 15:32:48 +00:00
Adam Setch 330d175341 feat: caution attestation notice (#40368)
Signed-off-by: Adam Setch <adam.setch@outlook.com>
2026-01-11 08:03:51 +00:00
Sergei Zharinov 2d88578fdc fix(auto-replace): prevent digest corruption when using replacementNameTemplate (#40170)
When using `replacementNameTemplate` with Docker images that have pre-pinned
digests, the auto-replace logic was incorrectly entering the `currentDigestShort`
replacement branch even when the digest didn't need to be changed.

Since `currentDigest === newDigest`, the first digest replacement block was
skipped. But the `else if` checked only `currentDigestShort !== newDigest`,
which was true (e.g., "5fa2edb" !== "sha256:5fa2edb..."), causing it to replace
the short string with the full digest, corrupting the result to
"sha256:sha256:..." format.

The fix adds a guard condition to skip the `currentDigestShort` replacement
when the full `currentDigest` already matches `newDigest`.

Fixes #40169
2026-01-06 14:07:56 +00:00
Jamie Tanna cbe1d049c6 feat(self-hosted): allow choice of shell: true for postUpgradeTasks (#40229)
As part of hardening the configuration around executing
`postUpgradeTasks` with `shell: true`, we can give self-hosted
administrators the opportunity to configure this.

This continues to be on-by-default to be non-breaking, but in the next
major version can be flipped to the safer option.
2025-12-31 11:55:04 +00:00
Jamie Tanna 140a777105 fix(postUpgradeTasks): always run commands with shell mode
As part of future changes to ensure that `shell` is disabled by default,
we should first enforce this for our `postUpgradeTasks`, which are
user-controlled and are more likely to contain shell-interpolated
variables.

We need to add a new `shell` type to pass around, as it was previously
not optional.
2025-12-31 10:37:17 +00:00
Jamie Tanna bebff1ca66 test: only validate subset of arguments to exec
As part of a future change, we'll add additional arguments, but don't
need to validate them in every test.

To make sure that it's clearer what these tests are validating, we'll
use `expect.objectContaining` to test a subset of the object keys.
2025-12-31 10:37:17 +00:00
Adam Setch 7309d1897c refactor: use unicode right-arrow for changes template (#40033)
* refactor: use unicode right-arrow for changes template

Signed-off-by: Adam Setch <adam.setch@outlook.com>

* refactor: use unicode right-arrow for changes template

Signed-off-by: Adam Setch <adam.setch@outlook.com>

---------

Signed-off-by: Adam Setch <adam.setch@outlook.com>
2025-12-17 11:45:21 +00:00
Adam Setch 912d19b634 feat: log all awaiting schedule (#40021)
* feat: log all awaiting schedule

Signed-off-by: Adam Setch <adam.setch@outlook.com>

* feat: log all awaiting schedule

Signed-off-by: Adam Setch <adam.setch@outlook.com>

* feat: log all awaiting schedule

Signed-off-by: Adam Setch <adam.setch@outlook.com>

---------

Signed-off-by: Adam Setch <adam.setch@outlook.com>
2025-12-16 10:11:10 +00:00
Jamie Tanna 847c980f82 chore(minimumReleaseAge): only log once per case of "did not have a releaseTimestamp" (#39936)
This will make sure that we're calling it for each release being
skipped/continued with, so we're reducing the log lines for duplicate
dependencies across the codebase.
2025-12-15 08:52:23 +00:00
Adam Setch a10b97daf4 feat: map emojis to repository problems (#39769)
* feat: add emojis for repo problem levels

Signed-off-by: Adam Setch <adam.setch@outlook.com>

* feat: add emojis for repo problem levels

Signed-off-by: Adam Setch <adam.setch@outlook.com>

* feat: add emojis for repo problem levels

Signed-off-by: Adam Setch <adam.setch@outlook.com>

* feat: add emojis for repo problem levels

Signed-off-by: Adam Setch <adam.setch@outlook.com>

* feat: add emojis for repo problem levels

Signed-off-by: Adam Setch <adam.setch@outlook.com>

* feat: add emojis for repo problem levels

Signed-off-by: Adam Setch <adam.setch@outlook.com>

* incorporate feedback

Signed-off-by: Adam Setch <adam.setch@outlook.com>

* incorporate feedback

Signed-off-by: Adam Setch <adam.setch@outlook.com>

* Update common.ts

* Update common.ts

* Update common.ts

---------

Signed-off-by: Adam Setch <adam.setch@outlook.com>
2025-12-05 13:03:08 +00:00
Adam Setch ea267ba3f5 fix: branch error message logic (#39716)
Signed-off-by: Adam Setch <adam.setch@outlook.com>
2025-12-03 08:33:46 +00:00
Michael Kriese c641239c19 fix: use stricter types for renovate config (#39594)
* fix: use stricter types for renovate config

* fix: revert changes

* Apply suggestions from code review
2025-11-28 13:16:27 +00:00
RahulGautamSingh 61c943c028 feat: prBodyHeadingDefinitons (#39460)
* feat: prBodyHeadingDefinitons

* Apply Suggestions

* Apply suggestions

* Update docs/usage/configuration-options.md

Co-authored-by: Jamie Tanna <github@jamietanna.co.uk>

---------

Co-authored-by: Jamie Tanna <github@jamietanna.co.uk>
Co-authored-by: Jamie Tanna <jamie.tanna@mend.io>
2025-11-26 10:15:41 +00:00
Michael Kriese 050ac8d23b chore: better code coverage (#39518) 2025-11-25 15:01:54 +00:00
Michael Kriese bbc27b2afb fix(minimumReleaseAge): treat minimumReleaseAge=0 days as disabled (#39494)
* fix: treat `minimumReleaseAge=0 days` as disabled

* fix: treat `minimumReleaseAge=0 days` as disabled
2025-11-24 11:24:26 +00:00
RahulGautamSingh 2f2f2ea8a4 chore: log prNotPendingHours (#39287)
* log-pr-not-pending-hrs

* Apply Suggestions
2025-11-18 18:35:56 +00:00
Jamie Tanna ccb0462820 fix(minimumReleaseAgeBehaviour): correct log message to use valid option (#39374) 2025-11-18 10:22:47 +00:00
Michael Kriese 2c96c9973f feat(bumpVersions): support short versions (#39280) 2025-11-13 11:22:01 +00:00
Sergei Zharinov 67b256aa3f fix: ignore .npmrc when the npmrc configuration is being used (#39205) 2025-11-10 16:12:45 +00:00
RahulGautamSingh 76f911041a refactor: use named exports (#39196)
* use named exports

* fix test

* add missing imnport

* fix prettier
2025-11-10 12:00:35 +00:00
Jamie Tanna 1cf9b1c6a4 feat(minimumReleaseAge)!: require a release timestamp by default (#38843)
As noted in #37952, we've seen a significant increase in recent years on
a number of package ecosystems being targeted with supply chain security
attacks.

We're in a particularly strong position to improve the level of security
across the world by setting a default for `minimumReleaseAge` in the
`best-practices` config preset.

To do this, we can introduce a new preset,
`security:minimum-release-age` to house these recommended options.

We use new presets `security:minimum-release-age` and
`security:minimum-release-age-npm`, to allow consumers to utilise
`ignorePresets` to undo this configuration, if they so wish.

As a first step towards securing our users, we can set a default for
npm, which as a large ecosystem with an increased number of packages
that depend on other packages (compared to other ecosystems), has been a
more targeted area.

In the future, we can expand this for other managers, as it makes sense,
and as support is added for them to use `minimumReleaseAge`.

Closes #38457.
2025-11-06 08:07:40 +00:00
Jamie Tanna 3c98e9dca5 chore(minimumReleaseAge): add missing word in log message (#39068) 2025-11-05 10:19:35 +00:00
Jamie Tanna 1e2f87fb6b chore(minimumReleaseAge): log the updateType when skipping updates (#39070)
As part of future changes, where it's more important to know what
`updateType` is being filtered, we will want to have this information
output to the logs.

This also changes the log field outputting, as `depNames` no longer
makes sense now we have both `depName` and `updateType`.
2025-11-04 17:27:48 +00:00
Felix Breuer 19c396a44a chore(minimumReleaseAgeBehaviour): reduce number of WARN log lines (#39001)
* chore: debug log message when timestamp is optional

When setting minimumReleaseAgeBehaviour to optional
it is intended that packages that does not have a release timestamp
will get updated. Writing a warning to the console is spam for an
intentional setting.

* chore: re-add WARN log, once

To make sure that users are still aware, we can make sure a single
warning log message is emitted.

---------

Co-authored-by: Jamie Tanna <jamie.tanna@mend.io>
2025-11-04 10:20:13 +00:00
renovate[bot] b4ed9e65d9 chore(deps): update dependency @vitest/eslint-plugin to v1.3.23 (main) (#38702)
* chore(deps): update dependency @vitest/eslint-plugin to v1.3.23

| datasource | package               | from   | to     |
| ---------- | --------------------- | ------ | ------ |
| npm        | @vitest/eslint-plugin | 1.3.16 | 1.3.23 |

* remove now unnecessary exceptions

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2025-10-31 07:50:48 +00:00
RahulGautamSingh cdd0ab4b88 fix(workers/branch): skip branch update if pendingChecks=true (#38720)
* fix: skip branch update if pendingChecks=true

* no-work -> pending

* apply suggestions

* Apply Suggestions
2025-10-29 08:56:26 +00:00
RahulGautamSingh c62635d6d1 fix(changelog): handle codeblocks in markdown (#38860)
* fix: do not modify # within codeblocks

* fix: parse fenced section in markdown

* add test

* Update lib/workers/repository/update/pr/changelog/release-notes.ts

* use re2
2025-10-25 17:35:45 +00:00
Jamie Tanna 4393503d55 feat(minimumReleaseAge): optionally enforce presence of releaseTimestamp (#38363)
As noted in #38290, #38348, a "rough edge" of the current implementation
of `minimumReleaseAge` is that:

- if we have set `minimumReleaseAge` to apply to a given dependency
- and we have 3 dependencies that need an update
  - 2 of which have a `releaseTimestamp` that is not yet "stable"
  - 1 of which does not have a `releaseTimestamp`

The dependency update that does not have a `releaseTimestamp` will be
treated as "stable", and will receive an update immediately.

To make this a little more predictable, and explicit, we should add a
new configuration item, `minimumReleaseAgeBehaviour`, to control this
behaviour.

This adds the new configuration field, as well as making it available as
a strongly typed field in the codebase.

In the case that `minimumReleaseAgeBehaviour=timestamp-optional` is
being used, we will WARN on any packages that are being updated, but
maybe shouldn't be, as a way to proactively inform the user of possible
misconfiguration.

Closes #38290, #38348.
2025-10-16 10:27:03 +00:00
renovate[bot] 1280fe4dc7 chore(deps): update dependency @vitest/eslint-plugin to v1.3.16 (main) (#38502)
* chore(deps): update dependency @vitest/eslint-plugin to v1.3.16

| datasource | package               | from   | to     |
| ---------- | --------------------- | ------ | ------ |
| npm        | @vitest/eslint-plugin | 1.3.13 | 1.3.16 |

* fix linting errors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2025-10-13 09:24:15 +00:00
Jamie Tanna a942f63bd5 fix(merge-confidence): use packageName for all lookups (#38468)
When performing lookups in Mend's Merge Confidence APIs, our contract
requires that we use the `packageName` not the `depName`.

In 9b7ae6aa98 and
b67eae2180 we made changes to make sure
that this wasn't the case, but we ended up missing a couple of cases.
2025-10-09 13:54:08 +00:00
Jamie Tanna d621588e1c test(minimumReleaseAge): document releaseTimestamp leads to immediate PRs (#38362)
As part of discussion in #38290, #38348 and #38324, the current
behaviour of `minimumReleaseAge` has been flagged as not particularly
great, as when we run with `minimumReleaseAge` enforced, a package that
does not return a `releaseTimestamp` will no longer be treated as
release that is bound by `minimumReleaseAge`'s checks to make it
pending.

As noted in the discussions, this can lead to cases where users are in a
"false sense of security", as they feel comfortable with
`minimumReleaseAge` in place, but it is not being enforced, only when
the `releaseTimestamp` is present.

Before we change this, we should add a test to document the existing
behaviour.

[0]: https://github.com/renovatebot/renovate/discussions/38290
[1]: https://github.com/renovatebot/renovate/discussions/38348
2025-10-06 12:00:55 +00:00
travisshivers 49db650766 fix(gerrit): pass config labels to commitAndPush (#38288)
* fix(gerrit): pass config labels to commitAndPush

Pass the config labels to commitAndPush so they get properly populated
for gerrit.

This follows from https://github.com/renovatebot/renovate/pull/35900
which added label support for gerrit but didn't properly pass them
along in all places.

* test: fix tests

Fix tests

* test: extend commit test to ensure labels are passed

Extend the commit test to ensure labels are passed

* refactor: add comment indicating labels are needed only for gerrit

Add comment indicating labels are needed only for gerrit.
2025-10-03 07:28:02 +00:00
Sergei Zharinov d877999ea2 fix: Reopen autoclosed PRs with new title (#38347)
* refactor: Pass new title when reopening autoclosed PR

* Add title parameter to `tryReuseAutoclosedPr`
2025-10-02 19:55:45 +00:00
RahulGautamSingh 244af72e2a test: add digest only update case (#38298)
test: add digest only update
2025-09-30 23:27:47 +00:00