Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into v1 #549

Merged
merged 37 commits into from
Jun 7, 2021
Merged

Merge main into v1 #549

merged 37 commits into from
Jun 7, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 7, 2021

Merging 242fd82 into v1

Conductor for this PR is @chrisgavin

Contains the following pull requests:

Please review the following:

  • The CHANGELOG displays the correct version and date.
  • The CHANGELOG includes all relevant, user-facing changes since the last release.
  • There are no unexpected commits being merged into the v1 branch.
  • The docs team is aware of any documentation changes that need to be released.
  • The mergeback PR is merged back into main after this PR is merged.

okyanusoz and others added 30 commits April 3, 2021 21:55
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.
Update the ql queries to account for change in how we look for runner

Previously, we guarded blocks of code to be run by the runner or the
action using if statements like this:

```js
if (mode === "actions") ...
```

We are no longer doing this. And now, the `unguarded-action-lib.ql`
query is out of date. This query checks that runner code does not
unintentionally access actions-only methods in the libraries.

With these changes, we now ensure that code scanning is happy.
Send version and mode to code scanning via user agent
We need to tag and mergeback if the tag does _not_ already exist.
This should have happened in a mergeback PR, but the workflow to
generate this was broken.
The removeNPMAbsolutePaths check requires no newlines at the
end of the file. This ensures that the version update mimics
the behavior.
Hooks are new to commander v8. We can use hooks to ensure that `setMode`
is called before every command is invoked.
Use commander preAction hook for setMode
…r-versions

Update supported GitHub Enterprise Server versions.
Update unguarded-action-lib.ql to catch uses of actions-util.ts
This PR ensures environment variables are set before any invocation of
the CLI.  Here is a list of vars that are set:

github/codeql-core#1124 (comment)

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.
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.
Must access the env var directly in order to avoid recursive calls to 
`getRequiredEnvParam`.
Also, move `getTemporaryDirectory` back to `actions-util`.
Add environment variables to signal feature and version to the CLI
@chrisgavin chrisgavin merged commit 675843d into v1 Jun 7, 2021
@chrisgavin chrisgavin deleted the update-v1.0.1-242fd828 branch June 7, 2021 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants