674 Commits

Author SHA1 Message Date
Fredrik Adelöw 58fb313f22 Merge pull request #34398 from robingileborg/master
Bitbucket username should not be treated as a secret
2026-05-27 16:29:50 +02:00
Fredrik Adelöw 150f290178 Merge pull request #31613 from backstage/renovate/azure-sdk-for-js-monorepo
chore(deps): update azure-sdk-for-js monorepo
2026-05-27 14:55:44 +02:00
github-actions[bot] 68db890456 Version Packages (next) 2026-05-26 15:26:38 +00:00
Fredrik Adelöw 843f71caf4 fix: adapt tests for Azure SDK upgrade to ESM-style exports
The Azure SDK monorepo upgrade (storage-blob 12.26→12.31, identity
4.5→4.9) adds "type": "module" to package.json, making jest.mock()
unable to intercept imports from production code.

- AzureBlobStorageUrlReader: accept createContainerClient as an
  optional dependency, letting tests pass a mock directly instead
  of trying to mock the @azure/storage-blob module
- AzureUrlReader: provide PAT credentials in all test cases so
  DefaultAzureCredential is never instantiated — the Bearer auth
  flow is already covered by the integration package's own tests
- DefaultAzureDevOpsCredentialsProvider: use expect.any() for
  mock instance comparison instead of new DefaultAzureCredential()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-26 17:18:31 +02:00
Robin Gileborg 241d359913 Bitbucket username should not be treated as a secret
Signed-off-by: Robin Gileborg <robin@gileborg.com>
2026-05-26 13:19:08 +02:00
Andre Wanlin 850f7c2ce5 Merge pull request #33359 from awanlin/topic/typos-cli
Added `typos` to CI and fixed all findings
2026-05-25 15:23:38 -05:00
github-actions[bot] b97fcb0a93 Version Packages 2026-05-19 18:28:24 +00:00
Andre Wanlin a07e6a31a4 Typos CLI - initial config and changes
Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed test typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed docs typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed code comment typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed remaining typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Added CI and Config

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed typo, lol

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixes and update API reports

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated test

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Minor corrections

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Removed changesets

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Refactor to make changes non-breaking

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Clean up of new typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Use typoed over typo'd

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Added typoed

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated API Reports

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Feedback improvement

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Refinements

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Simplify based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Reverted to handle both keys

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-05-19 07:38:06 -05:00
github-actions[bot] b0bc1e5cc9 Version Packages (next) 2026-05-05 14:57:07 +00:00
Fredrik Adelöw da5ba4eecd Handle non-numeric Retry-After header values gracefully
Validate the parsed Retry-After value is a finite positive number before
using it as a delay, falling back to exponential backoff otherwise. This
prevents a near-zero delay tight retry loop when the header contains an
HTTP-date or unexpected value.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-04 15:12:02 +02:00
Fredrik Adelöw dd78c9cffa defer fetch lookup so test interceptors apply
Capturing globalThis.fetch as a value at construction time meant the
GitLabUrlReader tests bypassed the MSW fetch interceptor and hit the
real gitlab.com (returning 401). Wrapping the call resolves fetch at
invocation time so the patched fetch is used.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-05-04 14:01:43 +02:00
Fredrik Adelöw 1500fe31b4 restructure retry loop to remove parallel response/error variables
Each catch path now decides for itself whether to rethrow or sleep and
continue, so the loop body has a definite Response after the try/catch
and there is no shared `error: unknown` slot that could in principle be
thrown unset. Pulls the exponential delay into a tiny local helper to
share between the two retry paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-05-04 11:28:29 +02:00
Fredrik Adelöw d7f994308e drop non-null assertion in retry loop
Flip the order of the response/error check so TypeScript narrows the
types itself rather than relying on `response!` to assert what the code
already guarantees by construction.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-05-04 11:17:51 +02:00
Fredrik Adelöw 90d3968e6c address review comments
- Cancel discarded response bodies before retrying so the underlying
  connection can be returned to the pool instead of being held open
  until the response is garbage collected.
- Stop asserting on the rejected error message in the network-error
  retry test; track rejection via a flag so the test isn't tied to
  fetch/MSW error strings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-05-04 11:01:41 +02:00
Fredrik Adelöw 6b112d3fe8 fix(integration): correct GitLab fetch mode and retry on network errors
Removes a misplaced `mode: 'same-origin'` option that would have rejected
cross-origin requests when the integration is used from a browser, and
extends the retry wrapper so transient network errors are retried using
the configured `maxRetries`. Caller-initiated aborts still propagate
immediately.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-05-04 10:43:49 +02:00
github-actions[bot] 1cc86bee1c Version Packages (next) 2026-04-21 15:07:43 +00:00
Patrik Oldsberg 191b41a0b3 integration: remove unnecessary exports from internal helpers
Remove `export` from five internal helper functions that are not part of
the published API and are only used within their own files. The `sleep`
function in GitLabIntegration is kept exported for test access but marked
as `@internal`.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-20 16:49:21 +02:00
Patrik Oldsberg 4db1b03cb9 Merge pull request #33891 from backstage/rugvip/move-registermswtesthooks-to-test-utils
integration: use registerMswTestHooks from backend-test-utils
2026-04-16 22:02:20 +02:00
github-actions[bot] 93e643d142 Version Packages 2026-04-14 14:57:31 +00:00
Patrik Oldsberg 047a2175e3 integration: use registerMswTestHooks from backend-test-utils
Removed the test-only `registerMswTestHooks` function from `helpers.ts`
and replaced it with the shared version from `@backstage/backend-test-utils`.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-14 14:20:01 +02:00
github-actions[bot] 6c10d88c13 Version Packages (next) 2026-04-07 15:30:58 +00:00
Vincenzo Scamporlino d96b7281dc Make owner parameter optional in getAppToken and getInstallationCredentials methods
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2026-03-30 21:59:27 +02:00
Vincenzo Scamporlino d1124998ca Fix SingleInstanceGithubCredentialsProvider to return app credentials for bare host URLs
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2026-03-30 21:35:40 +02:00
github-actions[bot] 5725b5fcfa Version Packages 2026-03-17 21:39:07 +00:00
github-actions[bot] ed7c4e3bef Version Packages (next) 2026-03-10 17:34:12 +00:00
Ben Lambert 1513a0b132 Merge commit from fork
* Reject path traversal in SCM URL filepath parsing

