Skip to content

Commit

Permalink
Use getCommitOid to get the id
Browse files Browse the repository at this point in the history
  • Loading branch information
Nora committed Oct 5, 2023
1 parent 1727de3 commit 075eb6a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions lib/database-upload.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/database-upload.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/database-upload.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as fs from "fs";

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

0 comments on commit 075eb6a

Please sign in to comment.