Skip to content

Commit 075eb6a

Browse files
committed
Use getCommitOid to get the id
1 parent 1727de3 commit 075eb6a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

lib/database-upload.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/database-upload.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/database-upload.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as fs from "fs";
22

33
import * as actionsUtil from "./actions-util";
4-
import { getOptionalInput } from "./actions-util";
54
import { getApiClient, GitHubApiDetails } from "./api-client";
65
import { getCodeQL } from "./codeql";
76
import { Config } from "./config-utils";
@@ -45,8 +44,9 @@ export async function uploadDatabases(
4544
const bundledDb = await bundleDb(config, language, codeql, language);
4645
const bundledDbSize = fs.statSync(bundledDb).size;
4746
const bundledDbReadStream = fs.createReadStream(bundledDb);
48-
const commitOid =
49-
getOptionalInput("sha") || process.env["GITHUB_SHA"] || "";
47+
const commitOid = actionsUtil.getCommitOid(
48+
actionsUtil.getRequiredInput("checkout_path"),
49+
);
5050
try {
5151
await client.request(
5252
`POST https://uploads.github.com/repos/:owner/:repo/code-scanning/codeql/databases/:language?name=:name`,

0 commit comments

Comments
 (0)