integrations: switch to using x-access-token for github git auth
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user