File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff 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 ( / \. w i k i $ / ) ) ;
162+
159163 if ( ! protocolInfos ) {
160164 logDebug ( "Could not get protocol infos" ) ;
161165 return undefined ;
@@ -174,7 +178,7 @@ export async function getGitHubContext(): Promise<GitHubContext | undefined> {
174178 return await Promise . all (
175179 protocolInfos . map ( async ( protocolInfo ) : Promise < GitHubRepoContext > => {
176180 logDebug ( "Getting infos for repository" , protocolInfo . url ) ;
177-
181+
178182 const repoInfo = await client . repos . get ( {
179183 repo : protocolInfo . protocol . repositoryName ,
180184 owner : protocolInfo . protocol . owner
You can’t perform that action at this time.
0 commit comments