Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9a9b0e4
Add a README section about supported versions
henrymercer Jan 26, 2024
a2c5130
Update changelog and version after v3.23.2
github-actions[bot] Jan 26, 2024
5c9716f
Update checked-in dependencies
github-actions[bot] Jan 26, 2024
738d232
Merge pull request #2101 from github/mergeback/v3.23.2-to-main-b7bf0a3e
henrymercer Jan 26, 2024
25f779c
Merge pull request #2100 from github/henrymercer/readme-note-on-suppo…
henrymercer Jan 26, 2024
cfefe3a
Clarify that ref inputs are ignored for forks
jsoref Jan 29, 2024
202c383
Merge pull request #2104 from jsoref/clarify-ignored-inputs
henrymercer Jan 30, 2024
eab49d7
Bump the npm group with 4 updates (#2103)
dependabot[bot] Jan 30, 2024
e33271d
Python: No dep installation by default for everyone
RasmusWL Jan 30, 2024
68d3483
Bump minor version
RasmusWL Jan 30, 2024
8c22ec9
Update changelog
RasmusWL Jan 30, 2024
ec42edc
Refactoring: Create interface for config initialization
henrymercer Jan 30, 2024
d2e867f
Refactoring: Introduce common method to stub a config
henrymercer Jan 30, 2024
401f9d6
Add experimental `build-mode` input to `init` Action
henrymercer Jan 22, 2024
0166a8a
Add build mode to configuration
henrymercer Jan 30, 2024
55c1fd5
Introduce `codeql.supportsFeature`
henrymercer Jan 30, 2024
d982a14
Pass build mode to `database init` when set
henrymercer Jan 30, 2024
463930c
Add PR check for none build mode
henrymercer Jan 31, 2024
e345133
Merge pull request #2107 from github/henrymercer/refactor-config
henrymercer Jan 31, 2024
254b53d
Merge branch 'main' into henrymercer/build-mode-input
henrymercer Jan 31, 2024
f7d5324
Update wording for CHANGELOG.md
RasmusWL Feb 1, 2024
b58c2f6
Detail requirements for different build modes
henrymercer Feb 1, 2024
483bef1
Merge pull request #2106 from github/rasmuswl/default-no-dep-inst
RasmusWL Feb 1, 2024
81eb6b2
Merge pull request #2108 from github/henrymercer/build-mode-input
henrymercer Feb 2, 2024
f9dea84
Status report: Handle failures determining disk usage
henrymercer Feb 2, 2024
2db0327
Merge pull request #2112 from github/henrymercer/status-report-handle…
henrymercer Feb 2, 2024
78d6c8e
Update changelog for v3.24.0
github-actions[bot] Feb 2, 2024
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
Prev Previous commit
Next Next commit
Add build mode to configuration
  • Loading branch information
henrymercer committed Jan 30, 2024
commit 0166a8a567cb0636637a96efaaa4f94fc385886e
6 changes: 4 additions & 2 deletions lib/config-utils.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/config-utils.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/config-utils.test.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/config-utils.test.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions 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

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/testing-utils.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/testing-utils.js.map

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

3 changes: 3 additions & 0 deletions src/config-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function createTestInitConfigInputs(
configFile: undefined,
dbLocation: undefined,
configInput: undefined,
buildModeInput: undefined,
trapCachingEnabled: false,
debugMode: false,
debugArtifactName: "",
Expand Down Expand Up @@ -322,6 +323,7 @@ test("load non-empty input", async (t) => {
// And the config we expect it to parse to
const expectedConfig: configUtils.Config = {
languages: [Language.javascript],
buildMode: "none",
originalUserInput: {
name: "my config",
"disable-default-queries": true,
Expand All @@ -347,6 +349,7 @@ test("load non-empty input", async (t) => {
const actualConfig = await configUtils.initConfig(
createTestInitConfigInputs({
languagesInput,
buildModeInput: "none",
configFile: configFilePath,
debugArtifactName: "my-artifact",
debugDatabaseName: "my-db",
Expand Down
9 changes: 9 additions & 0 deletions src/config-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export interface Config {
* Set of languages to run analysis for.
*/
languages: Language[];
/**
* Build mode, if set. Currently only a single build mode is supported per job.
*/
buildMode: string | undefined;
/**
* A unaltered copy of the original user input.
* Mainly intended to be used for status reporting.
Expand Down Expand Up @@ -399,6 +403,7 @@ export interface InitConfigInputs {
configFile: string | undefined;
dbLocation: string | undefined;
configInput: string | undefined;
buildModeInput: string | undefined;
trapCachingEnabled: boolean;
debugMode: boolean;
debugArtifactName: string;
Expand Down Expand Up @@ -428,6 +433,7 @@ export async function getDefaultConfig({
languagesInput,
queriesInput,
packsInput,
buildModeInput,
dbLocation,
trapCachingEnabled,
debugMode,
Expand Down Expand Up @@ -460,6 +466,7 @@ export async function getDefaultConfig({

return {
languages,
buildMode: buildModeInput,
originalUserInput: {},
tempDir,
codeQLCmd: codeql.getPath(),
Expand Down Expand Up @@ -500,6 +507,7 @@ async function loadConfig({
languagesInput,
queriesInput,
packsInput,
buildModeInput,
configFile,
dbLocation,
trapCachingEnabled,
Expand Down Expand Up @@ -546,6 +554,7 @@ async function loadConfig({

return {
languages,
buildMode: buildModeInput,
originalUserInput: parsedYAML,
tempDir,
codeQLCmd: codeql.getPath(),
Expand Down
1 change: 1 addition & 0 deletions src/init-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ async function run() {
languagesInput: getOptionalInput("languages"),
queriesInput: getOptionalInput("queries"),
packsInput: getOptionalInput("packs"),
buildModeInput: getOptionalInput("build-mode"),
configFile: getOptionalInput("config-file"),
dbLocation: getOptionalInput("db-location"),
configInput: getOptionalInput("config"),
Expand Down
Loading