Commit Graph

31 Commits

Author SHA1 Message Date
Jamie Tanna a4b5c1878c feat(http/bitbucket): warn when an endpoint announces a deprecation (#45461)
* feat(http/bitbucket): warn when an endpoint announces a deprecation

To highlight to a self-hosted administrator when they are using
deprecated/removed functionality, we can look for i.e.

    sunset: Fri, 21 Aug 2026 00:00:00 UTC
    deprecation: @1771545600
    link: <https://developer.atlassian.com/cloud/bitbucket/changelog#CHANGE-3071>; rel="deprecation"; type="text/html"

This provides visibility into a soon-to-be-removed piece of
functionality, and should allow us to catch these deprecations more
centrally.

We make sure to log them - as a WARN - once, and with ISO8601 dates for
readability.

If we can't parse either `sunset` or `deprecation`, we log them as-is,
so we don't accidentally remove any necessary context.

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

* fixup! feat(http/bitbucket): warn when an endpoint announces a deprecation

* fixup! feat(http/bitbucket): warn when an endpoint announces a deprecation

Co-Authored-By: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>

---------

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-08-25 20:06:55 +00:00
Jamie Tanna 4eee9a4683 feat(http/bitbucket): surface deprecated and removed API functionality (#45446)
To surface the deprecation or removal of features by Bitbucket Cloud,
there may be an error body such as:

    {
      "type": "error",
      "error": {
        "message": "CHANGE-3071 - Functionality has been deprecated",
        "detail": "Please read the changelog entry for more details.",
        "data": {
          "announcement_url": "https://developer.atlassian.com/cloud/bitbucket/changelog#CHANGE-3071"
        }
      }
    }

To make it more visible to a self-hosted administrator that they're
using deprecated/removed functionality, we can elevate this to a WARN
log line, if there is an `announcement_url`.

We make sure to handle both parsed JSON response bodies and a raw string
body used for other requests.

To reduce noise to a self-hosted administrator, we can log this once per
run.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-08-25 15:40:06 +00:00
Michael Kriese 99f4a76dc9 fix(got): normalize options (#41298) 2026-02-18 14:01:37 +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
Michael Kriese 9fe353adb4 test: add coverage (part1) (#40636) 2026-01-23 15:09:01 +00:00
Michael Kriese 050ac8d23b chore: better code coverage (#39518) 2025-11-25 15:01:54 +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
Sergei Zharinov b3d5d7389f feat(bitbucket): Replace mem cache with aggressive repo cache (#37975) 2025-09-12 04:39:57 +00:00
Sergei Zharinov db8dda2378 fix: Explicitly disable memCache when caching is switched on/off (#35060)
Co-authored-by: Felipe Santos <felipecassiors@gmail.com>
2025-03-30 08:02:36 +00:00
Michael Kriese b5ff90f2bd fix: improve coverage (#34667) 2025-03-06 17:05:19 +00:00
Michael Kriese a0bb61e98d fix(bitbucket): use next url instead of custom paging (#34602) 2025-03-04 10:21:48 +00:00
Michael Kriese 5897f3057d fix: refactor http (take 2) (#34558) 2025-02-28 17:17:09 +00:00
Michael Kriese 593a92655e feat: refactor http (#34550) 2025-02-28 14:40:04 +00:00
renovate[bot] 55845508b6 chore(deps): update eslint monorepo to v9 (major) (#33573)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-02-20 11:31:13 +00:00
Sergei Zharinov c25804194d refactor(http): Remove unused HTTP etag caching implementation (#28000) 2024-03-18 13:58:31 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
Sergei Zharinov ce41717678 refactor(http): Fix coverage (#23004)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-06-28 11:55:26 +02:00
RahulGautamSingh 444ea13dd5 refactor: remove string interpolations (#22840)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-06-24 09:32:50 +00:00
Sergei Zharinov 290b78d87d feat(http): Etag support (#22302) 2023-05-25 12:17:43 +00:00
Adam Setch 06f71346cd feat(bitbucket): add support for pagelen (#22278) 2023-05-20 05:43:00 +00:00
Adam Setch 976a5a1a82 feat(bitbucket): add paginate http option (#22135) 2023-05-13 06:52:09 +00:00
RahulGautamSingh c56588eaba refactor: convert PlatformmId to union (#18458) 2022-11-01 14:46:09 +00:00
MaronHatoum b121deb969 refactor(util/http): move interfaces from index.ts to types.ts (#14335)
* refactor:util/http move interfaces and types from index.ts to types.ts

* refactor:reorder imports

* refactor:move HttpError from type.ts to index.ts

* refactor:change imports after moving HttpError from type.ts to index.ts

* refactor:revert white spaces

* refactor:revert moving httpError from types.ts to index.ts

* refactor: moving httpError from types.ts to index.ts

* refactor: change import

* refactor: change import

* refactor: change import

* refactor: fix circular dependencies (lint build)

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2022-02-24 08:50:17 +00:00
Richard Versteeg 599958a56b fix(bitbucket-tags): Add hostType and fallback for bitbucket-tags datasource (#13697) 2022-01-20 20:16:17 +00:00
Sergei Zharinov 030b1a61a4 refactor(util/http): Strict null checks for http utils (#13416)
* refactor(util/http): Strict null checks for http utils

* More tests for queue.ts

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2022-01-09 21:22:27 +00:00
Maksim 1f86b71fd5 refactor: constants (#11690) 2021-10-06 07:43:32 +02:00
Jamie Magee a6f4e99e27 refactor: no implicit override (#11395)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2021-08-23 20:50:37 +00:00
Taras 150092a2a5 feat(go): add support for bitbucket in go datasource (#7892) 2021-02-06 08:05:19 +01:00
Sergei Zharinov e18259c2a5 refactor(http): Remove URL functions from platform-specific wrappers (#7933) 2020-12-10 08:50:04 +01:00
Michael Kriese 9b4bff0051 fix(internal): fix linting (#6803) 2020-07-22 07:45:57 +02:00
Sergio Zharinov 01be64987b refactor(bitbucket): Switch to new http wrapper (#6392)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2020-06-01 16:02:25 +02:00