Fix missing authentication in GitHubUrlReader
An oversight that probably stems from that most repositories for tech-docs are public anyway. Ours are not, and are inside of a GitHub Enterprise, which is how i found this tiny bug. I wish i knew how to mock the cross-fetch in order to inspect the Authorization header of the request to test this fix. I can only confirm that it works on our backstage that targets GHE.
This commit is contained in:
@@ -196,6 +196,7 @@ export class GithubUrlReader implements UrlReader {
|
||||
new URL(
|
||||
`${protocol}://${resource}/${full_name}/archive/${ref}.tar.gz`,
|
||||
).toString(),
|
||||
getApiRequestOptions(this.config)
|
||||
);
|
||||
if (!response.ok) {
|
||||
const message = `Failed to read tree from ${url}, ${response.status} ${response.statusText}`;
|
||||
|
||||
Reference in New Issue
Block a user