refactor: update RepoUrlPicker to be compatible with the original API
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
@@ -249,7 +249,7 @@ describe('RepoUrlPicker', () => {
|
||||
});
|
||||
|
||||
expect(mockScmAuthApi.getCredentials).toHaveBeenCalledWith({
|
||||
host: 'github.com',
|
||||
url: 'https://github.com',
|
||||
additionalScope: {
|
||||
repoWrite: true,
|
||||
customScopes: {
|
||||
@@ -309,7 +309,7 @@ describe('RepoUrlPicker', () => {
|
||||
});
|
||||
|
||||
expect(mockScmAuthApi.getCredentials).toHaveBeenCalledWith({
|
||||
host: 'gitlab.example.com',
|
||||
url: 'https://gitlab.example.com',
|
||||
additionalScope: {
|
||||
repoWrite: true,
|
||||
},
|
||||
@@ -359,7 +359,7 @@ describe('RepoUrlPicker', () => {
|
||||
});
|
||||
|
||||
expect(mockScmAuthApi.getCredentials).toHaveBeenCalledWith({
|
||||
host: 'server.bitbucket.org',
|
||||
url: 'https://server.bitbucket.org',
|
||||
additionalScope: {
|
||||
repoWrite: true,
|
||||
},
|
||||
|
||||
@@ -137,7 +137,7 @@ export const RepoUrlPicker = (props: RepoUrlPickerProps) => {
|
||||
// so lets grab them using the scmAuthApi and pass through
|
||||
// any additional scopes from the ui:options
|
||||
const { token } = await scmAuthApi.getCredentials({
|
||||
host: state.host,
|
||||
url: `https://${state.host}`,
|
||||
additionalScope: {
|
||||
repoWrite: true,
|
||||
customScopes: requestUserCredentials.additionalScopes,
|
||||
|
||||
Reference in New Issue
Block a user