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,