Commit Graph

262 Commits

Author SHA1 Message Date
Sebastian Poxhofer d004b52a91 test: add coverage for lines detected by pnpm check (#43589)
tests: add coverage for lines detected by pnpm check
2026-05-26 07:53:07 +00:00
Sebastian Poxhofer 73b90e958b refactor: remove string concetation for production code (#43442)
refactor: prefer templates rather than `+`
2026-05-19 13:31:27 +00:00
Jamie Tanna ff6761ed23 fix(config/global): return default values for GlobalConfig.get (#42113)
* fix(config/global): return default values for `GlobalConfig.get`

As noted in #39949, it can be awkward working with in `GlobalConfig.get`, where
we would previously need to specify the default value when calling `.get`,
which could lead to drift with the defaults for a given config option.

To reduce this risk, we can rely on a given `default` for a configuration
option, providing that as a default.

Because this now definitely returns a value that matches the config option, it
now allows us to remove `!` assertions.

* fixup! fix(config/global): return default values for `GlobalConfig.get`

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* fixup! fix(config/global): return default values for `GlobalConfig.get`

* test(presets): remove impossible test

As it's now not possible to set a value as `undefined` (as
`GlobalConfig` will then use the default), this test no longer validates
anything.

* test(workers/repository): add mock

Now `platform` defaults to `github`, we need to mock out the call to
fetch config.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* test: coverage

* test: coverage

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-15 17:10:38 +00:00
Sebastian Poxhofer 03baf6ee4a test(noNewURL): add new rule enforcing parseUrl() from 'lib/util/url.ts' (#43247)
* test(noNewURL): add new rule enforcing parseUrl() from 'lib/util/url.ts'

* replace newURL with parseUrl

* remove non-null assertions marks if appropiate

* test: add additional tests

* test: add additional tests and ignore where it makes sense

* implement suggestions

* test: further improve coverage

* apply suggestion
2026-05-13 16:23:10 +00:00
Jameel Al-Aziz 1e7dd2043c fix(github): set commit message explicitly for platform automerge (#42056)
* fix(github): set commit message explicitly for platform automerge

When GitHub's "Use PR title and body as commit message" setting is
enabled, the verbose Renovate PR description gets used as the squash
commit body. Pass `commitHeadline` and `commitBody` to the
`enablePullRequestAutoMerge` GraphQL mutation so the actual commit
message is used instead.

* add REBASE test

* pr feedback
2026-05-13 15:37:52 +00:00
Felipe Santos 219cb8b11e fix(github): discover public email if available (#43186)
* fix(github): not discovering public email if token has no `user:email` scope

* Add test case for when no user:email scope
2026-05-11 15:42:09 +00:00
Felipe Santos cdce7946cb fix(github): use the correct GHE Cloud noreply email as author (#43194)
fix(github): handle GHES Cloud noreply email address correctly
2026-05-10 21:27:02 +00:00
RahulGautamSingh 0e1467c048 fix(platform/github): handle deleted issue when closing (#42993) 2026-05-08 15:27:40 +00:00
RahulGautamSingh 206dc5efe6 fix(github): retry assigning after delay (#42548)
* fix: retry assigning after delay

* fix coverage issue
2026-05-08 10:00:01 +00:00
Michael Kriese 9e4c798bda fix(github): Make GraphQL singleton data fetching explicit to bypass pagination (#43082)
fix(github): reduce graphql count to bypass error handling
2026-05-04 21:15:16 +00:00
Johannes Feichtner be2eacd8d2 feat(vulnerability): improve GitHub advisory PR body notes with summary, GHSA ID and references (#42670)
feat(vulnerability): improve GitHub advisory PR body notes with summary and GHSA ID
2026-04-17 15:33:56 +00:00
Johannes Feichtner 1e906e8e33 feat(vulnerability): add severity and CVSS details to GitHub Dependabot alerts (#42568) 2026-04-14 18:05:08 +00:00
Johannes Feichtner 3a05ade06b refactor(github/vulnerability): use Zod-inferred types as single source of truth (#42494)
* refactor(github/vulnerability): use Zod-inferred types as single source of truth

* revert to false, since undefined means something else on GHES
2026-04-09 08:36:40 +00:00
Sergei Zharinov 0ae44810fc fix(http): detect x-access-token prefix before hostType-based auth branching (#42083)
* fix: Add `github-digest` to `GITHUB_API_USING_HOST_TYPES` list

* fix(http): detect x-access-token prefix before hostType-based auth branching

Moves GitHub App installation token detection (`x-access-token:` prefix)
before the hostType-based authorization chain in `applyAuthorization`.
This ensures correct `token` scheme auth for any GitHub-related hostType,
not only those listed in `GITHUB_API_USING_HOST_TYPES`.

* test(http/auth): add regression test for GitHub App token with non-listed hostType

* Fixes

* Fix tests
2026-03-24 17:11:56 +00:00
Sergei Zharinov 000c2f936b feat(github): Make PR cache sync max pages configurable (#41493) 2026-02-26 15:29:14 +00:00
Johannes Feichtner 3eb6f5a31b feat(vulnerabilities): add support for github-actions vulnerability alerts (#40175)
* feat(vulnerabilities): add support for github-actions vulnerability alerts

* fix failed merge from main

* now for real

* review comments

* remove no longer needed assertion
2026-02-26 08:11:14 +00:00
Jamie Tanna 7a75ea87d2 chore(github): instrument the getPrCache method (#41490)
As part of efforts to improve the performance of the `getPrCache`
function, we can add additional instrumentation to understand the time
taken.

This adds additional insight through our instrumentation functions, for
those using OpenTelemetry, as well as a `durationMs` for our logs.
2026-02-25 22:09:35 +00:00
Sergei Zharinov 2fb68b9a20 fix(github): prevent PR cache sync from exhausting all pages (#41462)
* fix(github): prevent PR cache sync from exhausting all pages

* refactor(github): derive cutoff from cached items, simplify reconcile

- When lastModified is missing but items exist (via updateItem()),
  derive cutoff from max(item.updated_at) instead of falling back
  to reconcile's return value. Eliminates the fallback branch.
- reconcile() now called purely for side effects; return value ignored.
- MAX_SYNC_PAGES guard checks needNextPageSync (not needNextPageFetch)
  to avoid spurious warning when cutoff already stopped the loop.
- Add test for mixed pages (Renovate + non-Renovate PRs interleaved).
- Update derived-cutoff test for caches without lastModified.

* fix(github): advance PR cache watermark from unfiltered page

* fix(github): add comment clarifying MAX_SYNC_PAGES is a safety net
2026-02-25 10:16:52 +00:00
Jamie Tanna 2eb1e1e706 chore(platforms): correct typo in "up-to-date" (#41460) 2026-02-24 16:13:17 +00:00
renovate[bot] e752a3db29 build(deps): update dependency got to v14 (main) (#41302)
* build(deps): update dependency got to v14

| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | got     | 12.6.1 | 14.6.6 |

* test: fix tests

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-02-19 17:50:48 +00:00
Michael Kriese 912c623d60 test: full coverage for platforms (#41318)
chore: full coverage for platforms
2026-02-19 11:05:15 +00:00
renovate[bot] 4a2578d18d build(deps): update dependency zod to v4 (main) (#41225)
* build(deps): update dependency zod to v4

| datasource | package | from    | to    |
| ---------- | ------- | ------- | ----- |
| npm        | zod     | 3.25.76 | 4.3.6 |

* fix: zod 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 07:37:50 +00:00
Jamie Tanna bad0211f30 chore(github): warn when using default Git author on GitHub.com (#41055)
As part of #39309 we enabled "Vigilant Mode" for the `@renovate-bot`
author.

To give an indication to folks who are self-hosting (on GitHub.com) and
using this Git commit author, we can provide a log message to let them
know.

This does not at all stop usage of this default committer email address,
but does provide a "nudge" to folks that they may see `Unverified`
commits pop up.
2026-02-12 11:42:08 +00:00
Sergei Zharinov 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +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
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
Shashi Kanth M 2809af341b fix(github/vulnerabilityAlerts): don't error on unknown ecosystems (#39417)
fix(github-alerts): safely skip unsupported vulnerability ecosystems without parse failure
2025-12-16 10:10:08 +00:00
Michael Kriese ad710ec6ea fix(platform): endpoint is a global only option (#39579) 2025-11-27 10:12:16 +00:00
Michael Kriese 0af770947b fix: ignorePrAuthor is a global repo config (#39578) 2025-11-27 09:05:15 +00:00
Michael Kriese 050ac8d23b chore: better code coverage (#39518) 2025-11-25 15:01:54 +00:00
Jamie Tanna b12f999d98 chore(github): "GraphQL" is one word (#39239) 2025-11-13 17:58:52 +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
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 95ea2c9078 fix(branchPrefix): include base branch name iff multiple bases expected (#35423)
* use branchPrefix if multiple base branches expected

* fix test

* fix coverage

* apply suggestions

* apply suggestions

* use utility fn

* refactor tests

* fix test

* major overhaul: use baseBranches field internally

suggested by @secustor

* refactor: cleanup

* test: use better descriptions

* add tests

* fix logic

* fix test

* exclude unlisted versions when finding latestStable

---------

Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-10-20 06:27:56 +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
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
Sergei Zharinov 3ec515a7fb fix(github): Force push fresh branch when reopening PR (#38344)
* fix: Use SHA of fresh branches when reopening PR

* Revert

* Add force push for differing local and PR commit SHAs

* Update GitHub PR reopening with local SHA

* Update GitHub platform PR reopening logic

* Fix

* Remove title-related changes, keep only force-push logic
2025-10-02 15:45:49 +00:00
vivodi 5f286f2a88 fix(github): skip non-fast-forward ruleset detection when rebaseWhen=auto (#38306)
According to the [GitHub Docs](https://docs.github.com/en/rest/repos/rules?apiVersion=2022-11-28#get-rules-for-a-branch), the definition of the non_fast_forward ruleset is: “Prevent users with push access from force pushing to refs.”

Even if this ruleset is applied, a head branch that lags behind the base branch can still be merged normally. In other words, this ruleset has nothing to do with whether a rebase is required.
2025-10-01 15:17:05 +00:00
Sebastian Poxhofer f6d2a86707 feat(github): consider rulesets strict checks for rebaseWhen=auto (#38072) 2025-09-21 06:22:21 +00:00
Sebastian Poxhofer fcfdbd8405 refactor(github): improve branch protection handling and add tests fo… (#37922)
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
2025-09-13 05:41:15 +00:00
Michael Kriese 7ac5c93070 fix(platform): open or update issue correctly (#37831) 2025-09-04 10:29:04 +00:00
Michael Kriese 798b7c7ab5 fix: use shared email type (#37512) 2025-08-14 13:34:03 +00:00
Michael Kriese 3211d56e21 refactor(zod): rename schema to match our best practices guide (#37499) 2025-08-14 10:35:03 +00:00
Jarek Porzucek 6196ae10db fix(github): Enable pagination when fetching Dependabot alerts (#37395) 2025-08-12 13:26:25 +00:00
Rhys Arkins 427f78248a fix(platform/github): reduce max body length to 58k (#37236) 2025-07-31 11:08:02 +00:00
Michael Kriese 7a23c50612 fix(github): reduce max body length (#37228) 2025-07-30 15:57:22 +00:00
Sergei Zharinov 0c25305f34 refactor(github): Refactor PR username parameter handling (#37003) 2025-07-16 10:19:09 +00:00