* Harden parseGitUrlSafe against encoding bypass variants
2026-03-04 07:28:36 +01:00
github-actions[bot] db0d171511 Version Packages (next) 2026-03-03 14:16:49 +00:00
James Brooks d73ac23f1e Merge branch 'master' into visibility 2026-03-02 19:08:00 +00:00
James Brooks 993a59840b Update Azure integration config visibility
Signed-off-by: James Brooks <jamesbrooks@spotify.com>
2026-03-02 15:02:39 +00:00
Andre Wanlin 120d425326 Fixed failing tests
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-02-27 12:50:03 -06:00
Andre Wanlin d8116c463d Latest feedback
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-02-27 12:50:03 -06:00
Andre Wanlin 5da7c6c5c2 Add check for removed config
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-02-27 12:50:02 -06:00
Andre Wanlin 527cf88a90 Integration - Removed long deprecated code
Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed lock file

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Improve changesets

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Removed link

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Update .changeset/sharp-ravens-shop.md

Co-authored-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>

Update .changeset/six-trees-carry.md

Co-authored-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>

Update .changeset/tiny-zoos-smash.md

Co-authored-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>

Corrected gerrit changes based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated API report

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed some tests

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed test

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed another test

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Removed parseGerritGitilesUrl

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Table clean up

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Remove from changeset

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Changes based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-02-27 12:50:00 -06:00
github-actions[bot] 4bd6a3a1af Version Packages (next) 2026-02-24 19:24:06 +00:00
Fredrik Adelöw 5efba6e906 Merge pull request #30804 from JohannesWill/gitlab/throttle
Gitlab/throttle
2026-02-19 10:12:49 +01:00
github-actions[bot] e6df5d52ce Version Packages 2026-02-17 16:06:18 +00:00
Johannes Will d933f6257f feat: use gitlab integration with throttled fetch
Signed-off-by: Johannes Will <17289602+JohannesWill@users.noreply.github.com>
2026-02-16 16:14:22 +01:00
github-actions[bot] 7c41134684 Version Packages (next) 2026-02-10 16:14:59 +00:00
Andre Wanlin cc6206e436 Added support for {org}.visualstudio.com domains used by Azure DevOps
Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Address CodeQL comments

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Another correction

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed casing

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Adjusted to be more secure based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Tighten up endsWith

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Corrections to TSDoc comment

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Changes based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Correct URL for discovery

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated docs

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated changeset

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-02-05 13:28:26 -06:00
github-actions[bot] 1ea737c1e2 Version Packages (next) 2026-02-03 14:24:29 +00:00
Patrik Oldsberg f9d2fa6d1b Merge pull request #31682 from GDivino/feature/25324/add-git-tag
Feature: add git tag to AzureUrl class
2026-02-02 19:19:05 +01:00
github-actions[bot] d4b85dddee Version Packages (next) 2026-01-27 15:51:11 +00:00
Fredrik Adelöw 7455dae884 require the use of node prefix on native imports
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-26 13:22:53 +01:00
github-actions[bot] 2e902e7b43 Version Packages 2026-01-20 16:40:05 +00:00
Fredrik Adelöw 17e33e683d fix tests
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-05 11:30:06 +01:00
Backstage Service Account 9f1ee3e667 Version Packages (next) (#32222)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-30 16:06:20 +01:00
Ben Lambert 3afeab42a0 feat(integrations): Add googleGcs to ScmIntegrations and implement readTree for the UrlReader (#31998)
* feat: implementing google gcs read tree and scm integrations

Signed-off-by: benjdlambert <ben@blam.sh>

* feat: added changesets

Signed-off-by: benjdlambert <ben@blam.sh>

* chore: cleanup
Signed-off-by: benjdlambert <ben@blam.sh>

Signed-off-by: benjdlambert <ben@blam.sh>

* chore: fix test issues

Signed-off-by: benjdlambert <ben@blam.sh>

* chore: fix code review comments
Signed-off-by: benjdlambert <ben@blam.sh>

* chore: fix code review comments

Signed-off-by: benjdlambert <ben@blam.sh>

---------

Signed-off-by: benjdlambert <ben@blam.sh>
2025-12-30 14:20:23 +01:00
Ben Lambert 9083273931 Revert "fix: making the github urls case insensitive" (#32220)
Signed-off-by: benjdlambert <ben@blam.sh>
2025-12-29 14:11:46 +01:00
Gio Divino faab29a014 feat: add getPrefix function and more tests
Signed-off-by: Gio Divino <giodivino.tech@gmail.com>
2025-12-17 14:27:00 +08:00
Gio Divino 6999f6df21 feat: add git tag to AzureUrl class
Signed-off-by: Gio Divino <giodivino.tech@gmail.com>
2025-12-17 14:27:00 +08:00