From f0f0a0e7edefc89762e87b4c57e4f0b0c2409a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?FOUCAULT=20J=C3=A9remie?= Date: Wed, 13 Aug 2025 18:26:25 +0200 Subject: [PATCH] fix: use bearer auth --- __tests__/helpers/octokit.ts | 2 +- src/context.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/helpers/octokit.ts b/__tests__/helpers/octokit.ts index 36ddc830..4438055f 100644 --- a/__tests__/helpers/octokit.ts +++ b/__tests__/helpers/octokit.ts @@ -358,7 +358,7 @@ export async function createRealOctokit(): Promise { const OctokitWithPaginateAndRest = realOctokit.Octokit.plugin(restEndpointMethods, paginateRest); return new OctokitWithPaginateAndRest({ - auth: `token ${process.env.GITHUB_TOKEN}`, + auth: `Bearer ${process.env.GITHUB_TOKEN}`, userAgent: '[octokit] terraform-module-releaser-ci-test', }); } diff --git a/src/context.ts b/src/context.ts index 1245931d..a4d76a65 100644 --- a/src/context.ts +++ b/src/context.ts @@ -126,7 +126,7 @@ function initializeContext(): Context { repoUrl: `${serverUrl}/${owner}/${repo}`, octokit: new OctokitRestApi({ baseUrl: apiUrl, - auth: `token ${config.githubToken}`, + auth: `Bearer ${config.githubToken}`, userAgent: `[octokit] terraform-module-releaser/${version} (${homepage})`, }), prNumber: payload.pull_request.number,