Commit Graph

2035 Commits

Author SHA1 Message Date
Jamie Tanna b44544b72d fix(git): instrument SimpleGit operations (#39591)
* fix(git): instrument `SimpleGit` operations

Now we have the basis for instrumentation for SimpleGit, we can now
fully integrate it.

This creates a wrapper, `InstrumentedSimpleGit`, which has a simplified
interface for `SimpleGit` to allow us to focus on the important parts of
the interface for what we need, instead of trying to correctly extend /
implement SimpleGit's interface (and slightly complex types).

In each of our methods, we then make sure we instrument it with the
relevant Git subcommand being invoked.

Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>

* test(instrumentation): remove unused path

Currently, SimpleGit's `getRemotes` function being passed a `verbose:
false` is the same as not providing a `verbose`.

This fixes the code coverage failures, as we do not call this.

---------

Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>
2025-12-01 10:30:50 +00:00
Jamie Tanna bb80ec8bd0 chore(instrumentation): instrument syncGit (#39622)
As an important function for checking that we've got a repository synced
with the remote, we can add some additional instrumentation to key
areas.
2025-12-01 10:07:40 +00:00
Jamie Tanna fe8fe42471 chore(instrumentation): add helpers for Git instrumentation (#38582)
As part of being able to fully instrument our Git operations - using
SimpleGit - we can introduce some Git-specific instrumentation helpers.

These helpers will be used as part of a future change, where we will
instrument methods of SimpleGit that we're using.

This provides a set of types which will be used as OpenTelemetry
Attributes to categorise command types.

A number of subcommands that aren't currently deemed to be too important
are bucketed into an `other` category.
2025-12-01 09:51:59 +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
Jamie Tanna e34af57483 refactor(splits): add a type for repository splits (#39589)
As part of future changes to add an OpenTelemetry attribute for the
splits, we should make sure that we have a common type for the splits,
which can be used with `addSplit`.

This refactors - with some help from GPT-4.1 - to use Vitest's timer
mocking.

This also requires a slight refactor of the implementation to test more
appropriately, without duplicate calls to `Date.now`.

Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>
2025-11-28 12:16:44 +00:00
Jamie Tanna bd6b7c3d9a fix(github): warn on rate limit errors (#39585)
As noted in #39406, we're seeing a number of self-hosted users who have
missed the onboarding requirement for a `GITHUB_COM_TOKEN` for their
authentication to `github.com`.

On top of the docs improvements in #39406, we can make this clearer by
adding a warning log when we're going to report a `rate-limit-exceeded`
error, noting which hostname is failing (in case of GitHub Enterprise).

This requires a slightly duplicated `fail` function re-definition, so we
can override the baseUrl.

In the case that the request fails for `github.com`, we can also point
to our docs for the configuration needed.
2025-11-27 17:53:00 +00:00
Jamie Tanna 70c1075010 docs(constraints): clarify that binarySource=global ignores them (#39561)
* docs(constraints): clarify that `binarySource=global` ignores them

Although this is a somewhat commonly known behaviour, it's worth making
this more clear, by clarifying this in the `constraints` docs, as well
as add a debug log.

* docs(constraints): simplify message

As noted by Michael, these may not be user-facing `constraints`, but the
constraints a Manager sets.

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

---------

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-11-27 17:41:39 +00:00
Michael Kriese 050ac8d23b chore: better code coverage (#39518) 2025-11-25 15:01:54 +00:00
Michael Kriese 77de384ba7 fix(forgejo): properly handle team reviewers (#39533)
* fix(forgejo): properply handle team reviewers

* fix(forgejo): properply handle team reviewers like github
2025-11-25 14:36:30 +00:00
renovate[bot] f609b6f472 chore(deps): update vitest monorepo to v4 (main) (major) (#39505)
* chore(deps): update vitest monorepo to v4

| datasource | package             | from  | to     |
| ---------- | ------------------- | ----- | ------ |
| npm        | @vitest/coverage-v8 | 3.2.4 | 4.0.10 |
| npm        | vitest              | 3.2.4 | 4.0.10 |

* chore: migration

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-11-24 15:30:57 +00:00
Borja Domínguez 195e3084e5 feat(datasource): Add Nextcloud (#37292)
* feat(datasource): Add Nextcloud

* fix tests

* fix errors

* Update lib/modules/datasource/nextcloud/readme.md

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

* Update lib/modules/datasource/nextcloud/index.ts

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

* Update lib/modules/datasource/nextcloud/index.ts

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

* Update lib/modules/datasource/nextcloud/index.ts

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

* chore: move member

* move changelogUrl assignment

* wip

* wip

* wip

* wip

* Update schema.ts

* Update lib/modules/datasource/nextcloud/index.ts

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

* chore: change homepage to sourceUrl

* chore: change backticks to single quotes

---------

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
2025-11-19 10:26:54 +00:00
larsf96 6900f21f37 feat(datasource): azure tags datasource (#38027)
* feat: Add support for Azure Tags by using Node Azure API

* Fix imports

* Fix test

* Add some tests

* add tests for azure-tags

* add test

* refactored azure tags datasource

* fix tests

* Update lib/modules/datasource/azure-tags/index.spec.ts

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

---------

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
2025-11-19 07:53:21 +00:00
RahulGautamSingh 9c5deb20d4 test: replace undefined with empty object (#39383)
replace undefined with empty object
2025-11-18 16:48:10 +00:00
Sergei Zharinov 558bdc159d feat: Cleanup mutexes before each run (#38987)
* feat: Cleanup mutexes before each run

* Update setup.ts

* Update mutex.spec.ts

* Update setup.ts

* Unmock mutex in deb datasource spec to prevent race condition

* Update index.spec.ts
2025-11-15 21:24:43 +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] b34bbb5b2a chore(deps): update linters (main) (#38897)
* chore(deps): update linters

| datasource | package           | from   | to     |
| ---------- | ----------------- | ------ | ------ |
| npm        | @eslint/js        | 9.37.0 | 9.39.0 |
| npm        | eslint            | 9.37.0 | 9.39.0 |
| npm        | typescript-eslint | 8.45.0 | 8.46.2 |

* refactor: fix lint issues (#39183)

* chore(deps): update linters

| datasource | package           | from   | to     |
| ---------- | ----------------- | ------ | ------ |
| npm        | @eslint/js        | 9.37.0 | 9.38.0 |
| npm        | eslint            | 9.37.0 | 9.38.0 |
| npm        | typescript-eslint | 8.45.0 | 8.46.2 |

* chore(deps): update linters

| datasource | package           | from   | to     |
| ---------- | ----------------- | ------ | ------ |
| npm        | @eslint/js        | 9.37.0 | 9.39.0 |
| npm        | eslint            | 9.37.0 | 9.39.0 |
| npm        | typescript-eslint | 8.45.0 | 8.46.2 |

* refactor

* revert unwanted changes

* version sync

* version sync

* sync versions

* sync versions

* Apply suggestion from @RahulGautamSingh

* use named exports

* fix new lint issues

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
2025-11-10 10:33:01 +00:00
Jay Lindquist df9844d5ad fix(redis)!: add default auth to redis clusters (#37337)
When using Redis in a cluster with authentication, we see errors
connecting to non-root nodes with:

  WARN: Error while setting Redis cache value (repository=<org>/<repo>)
        "err": {"message": "NOAUTH Authentication required."}

This change adds the username and password from the redis URL as
defaults for connections to non-root node servers as described in the
node-redis docs[0].

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

[0]: https://github.com/redis/node-redis/blob/master/docs/clustering.md#auth-with-password-and-username
2025-11-06 08:07:40 +00:00
Rhys Arkins 4e4a0f99b0 fix!: remove the "Bot" from user-agent header (#37535) 2025-11-06 08:07:40 +00:00
renovate[bot] 31b4ceb704 build(deps): update dependency p-queue to v9 (main) (#39095)
* build(deps): update dependency p-queue to v9

| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | p-queue | 8.1.1 | 9.0.0 |

* fix: option removed and it throws now always

* chore: lint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-11-05 11:55:29 +00:00
Jamie Tanna f84305d7bf feat(hostRules): auto-wire a hostRule for api.github.com (#38733)
feat(hostRules): automagically use host rules for any `api.github.com` lookups

As noted in #38732, the Typst datasource performs API calls to the
GitHub APIs, but as we do not have explicit datasource mapping for the
API calls (via `GITHUB_API_USING_HOST_TYPES`), we end up sending
unauthenticated API calls, which then can result in rate limits.

We had previously attempted to fix this in #30490, for a different
datasource, and there are likely other datasources impacted.

To simplify this, we can auto-wire any `https://api.github.com/` API
calls with the `hostType: github` hostRule, when matching against the
hostname from the `url`.

This also adds a note to deprecate the usage of
`GITHUB_API_USING_HOST_TYPES`, unless it's explicitly needed.

Closes #38953.
2025-11-04 17:10:58 +00:00
Anne Stellingwerf cf7997ad62 chore: validate all handlebars helpers are documented (#38932)
* ci: validate all Handlebars helpers are documented

* ci: validate all Handlebars helpers are documented

* chore: validate all handlebars helpers are documented

* chore: validate all handlebars helpers are documented
2025-11-02 12:15:10 +00:00
Jamie Tanna 4a04436307 test(hostrules/github): add clearer precedence examples (#38961)
As part of #38953, we are changing the way that host rules work for
GitHub.com, and automagically wiring them in for datasources that
interact with `github.com`.

To do this, we should first provide a clearer definition of how host
rules should work, especially when there may be conflicting sources of
tokens, or where we may be on GitHub Enterprise Server vs GitHub.com.
2025-10-31 09:07: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
renovate[bot] 91f10ff88f chore(deps): update linters (main) (#38166)
* chore(deps): update linters

| datasource | package           | from   | to     |
| ---------- | ----------------- | ------ | ------ |
| npm        | @eslint/js        | 9.35.0 | 9.37.0 |
| npm        | eslint            | 9.35.0 | 9.37.0 |
| npm        | typescript-eslint | 8.43.0 | 8.45.0 |

* chore: fix linting issue

* fixup merge problem

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2025-10-28 12:54:27 +00:00
Nils Plaschke 1482c0ab2a feat: add dynamic install for conan (#38834)
* feat: add dynamic install for conan

* chore: add test for dynamic conan install

* chore: reorder conan entry in tool config
2025-10-27 13:10:34 +00:00
Sergei Zharinov 7e353b9cca refactor(git): use non-capturing groups in SSH key regex (#38801) 2025-10-23 06:14:59 +00:00
RahulGautamSingh a86b32ea0f feat: configurable repo config filenames (#36644)
* feat: configurable repo config filenames

* docs: configFileNames

* fix tests

* update tests

* fix coverage

* Apply Suggestions

* refactor: remove platform-based filename filtering

* docs

* refactor

* docs: add note for config-validator use

* feat: add inherited config support

* fix: build

* fix lint

* fix test
2025-10-20 06:19:01 +00:00
Jamie Tanna 1291c6267e fix(merge-confidence): ensure that Maven coordinate lookups are URL escaped (#38464)
This isn't technically needed, as right now the Merge Confidence API
allows URL-encoded or plain forms of the `:` symbol, but we should
perform our lookups more resiliently, to be safe.

Ideally we would use `encodeURIComponent`, but in keeping with the
existing escaping, we can use a regex replacement.
2025-10-14 10:07:41 +00:00
Jamie Tanna ee1840dd62 test: correct test name (#38431) 2025-10-14 10:06:45 +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 e3b04bbf94 refactor: Remove unused Cacheable class (#38300) 2025-10-01 06:45:09 +00:00
Sergei Zharinov 655171a0b0 docs: Improve cache TTL docs and log messages (#38305) 2025-10-01 06:44:27 +00:00
Sergei Zharinov ad48b22d3b feat(bitbucket): Better cache invalidation for branch status cache (#38084) 2025-09-18 19:36:43 +00:00
Ben Foster 6966e20285 feat(quadlet): Add manager for podman quadlet files (#35631) 2025-09-15 16:57:15 +00:00
Richard Sahrakorpi 8e1107b23f feat(submodules): use env vars from getGitEnvironmentVariables (#35180) 2025-09-12 16:07:16 +00:00
Sergei Zharinov 8922459b93 feat: Typst datasource and manager support (#37709) 2025-09-12 12:37:17 +00:00
Sergei Zharinov b3d5d7389f feat(bitbucket): Replace mem cache with aggressive repo cache (#37975) 2025-09-12 04:39:57 +00:00
Sergei Zharinov 500a8bc59e feat(cache): Reuse repo-cached HTTP responses during a single run (#37568) 2025-09-11 22:06:19 +00:00
Hajime-san 39a781a319 feat(datasource): add JSR support (#37881)
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2025-09-11 21:56:20 +00:00
Sergei Zharinov 38842a61b2 fix(http): Cache HEAD requests separately from GET requests (#37862) 2025-09-05 14:40:40 +00:00
Sergei Zharinov 6e8de16295 feat: Add Maven Central rate limit logging (#37704)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-08-28 04:50:27 +00:00
Joshua Spence 5cce1d9b4d fix(config): Replace secrets and variables globally (#37696)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-08-25 15:46:56 +00:00
RahulGautamSingh fee09ec990 fix(platform/local): handle local git repo (#37680) 2025-08-24 09:30:23 +00:00
Michael Kriese 137d46d61e fix(markdown): use remark-gfm (#37454) 2025-08-19 18:05:18 +00:00
Sergei Zharinov 3252d42706 feat(gitlab): Improved PR cache (#37076)
Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-08-18 12:30:06 +00:00
Sergei Zharinov b7d2f4688e feat: Add support for Base64-encoded keys (#37522) 2025-08-14 16:12:38 +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
Michael Kriese a5f3956210 refactor: remove default radix from parseInt (#37489) 2025-08-13 15:36:30 +00:00
Michael Kriese b3f185d7f9 fix(markdown): workaround remark bug (#37430) 2025-08-11 11:08:21 +00:00