From 4b4e66dce1148a3a6fc631a2cd4b99f214d75f78 Mon Sep 17 00:00:00 2001 From: Wojtek Zieba Date: Fri, 13 Sep 2024 10:09:41 +0200 Subject: [PATCH] Fix passing branch name when sending sarif fail On a main branch. Before this fix, we'd have `"message": "ref 'refs/heads/$branch' not found in this repository",` --- bin/upload_sarif_to_github | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/upload_sarif_to_github b/bin/upload_sarif_to_github index f981d3a..e27434a 100755 --- a/bin/upload_sarif_to_github +++ b/bin/upload_sarif_to_github @@ -48,7 +48,7 @@ elif [[ "$BUILDKITE_BRANCH" == "$BUILDKITE_PIPELINE_DEFAULT_BRANCH" ]]; then --rawfile sarif "$sarif_base64_temp_file" \ '{ "commit_sha": $commit_sha, - "ref": ("refs/heads/$branch"), + "ref": ("refs/heads/"+$branch), "sarif": $sarif }') else