Fix not being able to run variant analyses

The `controllerRepo` parameter was being encoded/escaped by Octokit,
resulting in a URL like
`repos/dsp-testing%2Fqc-controller/code-scanning/codeql/queries` rather
than `repos/dsp-testing/qc-controller/code-scanning/codeql/queries`.

This switches it to use the ID instead, since we already have the ID
and do not have access to the owner and repo separately anymore.
This commit is contained in:
Koen Vlaswinkel
2022-09-28 13:18:47 +02:00
parent 110d930b68
commit 2efff809eb

View File

@@ -361,9 +361,9 @@ async function runRemoteQueriesApiRequest(
try {
const octokit = await credentials.getOctokit();
const response: OctokitResponse<QueriesResponse, number> = await octokit.request(
'POST /repos/:controllerRepo/code-scanning/codeql/queries',
'POST /repositories/:controllerRepoId/code-scanning/codeql/queries',
{
controllerRepo: controllerRepo.fullName,
controllerRepoId: controllerRepo.id,
data
}
);