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.
This commit is contained in:
Elena Tanasoiu
2022-09-30 15:14:31 +01:00
parent a47031b0d5
commit deac8c8c02

View File

@@ -74,6 +74,19 @@ export async function getVariantAnalysisRepo(
return response.data;
}
export async function getVariantAnalysisRepoResult(
credentials: Credentials,
downloadUrl: string,
): Promise<unknown> {
const octokit = await credentials.getOctokit();
const response: OctokitResponse<VariantAnalysisRepoTask> = await octokit.request(
`GET ${downloadUrl}`
);
return response.data;
}
export async function getRepositoryFromNwo(
credentials: Credentials,
owner: string,