Skip to content

Commit

Permalink
remove hard-coded repo/owner
Browse files Browse the repository at this point in the history
  • Loading branch information
thedannywahl committed Feb 16, 2024
1 parent 38f20dd commit aac2664
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions isp-site/src/utils/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function getGithubRepoContents(owner, repo, branch) {
function formatGithubContents(contents, name, language) {
const l = getLang(language);
const s = getStrings(strings, l);
const dlUrl = `https://raw.githubusercontent.com/thedannywahl/instructure-security-package/${name}/`;
const dlUrl = `https://raw.githubusercontent.com/${owner}/${repo}/${name}/`;
const dirs = contents.filter((item) => item.type === "tree"); // TODO: Sort
const files = contents
.filter((item) => item.type === "blob")
Expand Down Expand Up @@ -53,6 +53,6 @@ export async function Explorer(page, branch, language) {

const contents = await getGithubRepoContents(owner, repo, name);

const mdTable = formatGithubContents(contents, name, language);
const mdTable = formatGithubContents(contents, owner, repo, name, language);
return mdTable;
}

0 comments on commit aac2664

Please sign in to comment.