Skip to content

Commit 268138e

Browse files
Merge pull request #159 from github/lrotschy-ketchuponmyketchup/filter-wikis
Filter out wikis
2 parents 36a3b77 + ac17416 commit 268138e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/git/repository.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,11 @@ export async function getGitHubContext(): Promise<GitHubContext | undefined> {
155155
try {
156156
const git = await getGitExtension();
157157

158-
const protocolInfos = await getGitHubUrls();
158+
const allProtocolInfos = await getGitHubUrls();
159+
160+
// Filter out wiki repositories because the GET call will fail and throw an error
161+
const protocolInfos = allProtocolInfos?.filter(info => !info.protocol.repositoryName.match(/\.wiki$/));
162+
159163
if (!protocolInfos) {
160164
logDebug("Could not get protocol infos");
161165
return undefined;

0 commit comments

Comments
 (0)