Merge pull request #5185 from backstage/blam/fix-github-apps-auth
Fix GitHubApp URL parsing so we can get a token
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Fix a bug with GitHub Apps support not parsing the URL correctly
|
||||
@@ -102,8 +102,12 @@ export function createPublishGithubAction(options: {
|
||||
);
|
||||
}
|
||||
|
||||
// TODO(blam): Consider changing this API to have owner, repo interface instead of URL as the it's
|
||||
// needless to create URL and then parse again the other side.
|
||||
const { token } = await credentialsProvider.getCredentials({
|
||||
url: `${host}/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}`,
|
||||
url: `https://${host}/${encodeURIComponent(owner)}/${encodeURIComponent(
|
||||
repo,
|
||||
)}`,
|
||||
});
|
||||
|
||||
if (!token) {
|
||||
|
||||
Reference in New Issue
Block a user