Commit Graph

352 Commits

Author SHA1 Message Date
Michael B. Gale
c252c71195 Move initializeEnvironment out of util.ts 2026-10-16 22:15:06 +01:00
Michael B. Gale
dc2ed81cc7 Remove InstanceURL from util.ts 2026-10-16 22:04:05 +01:00
Michael B. Gale
02283e9542 Move more GitHub-related definitions from util.ts to github.ts 2026-10-16 21:54:02 +01:00
Michael B. Gale
86bc4448d3 Mark additional imports in util.ts as type-only 2026-10-16 21:52:19 +01:00
Michael B. Gale
9c72af5b2b Move codeQlVersionAtLeast out of util.ts and into CodeQL 2026-10-16 21:50:31 +01:00
Michael B. Gale
a76419a632 Move wrapError and getErrorMessage out of util.ts 2026-10-16 21:46:16 +01:00
Michael B. Gale
071544a67a Move HTTPError out of util.ts 2026-10-16 21:40:48 +01:00
Michael B. Gale
8bdea824e2 Move ConfigurationError out of util.ts 2026-10-16 21:39:54 +01:00
Michael B. Gale
102e46e9d1 Move some definitions out of util.ts into a new github.ts module 2026-10-14 18:19:46 +01:00
Michael B. Gale
9da96258e6 Merge remote-tracking branch 'origin/main' into mbg/start-proxy/deprecate-fallback 2026-10-14 13:56:57 +01:00
Michael B. Gale
5aa103d050 Add InstanceURL and use in DownloadSource 2026-10-12 15:52:22 +01:00
Michael B. Gale
c1b620cc0e Allow initializeEnvironment to accept Env 2026-10-12 15:16:08 +01:00
Michael B. Gale
f4a15a13fd Try to load failed config if normal config is unavailable
Adapt relevant functions by narrowing their types or skipping steps that would otherwise have been skipped as well
2026-10-12 13:07:48 +01:00
Michael B. Gale
d6196d8703 Rename exportVariable wrapper to exportEnvVar 2026-10-08 20:06:51 +01:00
Michael B. Gale
1728f0c676 Add wrapper around core.exportVariable 2026-10-07 20:12:00 +01:00
Michael B. Gale
63c5299790 Move isInTestMode to environment.ts 2026-10-07 20:12:00 +01:00
Michael B. Gale
aa2cb993a1 Merge remote-tracking branch 'origin/main' into mbg/improve-json-failures 2026-09-24 11:42:41 +01:00
Michael B. Gale
8e36092a16 Wrap JSON parse errors in cloneObject with context 2026-09-22 18:52:03 +01:00
Michael B. Gale
2294a7a8b1 Wrap JSON parse errors in parseMatrixInput with context 2026-09-22 18:46:55 +01:00
Henry Mercer
dba87a18dc Clarify elapsed-time helper documentation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-22 16:07:10 +01:00
Henry Mercer
f4fa111630 Share elapsed-time rounding for bundle downloads
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-16 19:51:23 +01:00
Mario Campos
1cf8f518e1 Merge pull request #4140 from github/mario-campos/move-withTmpFile
Move `withTmpFile` next to `withTmpDir`
2026-09-11 18:54:51 +00:00
Mario Campos
faf4f3af21 Add JSDoc to withTmpFile 2026-09-11 11:12:03 -05:00
Mario Campos
80d5f4e36a Always clean-up temp dirs in withTmpDir 2026-09-10 18:48:14 -05:00
Mario Campos
f6491d646e Reduce duplication by using withTmpDir in withTmpFile 2026-09-10 15:37:39 -05:00
Mario Campos
4375107b7e Move withTmpFile to util.ts and update tests to use it 2026-09-10 15:36:26 -05:00
Henry Mercer
ceb85f25b5 Distinguish GitHub-hosted runners from ones that look hosted
`isHostedRunner` infers hostedness from the runner name and the toolcache path, so it also matches self-hosted runners that are configured to resemble hosted ones. Rename it to `looksLikeHostedRunner` so callers can see they are getting a heuristic, and add `isGitHubHostedRunner`, which reads the `RUNNER_ENVIRONMENT` value the Actions service reports. The existing callers keep the heuristic, so there is no behaviour change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 10:12:09 +01:00
Mario Campos
0a99875ae5 Move VersionInfo-related types to cli/output-cache.ts
This brings them out of the crowded all-purpose `util.ts` and into `cli/output-cache.ts` where they are exclusively used.
2026-08-11 15:55:15 -05:00
Mario Campos
246018e041 Move VersionInfo to dedicated module 2026-08-11 15:55:15 -05:00
Mario Campos
1332611f51 Move cache-related util functions into dedicated module 2026-08-11 15:55:15 -05:00
Mario Campos
bfcd769ba1 Fix JSDoc of env param 2026-08-11 15:36:17 -05:00
Mario Campos
208a88adc7 Simplify JSDoc of getCachedCodeQlVersion
Co-authored-by: Michael B. Gale <mbg@github.com>
2026-08-11 11:06:17 -05:00
Mario Campos
9183a7b6e1 Handle file-read errors as cache misses
This is particularly important for the first time that `getCachedCodeQlVersion` is invoked, as this cache file will not yet exist.
2026-08-10 10:44:48 -05:00
Mario Campos
5f8c44ba62 Persist CodeQL version output to file rather than environment 2026-08-07 15:11:20 -05:00
Michael B. Gale
1d0e1b20e5 Move env var getters out of util.ts 2026-07-09 12:20:20 +01:00
Michael B. Gale
4c868b3e7e Allow setting environment variables 2026-07-09 12:14:09 +01:00
Michael B. Gale
8d24507592 Allow env input for relevant functions in actions-util.ts 2026-07-09 12:14:07 +01:00
Michael B. Gale
73b0850a89 Allow abstracting over process.env 2026-07-06 12:27:42 +01:00
Henry Mercer
9cfb67bab9 Add clarifying comments 2026-06-30 16:49:29 +01:00
Henry Mercer
5ccef82244 Address review comments 2026-06-03 18:31:11 +01:00
Henry Mercer
bab673d0e0 Cache CLI version information across Actions steps 2026-06-02 19:27:05 +01:00
Michael B. Gale
048d0ea295 Address review comments 2026-03-10 15:54:58 +00:00
Michael B. Gale
1721ce7afd Address minor review comments 2026-03-03 11:05:37 +00:00
Michael B. Gale
d7cfd19fb8 Move SARIF types out of util.ts 2026-03-01 13:42:46 +00:00
Henry Mercer
056b0912cf Merge branch 'main' into henrymercer/overlay-repo-property 2026-02-25 14:43:34 +00:00
Henry Mercer
445a2a9bb2 Record overlay disablement reason 2026-02-25 14:36:03 +00:00
Henry Mercer
16adc4e672 Merge pull request #3506 from github/henrymercer/result-better-inference
Improve type inference of `Result<T, E>`
2026-02-24 20:05:34 +00:00
Henry Mercer
2a607fea25 Update JSDoc
Co-authored-by: Michael B. Gale <mbg@github.com>
2026-02-24 19:28:27 +00:00
Henry Mercer
e51b6a9a52 Update names in tests 2026-02-24 17:55:29 +00:00
Henry Mercer
160d27baf0 Improve type inference of Result<T, E> 2026-02-24 17:41:30 +00:00