integrations: switch to using x-access-token for github git auth

This commit is contained in:
Patrik Oldsberg
2021-02-15 20:26:12 +01:00
parent 536dd3f9ce
commit fb28da2123
7 changed files with 26 additions and 20 deletions
@@ -90,8 +90,8 @@ describe('GitHubPreparer', () => {
expect(Git.fromAuth).toHaveBeenCalledWith({
logger,
username: 'fake-token',
password: 'x-oauth-basic',
username: 'x-access-token',
password: 'fake-token',
});
});
});
@@ -38,8 +38,8 @@ export class GithubPreparer implements PreparerBase {
const git = this.config.token
? Git.fromAuth({
username: this.config.token,
password: 'x-oauth-basic',
username: 'x-access-token',
password: this.config.token,
logger,
})
: Git.fromAuth({ logger });
@@ -97,7 +97,7 @@ describe('GitHub Publisher', () => {
expect(initRepoAndPush).toHaveBeenCalledWith({
dir: resultPath,
remoteUrl: 'https://github.com/backstage/backstage.git',
auth: { username: 'fake-token', password: 'x-oauth-basic' },
auth: { username: 'x-access-token', password: 'fake-token' },
logger,
});
});
@@ -148,7 +148,7 @@ describe('GitHub Publisher', () => {
expect(initRepoAndPush).toHaveBeenCalledWith({
dir: resultPath,
remoteUrl: 'https://github.com/backstage/backstage.git',
auth: { username: 'fake-token', password: 'x-oauth-basic' },
auth: { username: 'x-access-token', password: 'fake-token' },
logger,
});
});
@@ -206,7 +206,7 @@ describe('GitHub Publisher', () => {
expect(initRepoAndPush).toHaveBeenCalledWith({
dir: resultPath,
remoteUrl: 'https://github.com/backstage/backstage.git',
auth: { username: 'fake-token', password: 'x-oauth-basic' },
auth: { username: 'x-access-token', password: 'fake-token' },
logger,
});
});
@@ -257,7 +257,7 @@ describe('GitHub Publisher', () => {
expect(initRepoAndPush).toHaveBeenCalledWith({
dir: resultPath,
remoteUrl: 'https://github.com/backstage/backstage.git',
auth: { username: 'fake-token', password: 'x-oauth-basic' },
auth: { username: 'x-access-token', password: 'fake-token' },
logger,
});
});
@@ -307,7 +307,7 @@ describe('GitHub Publisher', () => {
expect(initRepoAndPush).toHaveBeenCalledWith({
dir: resultPath,
remoteUrl: 'https://github.com/backstage/backstage.git',
auth: { username: 'fake-token', password: 'x-oauth-basic' },
auth: { username: 'x-access-token', password: 'fake-token' },
logger,
});
});
@@ -72,8 +72,8 @@ export class GithubPublisher implements PublisherBase {
dir: path.join(workspacePath, 'result'),
remoteUrl,
auth: {
username: this.config.token,
password: 'x-oauth-basic',
username: 'x-access-token',
password: this.config.token,
},
logger,
});