Skip to content

Commit 8d48894

Browse files
fix: use admin token for privatisation
1 parent 0cf8d3f commit 8d48894

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/services/db/GitHubService.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import logger from "@root/logger/logger"
1717
import { GitCommitResult } from "@root/types/gitfilesystem"
1818
import { GitHubRepoInfo, RawGitTreeEntry, RepoState } from "@root/types/github"
1919

20+
import { E2E_TEST_GH_TOKEN } from "../middlewareServices/AuthenticationMiddlewareService"
21+
2022
import * as ReviewApi from "./review"
2123

2224
export default class GitHubService {
@@ -861,9 +863,9 @@ export default class GitHubService {
861863
const endpointTemplate = urlTemplate.parse(`{siteName}`)
862864
const endpoint = endpointTemplate.expand({ siteName })
863865

864-
// Privatising a repo is restricted to repo admins - an admin token will be inserted in via our axios interceptor
866+
// Privatising a repo is restricted to repo admins - our main admin token is used
865867
const headers = {
866-
Authorization: "",
868+
Authorization: `token ${E2E_TEST_GH_TOKEN}`,
867869
"Content-Type": "application/json",
868870
}
869871

0 commit comments

Comments
 (0)