Commit Graph

241 Commits

Author SHA1 Message Date
Henry Mercer
0fe34bd39a Extract language appropriately in analyze step when build mode specified 2024-02-07 13:19:29 +00:00
nickfyson
f72cffc780 add v2 deprecation warning 2024-01-18 20:51:16 +00:00
Michael B. Gale
df098abd11 Set DID_AUTOBUILD_GOLANG in runAutobuild 2023-10-04 19:45:08 +01:00
Henry Mercer
7dcb3e5276 Include runner disk info in status report 2023-08-07 16:27:56 +01:00
Henry Mercer
c6d284324b Pull out a dedicated status report file 2023-08-07 16:13:59 +01:00
Henry Mercer
2637069a45 Resolve dependency cycles between actions-util and workflow 2023-07-19 17:21:33 +01:00
Henry Mercer
0bc4788cf7 Resolve dependency cycle between api-client and actions-util 2023-07-19 17:01:05 +01:00
Henry Mercer
3a960869ac Simplify definitions of environment variables 2023-07-06 17:28:37 +01:00
Henry Mercer
e5c2f32a9f Consistently wrap errors 2023-04-06 17:04:21 +01:00
Angela P Wen
3cbd063679 Upload per-database diagnostic SARIFs on green and red runs (#1556)
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2023-03-20 21:09:04 +00:00
Henry Mercer
be8f7b01a2 Add types for package.json via @schemastore/package 2023-01-20 15:01:35 +00:00
Henry Mercer
1b508953b4 Remove checkActionVersion
This is no longer needed now that we only release v2
2023-01-20 15:01:35 +00:00
Henry Mercer
5f644f971e Upgrade TypeScript to 9.2.0 2023-01-18 20:59:57 +00:00
Henry Mercer
0dea34e91c Merge branch 'main' into henrymercer/delete-runner-part-2 2022-11-15 19:35:30 +00:00
Angela P Wen
5883c13406 Deprecate Go extraction reconciliation feature flag and CODEQL_EXTRACTOR_GO_BUILD_TRACING for custom builds (#1322)
Co-authored-by: Henry Mercer <henry.mercer@me.com>
2022-11-14 13:54:35 -08:00
Henry Mercer
9df773d1a3 Remove unneeded apiDetails input to getApiClient 2022-11-14 19:55:30 +00:00
Henry Mercer
b498c79130 Remove concept of Actions / runner mode 2022-11-14 16:37:48 +00:00
Andrew Eisenberg
701cea34ba More renaming 2022-10-11 10:39:40 -07:00
Andrew Eisenberg
b27aed78f5 Extract GitHubFeatureFlags to a separate class
Internal refactoring so that `GitHubFeatureFlags` is
private only. The public facing class is `Features`.
2022-10-06 18:00:40 -07:00
Henry Mercer
0d2fa3c636 Support autobuilding multiple languages in autobuild Action 2022-09-12 17:35:32 +01:00
Henry Mercer
fc2f344141 Reuse getApiDetails code 2022-09-02 19:59:18 +01:00
Henry Mercer
4b5dea8eed Address review comments 2022-09-02 17:54:53 +01:00
Henry Mercer
cf5d465980 Trace Go when Go extraction reconciliation is enabled 2022-09-01 14:42:59 +01:00
Angela P Wen
215c3cb4bb Autobuild Go in analyze step 2022-08-31 13:19:16 +01:00
Henry Mercer
0256599547 Prompt customers to upgrade from v1 to v2 2022-04-27 16:11:24 +01:00
Chuan-kai Lin
b0c570ef83 autobuild: add working-directory input 2022-04-08 13:37:42 -07:00
Andrew Eisenberg
3d93bb2ac9 Add UserError
This commit adds a `UserError` class that should be thrown when the
cause of an error is fundamentally from user configuration.

When sending status reports, avoid sending a `failure` for `UserError`s.
This will prevent our diagnostics from pinging us for errors outside of
our control.
2022-02-17 11:47:31 -08:00
Andrew Eisenberg
40568daca8 Fix compile errors introduced by typescript 4.4.2
4.4.2 introduces a breaking change that the variable in a catch clause
is now `unknown` type. So, we need to cast the `e`, `err`, or `error`
variables to type `Error`.
2021-09-10 14:06:27 -07:00
Edoardo Pirovano
d9849b8ca1 Rebuild after TypeScript version bump 2021-07-27 17:59:59 +01:00
Andrew Eisenberg
f60ef170b0 Cleaning up comments around env vars
Also, move `getTemporaryDirectory` back to `actions-util`.
2021-06-03 11:33:20 -07:00
Andrew Eisenberg
3708898bf2 Add environment variables to signal feature and version to the CLI
This PR ensures environment variables are set before any invocation of
the CLI.  Here is a list of vars that are set:

https://github.com/github/codeql-coreql-team/issues/1124#issuecomment-852463521

This ensures the CLI knows the features and versions of the containing
actions/runner.

Additionally:

- Fix the user agent so that it more closely aligns with user agent
  spec
- Refactor environment variable initialization so that it all happens in
  one place and call.
- Move Mode, getRequiredEnvParam, setMode, getMode out of actions-util
  and into util. actions-util is meant for utils only called by the
  action, not the runner.

The `prepareLocalRunEnvironment()` method is most likely deprecated and
should be removed. I originally added it because I had a way of working
where I would run the action from my local machine to test out changes,
but this was always a little flaky. So, I no longer use this way of
working. I will probably remove it soon.
2021-06-02 11:06:02 -07:00
Andrew Eisenberg
47588796b4 Send the version and mode with the user agent
This commit changes the way the action determines if running in action
or runner mode. There is now an environment variable that is set at the
beginning of the process and elsewhere in the process, we can check to
see if the variable is set.
2021-05-31 09:03:29 -07:00
Chris Gavin
ed751ece83 Allow overriding path of temporary files. 2021-02-01 15:34:13 +00:00
Eric Cornelissen
e6ea8cbae0 Run npm run build 2020-11-25 22:46:30 +01:00
Simon Engledew
eb4226ede4 Scanning endpoint failures should not halt the scan 2020-11-19 15:49:46 +00:00
Robert Brignull
121fd331cd Introduce actions-util.ts 2020-09-15 14:01:21 +01:00
Chris Raynor
a184d50a26 Running lint-fix 2020-09-14 10:44:43 +01:00
Robert Brignull
80e2c4fe4a improve error message when config is not found 2020-08-28 09:43:25 +01:00
Robert Brignull
a542021200 make --language optional to autobuild and detect dominant language 2020-08-27 14:08:54 +01:00
Robert Brignull
217483dfd6 Convert rest of the actions 2020-08-26 16:20:36 +01:00
Robert Brignull
9e342a9b83 rename the action entrypoint files 2020-08-24 15:15:26 +01:00