codeql-action/lib
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
..
testdata Avoid analyzing excluded language files for line counting 2021-04-28 16:07:55 -07:00
actions-util.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
actions-util.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
actions-util.test.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
actions-util.test.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
analysis-paths.js Fix spelling errors 2021-03-18 09:40:47 -07:00
analysis-paths.js.map Run npm run lint-fix. 2020-10-05 12:44:58 +01:00
analysis-paths.test.js Add configuration option to set CodeQL DB location 2021-05-18 00:13:36 +01:00
analysis-paths.test.js.map Add configuration option to set CodeQL DB location 2021-05-18 00:13:36 +01:00
analyze-action.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
analyze-action.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
analyze.js Analyze: Log analysis summaries for custom queries 2021-05-28 19:36:21 +01:00
analyze.js.map Analyze: Log analysis summaries for custom queries 2021-05-28 19:36:21 +01:00
analyze.test.js Analyze: Log the analysis summary in its own group 2021-05-20 12:32:09 -07:00
analyze.test.js.map Analyze: Log the analysis summary in its own group 2021-05-20 12:32:09 -07:00
api-client.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
api-client.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
api-client.test.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
api-client.test.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
api-compatibility.json Update supported GitHub Enterprise Server versions. 2021-02-20 00:26:14 +00:00
autobuild-action.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
autobuild-action.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
autobuild.js Switching to import/order instead of sort-imports 2020-10-01 11:03:46 +01:00
autobuild.js.map Switching to import/order instead of sort-imports 2020-10-01 11:03:46 +01:00
codeql.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
codeql.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
codeql.test.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
codeql.test.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
config-utils.js Check available languages 2021-05-23 21:14:07 +02:00
config-utils.js.map Check available languages 2021-05-23 21:14:07 +02:00
config-utils.test.js Check available languages 2021-05-23 21:14:07 +02:00
config-utils.test.js.map Check available languages 2021-05-23 21:14:07 +02:00
count-loc.js Add Ruby as a possible language 2021-05-21 18:45:08 +02:00
count-loc.js.map Add Ruby as a possible language 2021-05-21 18:45:08 +02:00
count-loc.test.js Change include path for lines of code counting 2021-05-13 12:05:01 -07:00
count-loc.test.js.map Change include path for lines of code counting 2021-05-13 12:05:01 -07:00
defaults.json Update CodeQL bundle to 20210517 / 2.5.5 2021-05-17 20:38:22 +02:00
error-matcher.js Merge branch 'main' into nickfyson/error_wrapper 2020-09-14 13:30:37 +01:00
error-matcher.js.map Merge branch 'main' into nickfyson/error_wrapper 2020-09-14 13:30:37 +01:00
error-matcher.test.js Merge branch 'main' into nickfyson/error_wrapper 2020-09-14 13:30:37 +01:00
error-matcher.test.js.map Merge branch 'main' into nickfyson/error_wrapper 2020-09-14 13:30:37 +01:00
external-queries.js only insert external repos token if supplied 2021-01-19 15:42:57 +00:00
external-queries.js.map only insert external repos token if supplied 2021-01-19 15:42:57 +00:00
external-queries.test.js only insert external repos token if supplied 2021-01-19 15:42:57 +00:00
external-queries.test.js.map only insert external repos token if supplied 2021-01-19 15:42:57 +00:00
fingerprints.js fix typos in logging 2021-05-06 09:26:42 +01:00
fingerprints.js.map fix typos in logging 2021-05-06 09:26:42 +01:00
fingerprints.test.js Avoid fingerprinting directories 2021-05-05 13:37:17 -07:00
fingerprints.test.js.map Avoid fingerprinting directories 2021-05-05 13:37:17 -07:00
init-action.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
init-action.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
init.js Send the version and mode with the user agent 2021-05-31 09:03:29 -07:00
init.js.map Send the version and mode with the user agent 2021-05-31 09:03:29 -07:00
languages.js Add Ruby as a possible language 2021-05-21 18:45:08 +02:00
languages.js.map Add Ruby as a possible language 2021-05-21 18:45:08 +02:00
languages.test.js Run npm run build 2020-11-20 11:35:59 +01:00
languages.test.js.map Switching to import/order instead of sort-imports 2020-10-01 11:03:46 +01:00
logging.js Introduce our own toolcache implementation for use by the runnner 2021-04-22 15:31:15 +01:00
logging.js.map Introduce our own toolcache implementation for use by the runnner 2021-04-22 15:31:15 +01:00
repository.js Running lint-fix 2020-09-14 10:44:43 +01:00
repository.js.map commit node_modules and generated files 2020-08-11 12:43:27 +01:00
runner.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
runner.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
shared-environment.js Running lint-fix 2020-09-14 10:44:43 +01:00
shared-environment.js.map remove should_abort method 2020-08-07 16:56:04 +01:00
testing-utils.js Introduce our own toolcache implementation for use by the runnner 2021-04-22 15:31:15 +01:00
testing-utils.js.map Introduce our own toolcache implementation for use by the runnner 2021-04-22 15:31:15 +01:00
toolcache.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
toolcache.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
toolrunner-error-catcher.js Run npm run build 2020-11-20 11:35:59 +01:00
toolrunner-error-catcher.js.map Run npm run build 2020-11-20 11:35:59 +01:00
toolrunner-error-catcher.test.js Merge branch 'main' into nickfyson/error_wrapper 2020-09-14 13:30:37 +01:00
toolrunner-error-catcher.test.js.map Switching to import/order instead of sort-imports 2020-10-01 11:03:46 +01:00
tracer-config.js Add configuration option to set CodeQL DB location 2021-05-18 00:13:36 +01:00
tracer-config.js.map Add configuration option to set CodeQL DB location 2021-05-18 00:13:36 +01:00
tracer-config.test.js Add configuration option to set CodeQL DB location 2021-05-18 00:13:36 +01:00
tracer-config.test.js.map Add configuration option to set CodeQL DB location 2021-05-18 00:13:36 +01:00
upload-lib.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
upload-lib.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
upload-lib.test.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
upload-lib.test.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
upload-sarif-action.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
upload-sarif-action.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
util.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
util.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
util.test.js Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00
util.test.js.map Add environment variables to signal feature and version to the CLI 2021-06-02 11:06:02 -07:00