Commit Graph

222 Commits

Author SHA1 Message Date
Michael B. Gale f59338d600 Remove isCCR 2026-02-24 10:33:23 +00:00
Michael B. Gale c7d0b92094 Drop isDynamic check from isCCR
The analysis key already tells us this under normal conditions
2026-01-19 13:47:50 +00:00
Michael B. Gale 055e6b6f36 Add EnvVar constant for analysis key 2026-01-19 13:41:38 +00:00
Michael B. Gale 1782089bde Merge branch 'main' into mbg/ignore-generated 2026-01-19 13:09:15 +00:00
Michael B. Gale 3eaf00092b Add isCCR helper, and update isDefaultSetup 2025-11-19 19:07:21 +00:00
Henry Mercer cac5926de5 Delete unused exports 2025-11-18 18:16:54 +00:00
Michael B. Gale 43ce7ef399 Add isDynamicWorkflow function 2025-10-06 12:55:54 +01:00
Paolo Tranquilli 739fb03359 Merge branch 'main' into redsun82/unsupported-plat 2025-08-07 15:47:22 +02:00
Paolo Tranquilli bb56324516 Address review 2025-08-07 15:43:56 +02:00
Michael B. Gale 9fb8f2d0c2 Update src/actions-util.ts
Co-authored-by: Henry Mercer <henrymercer@github.com>
2025-08-06 10:38:34 +01:00
Michael B. Gale 72770345eb Fix legacy SARIF categories for CQ in default setup 2025-08-06 10:14:36 +01:00
Chuan-kai Lin 60a2a7d623 Add isAnalyzingPullRequest() 2025-07-03 12:35:24 -07:00
Henry Mercer b58f4471c8 Use @actions/io to locate binaries 2024-12-19 14:21:06 +00:00
Chuan-kai Lin b0cd76b9fb Move Git functions to git-utils.ts 2024-12-10 08:44:11 -08:00
Chuan-kai Lin 57a28594b9 getPullRequestEditedDiffRanges: work around fatal error
This commits adds a "git repack" step to getPullRequestEditedDiffRanges
to work around a Git bug concerning tracking of grafted commits.
2024-12-09 10:46:38 -08:00
Chuan-kai Lin 3e10d3452b deepenGitHistory: do not fetch submodules 2024-12-09 10:46:38 -08:00
Chuan-kai Lin dd4aa40016 deepenGitHistory: specify HEAD
This commit makes deepenGitHistory pass "origin HEAD" to Git fetch,
which prevents Git from fetching all branches that are present in the
remote repository.
2024-12-09 10:46:38 -08:00
Chuan-kai Lin a28215865a Merge branch 'main' into cklin/diff-range-filtering 2024-10-31 06:12:13 -07:00
Michael B. Gale 471ed9f4c5 Move isDefaultSetup to actions-util.ts and change implementation 2024-10-29 12:08:08 +00:00
Chuan-kai Lin db539989ff Add Git helper functions 2024-10-23 14:32:34 -07:00
Chuan-kai Lin 5e475b7659 Add debug logging to runGitCommand() 2024-10-21 10:37:28 -07:00
Chuan-kai Lin 2bfc468cd8 Add decodeGitFilePath() 2024-10-21 10:37:28 -07:00
Fotis Koutoulakis (@NlightNFotis) 9bc4ee10c7 review-comments: add more descriptive comments to various persist/restoreState callsites.
Co-authored-by: Henry Mercer <henrymercer@github.com>
Co-authored-by: Fotis Koutoulakis <nlightnfotis@github.com>
2024-10-21 15:43:09 +01:00
Chris Gavin 6026274108 Persist inputs between the upload action and its post step. 2024-10-21 10:45:46 +01:00
Henry Mercer edd7713837 Only echo command if we are streaming the stdout 2024-10-10 19:48:21 +01:00
Henry Mercer cd83b08c78 Add streaming API for zstd extraction 2024-10-10 19:48:20 +01:00
Chuan-kai Lin d64cca4b60 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.
2024-10-03 08:43:36 -07:00
Chuan-kai Lin 955d00143d Extract runGitCommand() 2024-10-03 08:29:52 -07:00
Henry Mercer 1aa7f6f05d Refactor: Pull out generic tool invocation functionality 2024-10-01 14:39:04 +01:00
Henry Mercer ecb9ccfcb1 Fix new linter errors 2024-08-05 19:22:26 +01:00
Henry Mercer 1354fe5355 Attempt to clean up the database cluster directory
This will help to avoid issues where the database cluster directory is left in an inconsistent state.
2024-06-12 13:19:30 +01:00
Henry Mercer cc96c825ba List matching Actions caches 2024-05-21 22:27:49 +01:00
Michael B. Gale 3901d1208a Unify error messages in getFileType 2024-04-12 13:22:28 +01:00
Michael B. Gale 1829b70201 Emit diagnostic if file is not installed 2024-04-11 17:20:48 +01:00
Michael B. Gale 8ea1a11e72 Produce a clearer error message when file is not installed 2024-04-11 12:57:47 +01:00
Henry Mercer c0917251d4 Refactoring: Convert ActionName to enum 2024-02-29 11:29:32 +00:00
nickfyson f32f0bf8e4 ensure only the upload-sarif action can submit a status report with first_party_analysis=false 2024-02-21 14:01:56 +00:00
nickfyson a7dc229496 add first_party_analysis boolean to all status reports 2024-02-20 14:58:26 +00:00
Angela P Wen 1515e2bb20 Refactor configuration errors (#2105)
Refactor the existing classes of configuration errors into their own file; consolidate the place we check for configuration errors into `codeql.ts`, where the actual command invocations happen.

Also, rename the `UserError` type to `ConfigurationError` to standardize on a single term.
2024-02-08 17:20:03 +00:00
Henry Mercer 1d367b0bec Improve error categorizations 2023-12-01 17:54:38 +00:00
Michael B. Gale 738030674f Trim file output 2023-10-05 10:25:31 +01:00
Michael B. Gale 9a5a628613 Improve getFileType
- Change parameter name
- Add more documentation
2023-10-04 19:50:02 +01:00
Michael B. Gale 4cee553ea6 Output stdout upon error in getFileType 2023-10-04 19:45:08 +01:00
Michael B. Gale 3c15d2383b Add utility function to run file command 2023-10-04 17:23:52 +01:00
Andrew Eisenberg 469786860d Address more comments from PR 2023-08-29 13:20:55 -07:00
Andrew Eisenberg 09940b4bb9 Address comments from PR 2023-08-29 12:11:32 -07:00
Andrew Eisenberg d721f69753 Add better error messages when determining merge-base
Avoid printing scary error messages to console when the current
directory is not a git repo. Instead provide a better reason for the git
failure and continue on.
2023-08-28 15:50:30 -07:00
Henry Mercer c6d284324b Pull out a dedicated status report file 2023-08-07 16:13:59 +01:00
Henry Mercer 5691205077 Make not specifying a required input a user error 2023-07-28 18:18:27 +01:00
Angela P Wen b16296be30 Auto-fix linting errors 2023-07-25 10:34:21 +02:00