kbowers-ibm commented on code in PR #2099:
URL:
https://github.com/apache/incubator-kie-tools/pull/2099#discussion_r1439445985
##########
packages/chrome-extension/src/app/github/api.ts:
##########
@@ -29,6 +29,12 @@ export function fetchFile(
contentType?: ContentType,
commitSHA?: string
) {
+ const rawGithubUserContentUrl = "https://raw.githubusercontent.com";
+ const modifiedRawGithubUserContentUrl = new URL(rawGithubUserContentUrl);
+ modifiedRawGithubUserContentUrl.pathname = `${org}/${repo}/${ref}/${path}`;
+ if (commitSHA) {
+ modifiedRawGithubUserContentUrl.pathname =
`${modifiedRawGithubUserContentUrl.pathname}/${commitSHA}`;
+ }
Review Comment:
Thanks Tiago, I defined the const inline in the catch block, and removed the
commitSHA stuff entirely
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]