Skip to content

Commit deac8c8

Browse files
committed
Add API method for download scanned repo result
This will download the result for a particular repo by making a call to the download URL via octokit.
1 parent a47031b commit deac8c8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

extensions/ql-vscode/src/remote-queries/gh-api/gh-api-client.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,19 @@ export async function getVariantAnalysisRepo(
7474
return response.data;
7575
}
7676

77+
export async function getVariantAnalysisRepoResult(
78+
credentials: Credentials,
79+
downloadUrl: string,
80+
): Promise<unknown> {
81+
const octokit = await credentials.getOctokit();
82+
83+
const response: OctokitResponse<VariantAnalysisRepoTask> = await octokit.request(
84+
`GET ${downloadUrl}`
85+
);
86+
87+
return response.data;
88+
}
89+
7790
export async function getRepositoryFromNwo(
7891
credentials: Credentials,
7992
owner: string,

0 commit comments

Comments
 (0)