Skip to content

Merge releases/v2 into releases/v1 #1491

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

Merged
merged 32 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
00c2a84
Update changelog and version after v2.1.38
invalid-email-address Jan 12, 2023
10f2d3c
Update checked-in dependencies
invalid-email-address Jan 12, 2023
2073a69
Merge pull request #1477 from github/mergeback/v2.1.38-to-main-515828d9
henrymercer Jan 12, 2023
259993b
python-setup: Handle poetry `virtualenvs.options.no-pip = true`
RasmusWL Dec 9, 2022
932b6a9
python-setup: Fix path for tests
RasmusWL Dec 12, 2022
ebf1b8f
Fix prettier problem
RasmusWL Dec 12, 2022
b810730
python-setup: Fix for python2
RasmusWL Dec 15, 2022
2649b66
python-setup: Fix site-packages selection without pip for Windows
RasmusWL Jan 13, 2023
2f6d174
python-setup: Make debug printing more obvious
RasmusWL Jan 13, 2023
4bd9723
`npm run build`
RasmusWL Dec 15, 2022
5ed1e98
python-setup: Fix site-package selection for unix
RasmusWL Jan 13, 2023
32be38e
Merge pull request #1431 from github/rasmuswl/poetry-always-install-pip
RasmusWL Jan 16, 2023
4b40a3a
Add a notice that CodeQL Action v1 is discontinued
henrymercer Jan 16, 2023
28c93a0
Add changelog note
henrymercer Jan 16, 2023
b625b62
Hide error message and stack for non-error
aeisenberg Jan 17, 2023
5b9b480
Update changelog
aeisenberg Jan 17, 2023
e6e3bf4
Update src/actions-util.ts
aeisenberg Jan 17, 2023
e199504
Update supported GitHub Enterprise Server versions.
web-flow Jan 18, 2023
40cfcb0
Merge pull request #1485 from github/aeisenberg/comitoid-message
aeisenberg Jan 18, 2023
9b1206e
Fix a bug in cli config parsing
aeisenberg Jan 18, 2023
60e58b4
Merge branch 'main' into henrymercer/discontinue-v1
henrymercer Jan 18, 2023
6dfc772
Add link to new changelog post
henrymercer Jan 18, 2023
d731c01
Merge pull request #1486 from github/update-supported-enterprise-serv…
henrymercer Jan 18, 2023
e0fd640
Merge pull request #1487 from github/aeisenberg/queries-check
aeisenberg Jan 18, 2023
597c204
Merge pull request #1481 from github/henrymercer/discontinue-v1
henrymercer Jan 18, 2023
48fa828
Update changelog for v2.1.39
invalid-email-address Jan 18, 2023
a34ca99
Merge pull request #1489 from github/update-v2.1.39-597c2041
henrymercer Jan 18, 2023
a5cefa8
Revert "Update version and changelog for v1.1.38"
invalid-email-address Jan 18, 2023
be59c06
Revert "Update checked-in dependencies"
invalid-email-address Jan 18, 2023
61d6a49
Merge remote-tracking branch 'origin/releases/v2' into update-v1.1.39…
invalid-email-address Jan 18, 2023
beac105
Update version and changelog for v1.1.39
invalid-email-address Jan 18, 2023
1e06504
Update checked-in dependencies
invalid-email-address Jan 18, 2023
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
14 changes: 8 additions & 6 deletions lib/analyze.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/analyze.js.map

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions lib/codeql.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/codeql.js.map

Large diffs are not rendered by default.

25 changes: 15 additions & 10 deletions src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,6 @@ export async function runQueries(
);
const packsWithVersion = config.packs[language] || [];

const hasBuiltinQueries = queries?.builtin.length > 0;
const hasCustomQueries = queries?.custom.length > 0;
const hasPackWithCustomQueries = packsWithVersion.length > 0;

if (!hasBuiltinQueries && !hasCustomQueries && !hasPackWithCustomQueries) {
throw new Error(
`Unable to analyze ${language} as no queries were selected for this language`
);
}

try {
if (await util.useCodeScanningConfigInCli(codeql, featureEnablement)) {
// If we are using the code scanning config in the CLI,
Expand Down Expand Up @@ -262,6 +252,21 @@ export async function runQueries(
logger.info(analysisSummary);
} else {
// config was generated by the action, so must be interpreted by the action.

const hasBuiltinQueries = queries?.builtin.length > 0;
const hasCustomQueries = queries?.custom.length > 0;
const hasPackWithCustomQueries = packsWithVersion.length > 0;

if (
!hasBuiltinQueries &&
!hasCustomQueries &&
!hasPackWithCustomQueries
) {
throw new Error(
`Unable to analyze ${language} as no queries were selected for this language`
);
}

logger.startGroup(`Running queries for ${language}`);
const querySuitePaths: string[] = [];
if (queries["builtin"].length > 0) {
Expand Down
13 changes: 10 additions & 3 deletions src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,8 @@ async function getCodeQLForCmd(
config: Config,
sourceRoot: string,
processName: string | undefined,
featureEnablement: FeatureEnablement
featureEnablement: FeatureEnablement,
logger: Logger
) {
const extraArgs = config.languages.map(
(language) => `--language=${language}`
Expand Down Expand Up @@ -888,7 +889,8 @@ async function getCodeQLForCmd(
const configLocation = await generateCodeScanningConfig(
codeql,
config,
featureEnablement
featureEnablement,
logger
);
// Only pass external repository token if a config file is going to be parsed by the CLI.
let externalRepositoryToken: string | undefined;
Expand Down Expand Up @@ -1386,7 +1388,8 @@ async function runTool(
async function generateCodeScanningConfig(
codeql: CodeQL,
config: Config,
featureEnablement: FeatureEnablement
featureEnablement: FeatureEnablement,
logger: Logger
): Promise<string | undefined> {
if (!(await util.useCodeScanningConfigInCli(codeql, featureEnablement))) {
return;
Expand Down Expand Up @@ -1448,6 +1451,10 @@ async function generateCodeScanningConfig(
augmentedConfig.packs["javascript"].push(packString);
}
}
logger.info(`Writing augmented user configuration file to ${configLocation}`);
logger.startGroup("Augmented user configuration file contents");
logger.info(yaml.dump(augmentedConfig));
logger.endGroup();

fs.writeFileSync(configLocation, yaml.dump(augmentedConfig));
return configLocation;
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy