File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ import logger from "@root/logger/logger"
1717import { GitCommitResult } from "@root/types/gitfilesystem"
1818import { GitHubRepoInfo , RawGitTreeEntry , RepoState } from "@root/types/github"
1919
20+ import { E2E_TEST_GH_TOKEN } from "../middlewareServices/AuthenticationMiddlewareService"
21+
2022import * as ReviewApi from "./review"
2123
2224export 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
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ describe("Github Service", () => {
4848 const resourceCategoryFileName = "index.html"
4949
5050 const sessionData = mockUserWithSiteSessionData
51+ const mockE2eToken = "test"
5152
5253 const authHeader = {
5354 headers : {
@@ -1042,7 +1043,7 @@ describe("Github Service", () => {
10421043 describe ( "changeRepoPrivacy" , ( ) => {
10431044 const refEndpoint = `${ siteName } `
10441045 const headers = {
1045- Authorization : "" ,
1046+ Authorization : `token ${ mockE2eToken } ` ,
10461047 "Content-Type" : "application/json" ,
10471048 }
10481049 it ( "should modify the repo privacy accordingly if making repo private" , async ( ) => {
You can’t perform that action at this time.
0 commit comments