Angela P Wen
4385ad5563
Send job_run_uuid to status report telemetry ( #1685 )
2023-06-20 23:45:51 -07:00
Henry Mercer
bf419682de
Remove unused CODESCANNING_EVENT_NAME environment variable
2023-05-31 15:37:11 +01:00
Charis Kyriakou
94cc1dea00
Add override for code scanning analysis of default branch
2023-03-23 13:31:00 +00:00
Henry Mercer
5f644f971e
Upgrade TypeScript to 9.2.0
2023-01-18 20:59:57 +00:00
Orhan Toy
b7028afcb4
Make sure env is reset between tests
2022-12-13 12:18:40 +00:00
Orhan Toy
ccee4c68ff
Add tests for CODE_SCANNING_REF
2022-12-13 11:51:16 +00:00
Henry Mercer
79f8286c68
Refactoring: Separate out workflow related functionality
...
No semantic changes.
2022-11-23 19:27:01 +00:00
Henry Mercer
b498c79130
Remove concept of Actions / runner mode
2022-11-14 16:37:48 +00:00
David Verdeguer
a03f3bd585
Build js
2022-09-07 09:45:19 +02:00
Chris Gavin
5960bffd3f
When running on a schedule, make a better guess about whether we're analyzing the default branch.
2022-08-25 10:58:16 +01:00
Angela P Wen
eeee462f05
Move debug artifact methods into separate file
2022-08-02 12:27:52 +02:00
Angela P Wen
5229df1eef
Add unit test descriptions
2022-08-01 13:17:40 +02:00
Andrew Eisenberg
d068f5372a
Fix failing tests
2022-03-25 10:00:47 -07:00
Alex Croteau
1eaaf07b91
Adds check on inputs and compiled files
2022-01-31 20:06:17 -05:00
Edoardo Pirovano
f360da772a
Sanitize artifact name before using
2021-11-05 08:40:16 +00: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
Henry Mercer
93c9da2c2e
Reference exported names via import *.
...
Rather than via properties on default exports — see
https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md
2021-08-11 13:17:04 +01:00
Edoardo Pirovano
05fc5a885c
Replace safeLoad with load
2021-07-27 22:12:26 +01:00
Edoardo Pirovano
d9849b8ca1
Rebuild after TypeScript version bump
2021-07-27 17:59:59 +01:00
Robert
146c897909
Upload CodeQL databases
2021-06-22 13:05:12 +01:00
Andrew Eisenberg
2c2ebdc5c5
Remove local environment running
...
This is a functionality that never worked perfectly and hasn't been
used for a while.
This allows developers to run the action on their local machine, but
the run was always flaky and never 100% mirrored what was happening on
the actions runner.
2021-06-02 11:26:11 -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
David Verdeguer
cd7eedd4a5
Address comments
2021-05-05 12:30:20 +02:00
David Verdeguer
3b741b35ad
Use actionsUtil.computeAutomationID on upload-lib
2021-05-03 19:56:04 +02:00
David Verdeguer
519d0771c7
Add actions-util.getAutomationID()
2021-05-03 19:36:32 +02:00
Simon Engledew
ba14abbca7
Rewrite the ref to correctly point to refs/remotes
...
Fixes the rev-parse issues caused by https://github.com/github/codeql-action/pull/428
2021-03-25 13:08:55 +00:00
Simon Engledew
ef92c5ac5f
Count the number of parents of the current commit to check it is still a merge
...
Work around a race condition in actions where sometimes GITHUB_SHA != git rev-parse head
2021-03-22 12:05:00 +00:00
Simon Engledew
1f07e287da
Do not report warning: undefined
2021-02-01 16:32:13 +00:00
Simon Engledew
44ed1c6ce1
Remove pull request warnings
2021-01-29 10:42:37 +00:00
Simon Engledew
795b1923ec
Swap method naming to account for new functionality
2021-01-22 13:52:03 +00:00
Simon Engledew
1a6f6a27b3
Implement PR feedback
2021-01-15 08:28:21 +00:00
Simon Engledew
0853901c0d
Fix overzealous warning when PR scanning is not required
2021-01-13 12:28:24 +00:00
Simon Engledew
456cd431ff
Improve test coverage
2021-01-04 12:05:37 +00:00
Simon Engledew
1511db33b3
Only check the steps of the job currently being run
2021-01-04 12:00:15 +00:00
Simon Engledew
e89a24b8cb
Only report the first CheckoutWrongHead lint error
2020-12-21 11:08:49 +00:00
Simon Engledew
2d00e8c6f7
Fix for numerical branch names
2020-12-18 10:23:46 +00:00
Simon Engledew
18c6a7d6d1
fix another edge case
2020-12-04 15:18:22 +00:00
Simon Engledew
7100f22932
Add a bunch of tests cases and harden the function aganst malformed workflows
2020-12-03 13:41:55 +00:00
Simon Engledew
107fe8422f
Add advanced test case
2020-12-02 08:48:34 +00:00
Simon Engledew
698e2a5487
Just convert the pattern into a RegExp...
2020-12-01 20:56:07 +00:00
Simon Engledew
4d862616ce
First iteration on feedback
2020-12-01 20:08:41 +00:00
Simon Engledew
b1be00db57
Test the branch patterns work both ways
2020-12-01 17:16:33 +00:00
Simon Engledew
145a3c1ed9
Add more wildcard examples
2020-12-01 15:33:27 +00:00
Simon Engledew
14719432ef
Add more test cases
2020-12-01 15:30:11 +00:00
Simon Engledew
c8ee1f4ef3
Handle wildcard branches
2020-12-01 15:21:30 +00:00
Simon Engledew
ac1c081de8
Handle the case where branches may be strings, including "*"
2020-12-01 12:03:50 +00:00
Simon Engledew
be09fb3e99
Implement feedback
2020-11-26 15:20:38 +00:00
Simon Engledew
92ffb08081
Tidy up ready for review
2020-11-24 17:21:25 +00:00
Simon Engledew
2ac22e8935
Send short codes that do not need URL encoding for better splunk tracing
2020-11-24 12:43:08 +00:00