mirror of
https://github.com/github/codeql-action.git
synced 2026-05-12 17:00:15 +00:00
Make the CodeQL instance a required parameter of uploadFiles
All the places that still call `uploadFiles` instead of `uploadSpecifiedFiles` are guaranteed to already have one.
This commit is contained in:
@@ -344,6 +344,7 @@ async function run() {
|
||||
const uploadInput = actionsUtil.getOptionalInput("upload");
|
||||
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
||||
uploadResult = await uploadLib.uploadFiles(
|
||||
codeql,
|
||||
outputDir,
|
||||
actionsUtil.getRequiredInput("checkout_path"),
|
||||
actionsUtil.getOptionalInput("category"),
|
||||
@@ -355,6 +356,7 @@ async function run() {
|
||||
|
||||
if (config.augmentationProperties.qualityQueriesInput !== undefined) {
|
||||
const qualityUploadResult = await uploadLib.uploadFiles(
|
||||
codeql,
|
||||
outputDir,
|
||||
actionsUtil.getRequiredInput("checkout_path"),
|
||||
actionsUtil.fixCodeQualityCategory(
|
||||
|
||||
@@ -407,6 +407,7 @@ async function testFailedSarifUpload(
|
||||
}
|
||||
t.true(
|
||||
uploadFiles.calledOnceWith(
|
||||
sinon.match.any,
|
||||
sinon.match.string,
|
||||
sinon.match.string,
|
||||
category,
|
||||
|
||||
@@ -99,6 +99,7 @@ async function maybeUploadFailedSarif(
|
||||
|
||||
logger.info(`Uploading failed SARIF file ${sarifFile}`);
|
||||
const uploadResult = await uploadLib.uploadFiles(
|
||||
codeql,
|
||||
sarifFile,
|
||||
checkoutPath,
|
||||
category,
|
||||
|
||||
+2
-1
@@ -645,6 +645,7 @@ export const CodeQualityTarget: UploadTarget = {
|
||||
* to.
|
||||
*/
|
||||
export async function uploadFiles(
|
||||
codeQL: CodeQL,
|
||||
inputSarifPath: string,
|
||||
checkoutPath: string,
|
||||
category: string | undefined,
|
||||
@@ -658,7 +659,7 @@ export async function uploadFiles(
|
||||
);
|
||||
|
||||
return uploadSpecifiedFiles(
|
||||
undefined,
|
||||
codeQL,
|
||||
sarifPaths,
|
||||
checkoutPath,
|
||||
category,
|
||||
|
||||
Reference in New Issue
Block a user