diff --git a/plugins/catalog-import/src/api/CatalogImportClient.test.ts b/plugins/catalog-import/src/api/CatalogImportClient.test.ts index df44ec94c4..73b9d741b9 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.test.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.test.ts @@ -588,6 +588,12 @@ describe('CatalogImportClient', () => { 'https://github.com/backstage/backstage/blob/main/catalog-info.yaml', }); expect(catalogApi.validateEntity).toHaveBeenCalledTimes(1); + expect(scmAuthApi.getCredentials).toHaveBeenCalledWith({ + host: 'github.com', + additionalScope: { + repoWrite: true, + }, + }); expect( (new Octokit().git.createRef as any as jest.Mock).mock.calls[0][0], ).toEqual({ @@ -701,6 +707,13 @@ describe('CatalogImportClient', () => { }), ); + expect(scmAuthApi.getCredentials).toHaveBeenCalledWith({ + host: 'github.com', + additionalScope: { + repoWrite: true, + }, + }); + expect( (new Octokit().git.createRef as any as jest.Mock).mock.calls[0][0], ).toEqual(