mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Rename determineMergeBaseCommitOid()
The name suggests that the function computes the merge base, which for Git means specifically the best common ancestors between multiple commits or branches (see `git merge-base`). But what the function actually does is to calculate the HEAD commit of the PR base branch, as derived from the PR merge commit that the action analyzes. So even though the function has to do with "merge" and "base", using the term "merge base" is still misleading at best. This commit renames the function to determineBaseBranchHeadCommitOid(), which more clearly indicates what the function does.
This commit is contained in:
2
lib/upload-lib.js
generated
2
lib/upload-lib.js
generated
@@ -413,7 +413,7 @@ async function uploadFiles(sarifPath, checkoutPath, category, features, logger)
|
||||
logger.debug(`Compressing serialized SARIF`);
|
||||
const zippedSarif = zlib_1.default.gzipSync(sarifPayload).toString("base64");
|
||||
const checkoutURI = (0, file_url_1.default)(checkoutPath);
|
||||
const payload = buildPayload(await actionsUtil.getCommitOid(checkoutPath), await actionsUtil.getRef(), analysisKey, util.getRequiredEnvParam("GITHUB_WORKFLOW"), zippedSarif, actionsUtil.getWorkflowRunID(), actionsUtil.getWorkflowRunAttempt(), checkoutURI, environment, toolNames, await actionsUtil.determineMergeBaseCommitOid());
|
||||
const payload = buildPayload(await actionsUtil.getCommitOid(checkoutPath), await actionsUtil.getRef(), analysisKey, util.getRequiredEnvParam("GITHUB_WORKFLOW"), zippedSarif, actionsUtil.getWorkflowRunID(), actionsUtil.getWorkflowRunAttempt(), checkoutURI, environment, toolNames, await actionsUtil.determineBaseBranchHeadCommitOid());
|
||||
// Log some useful debug info about the info
|
||||
const rawUploadSizeBytes = sarifPayload.length;
|
||||
logger.debug(`Raw upload size: ${rawUploadSizeBytes} bytes`);
|
||||
|
||||
Reference in New Issue
Block a user