diff --git a/packages/bundler-plugin-core/src/utils/__tests__/Output.test.ts b/packages/bundler-plugin-core/src/utils/__tests__/Output.test.ts index 5acd4a8a..f0da4281 100644 --- a/packages/bundler-plugin-core/src/utils/__tests__/Output.test.ts +++ b/packages/bundler-plugin-core/src/utils/__tests__/Output.test.ts @@ -693,6 +693,7 @@ describe("Output", () => { headers: new Headers({ Authorization: "token token", "Content-Type": "application/json", + "User-Agent": "codecov-bundler-plugin/1.9.1", }), body: JSON.stringify({ branch: "main", diff --git a/packages/bundler-plugin-core/src/utils/getPreSignedURL.ts b/packages/bundler-plugin-core/src/utils/getPreSignedURL.ts index 4c74228e..f461522e 100644 --- a/packages/bundler-plugin-core/src/utils/getPreSignedURL.ts +++ b/packages/bundler-plugin-core/src/utils/getPreSignedURL.ts @@ -7,6 +7,7 @@ import { type Span, } from "@sentry/core"; import { z } from "zod"; +import { version } from "../../package.json" with { type: "json" }; import { FailedFetchError } from "../errors/FailedFetchError.ts"; import { UploadLimitReachedError } from "../errors/UploadLimitReachedError.ts"; import { type ProviderServiceParams } from "../types.ts"; @@ -53,6 +54,7 @@ export const getPreSignedURL = async ({ }: GetPreSignedURLArgs) => { const headers = new Headers({ "Content-Type": "application/json", + "User-Agent": `codecov-bundler-plugin/${version}`, }); const requestBody: RequestBody = serviceParams;