Skip to content

Commit

Permalink
refactor: update RepoUrlPicker to be compatible with the original API
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
  • Loading branch information
benjidotsh committed Jun 14, 2024
1 parent d7a8c73 commit 872ac0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ describe('RepoUrlPicker', () => {
});

expect(mockScmAuthApi.getCredentials).toHaveBeenCalledWith({
host: 'github.com',
url: 'https://github.com',
additionalScope: {
repoWrite: true,
customScopes: {
Expand Down Expand Up @@ -309,7 +309,7 @@ describe('RepoUrlPicker', () => {
});

expect(mockScmAuthApi.getCredentials).toHaveBeenCalledWith({
host: 'gitlab.example.com',
url: 'https://gitlab.example.com',
additionalScope: {
repoWrite: true,
},
Expand Down Expand Up @@ -359,7 +359,7 @@ describe('RepoUrlPicker', () => {
});

expect(mockScmAuthApi.getCredentials).toHaveBeenCalledWith({
host: 'server.bitbucket.org',
url: 'https://server.bitbucket.org',
additionalScope: {
repoWrite: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 872ac0b

Please sign in to comment.