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

Add a 'source-root' input to the init Action #607

Merged
merged 21 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
42babdf
Add 'source-root' input to init action
mario-campos Jun 29, 2021
337ae83
Make 'source-root' init input relative to github.workspace
mario-campos Jun 29, 2021
a05a7f9
Remove '${{ github.workspace }}' from action.yml
mario-campos Jun 29, 2021
57f584a
Update CHANGELOG for PR #607
mario-campos Jun 29, 2021
e1cd524
Recompile JS files to bring JS inline with TS for PR #607
mario-campos Jun 29, 2021
66df091
Refer to $GITHUB_WORKSPACE specifically in source-root description
mario-campos Jun 30, 2021
35e1b55
Use path.resolve instead of path.join for sourceRoot
mario-campos Jun 30, 2021
a607042
Recompile code after accepting suggestions from PR #607 review
mario-campos Jun 30, 2021
c6728b6
Merge branch 'main' into source-root-input
adityasharad Jul 1, 2021
45c0f11
Clarify 'source-root' description to include default path
mario-campos Jul 1, 2021
c78fb87
Add test case for 'source-root' input to 'init' Action
mario-campos Jul 1, 2021
028f98f
Use different config file for testing 'source-root' input
mario-campos Jul 1, 2021
67d6f79
Delete 'packaing' from source-root test job name
mario-campos Jul 1, 2021
1c69fae
Avoid moving repo files out of \$GITHUB_WORKSPACE in 'source-root' test
mario-campos Jul 1, 2021
2ca807c
Merge branch 'source-root-input' of github.com:mario-campos/codeql-ac…
mario-campos Jul 1, 2021
12f1cff
Rename CodeQL action paths in 'source-root' test to reflect repo paths
mario-campos Jul 1, 2021
2c0da4b
Remove build.sh step from 'source-root' test
mario-campos Jul 1, 2021
b9217ca
Test presence of database instead of results of analysis
mario-campos Jul 2, 2021
06c6845
Add analyze step to 'source-root' input test case
mario-campos Jul 2, 2021
a4a91a8
Merge branch 'main' into source-root-input
mario-campos Jul 2, 2021
9932052
Merge branch 'main' into source-root-input
aibaars Jul 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [UNRELEASED]

- The `init` step of the Action now supports a `source-root` input to be able to specify a path under the GitHub workspace to be the root source-code directory. [#607](https://github.com/github/codeql-action/pull/607)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we mention that the default is the $GITHUB_WORKSPACE root?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

- The `analyze` step of the Action now supports a `skip-queries` option to merely build the CodeQL database without analyzing. This functionality is not present in the runner. Additionally, the step will no longer fail if it encounters a finalized database, and will instead continue with query execution. [#602](https://github.com/github/codeql-action/pull/602)

## 1.0.4 - 28 Jun 2021
Expand Down
3 changes: 3 additions & 0 deletions init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ inputs:
description: Try to auto-install your python dependencies
required: true
default: 'true'
source-root:
description: Path to the root source-code directory, relative to the workspace.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw you had trouble using ${{ github.workspace }} in the description. In https://github.com/actions/checkout/blob/main/action.yml they use $GITHUB_WORKSPACE and it appears that

default: ${{ github.workspace }}

is also allowed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is. That was in my first commit, but when I actually started to use it in my test, I found it inconvenient to always have to specify a ${{ github.workspace }} prefix. Hence, why I made it relative to the repo in subsequent commits.

mario-campos marked this conversation as resolved.
Show resolved Hide resolved
required: false
outputs:
codeql-path:
description: The path of the CodeQL binary used for analysis
Expand Down
4 changes: 3 additions & 1 deletion lib/init-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/init-action.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/init.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/init.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading