Skip to content

Commit b68e0b2

Browse files
mario-camposaofaof0907
authored andcommitted
Add 'source-root' input to init action
This input is exposed in the CodeQL CLI as the flag --source-root, allowing users of the CLI to set --source-root different from --working-dir. However, in codeql-action, these two paths are conflated and it poses problems for users with complicated build environments, in which a source root may be a child of the working directory. Most users should not notice this, as the default value is ${{ github.workspace }}, as it is implied now (`path.resolve()`).
1 parent d7d9e1a commit b68e0b2

10 files changed

Lines changed: 22 additions & 14 deletions

File tree

init/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ inputs:
3838
description: Try to auto-install your python dependencies
3939
required: true
4040
default: 'true'
41+
source-root:
42+
description: The root source-code directory.
43+
required: true
44+
default: ${{ github.workspace }}
4145
outputs:
4246
codeql-path:
4347
description: The path of the CodeQL binary used for analysis

lib/init-action.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/runner.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)