refactor: update RepoUrlPicker to be compatible with the original API

Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
Benjamin Janssens
2024-06-14 11:37:16 +02:00
parent d7a8c736f8
commit 872ac0b518
2 changed files with 4 additions and 4 deletions
@@ -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,