Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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,563 changes: 763 additions & 800 deletions lib/analyze-action-post.js

Large diffs are not rendered by default.

1,145 changes: 554 additions & 591 deletions lib/analyze-action.js

Large diffs are not rendered by default.

1,087 changes: 525 additions & 562 deletions lib/autobuild-action.js

Large diffs are not rendered by default.

1,597 changes: 780 additions & 817 deletions lib/init-action-post.js

Large diffs are not rendered by default.

1,137 changes: 550 additions & 587 deletions lib/init-action.js

Large diffs are not rendered by default.

1,095 changes: 529 additions & 566 deletions lib/resolve-environment-action.js

Large diffs are not rendered by default.

1,099 changes: 531 additions & 568 deletions lib/setup-codeql-action.js

Large diffs are not rendered by default.

1,535 changes: 749 additions & 786 deletions lib/start-proxy-action-post.js

Large diffs are not rendered by default.

1,583 changes: 773 additions & 810 deletions lib/start-proxy-action.js

Large diffs are not rendered by default.

1,071 changes: 513 additions & 558 deletions lib/upload-lib.js

Large diffs are not rendered by default.

1,535 changes: 749 additions & 786 deletions lib/upload-sarif-action-post.js

Large diffs are not rendered by default.

1,103 changes: 533 additions & 570 deletions lib/upload-sarif-action.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package-lock.json

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

12 changes: 9 additions & 3 deletions scripts/check-node-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ if [ "$GITHUB_ACTIONS" = "true" ]; then
fi

# Check if npm install is likely needed before proceeding
if [ ! -d node_modules ] || [ package-lock.json -nt node_modules/.package-lock.json ]; then
echo "Running 'npm install' because 'node_modules/.package-lock.json' appears to be outdated..."
if [ ! -d node_modules ]; then
echo "Running 'npm install' because 'node_modules' directory is missing."
npm install
elif [ package.json -nt package-lock.json ]; then
echo "Running 'npm install' because 'package-lock.json' appears to be outdated."
npm install
elif [ package-lock.json -nt node_modules/.package-lock.json ]; then
echo "Running 'npm install' because 'node_modules/.package-lock.json' appears to be outdated."
npm install
else
echo "Skipping 'npm install' because 'node_modules/.package-lock.json' appears to be up-to-date."
echo "Skipping 'npm install' because everything appears to be up-to-date."
fi
8 changes: 6 additions & 2 deletions src/api-client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as core from "@actions/core";
import * as githubUtils from "@actions/github/lib/utils";
import * as retry from "@octokit/plugin-retry";
import consoleLogLevel from "console-log-level";

import { getActionVersion, getRequiredInput } from "./actions-util";
import { Logger } from "./logging";
Expand Down Expand Up @@ -50,7 +49,12 @@ function createApiClientWithDetails(
githubUtils.getOctokitOptions(auth, {
baseUrl: apiDetails.apiURL,
userAgent: `CodeQL-Action/${getActionVersion()}`,
log: consoleLogLevel({ level: "debug" }),
log: {
debug: core.debug,
info: core.info,
warn: core.warning,
error: core.error,
},
}),
);
}
Expand Down
10 changes: 9 additions & 1 deletion src/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ export interface Logger {
}

export function getActionsLogger(): Logger {
return core;
return {
debug: core.debug,
info: core.info,
warning: core.warning,
error: core.error,
isDebug: core.isDebug,
startGroup: core.startGroup,
endGroup: core.endGroup,
};
}

export function getRunnerLogger(debugMode: boolean): Logger {
Expand Down
Loading