Skip to content

Commit 8be6813

Browse files
committed
Update status report messages
1 parent e849c56 commit 8be6813

File tree

9 files changed

+50
-30
lines changed

9 files changed

+50
-30
lines changed

lib/analyze-action.js

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

lib/autobuild-action.js

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

lib/init-action-post.js

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

lib/init-action.js

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

lib/resolve-environment-action.js

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

lib/setup-codeql-action.js

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

lib/start-proxy-action.js

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

lib/upload-sarif-action.js

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

src/status-report.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,9 @@ export async function createStatusReportBase(
387387
}
388388

389389
const OUT_OF_DATE_MSG =
390-
"CodeQL Action is out-of-date. Please upgrade to the latest version of codeql-action.";
390+
"CodeQL Action is out-of-date. Please upgrade to the latest version of `codeql-action`.";
391391
const INCOMPATIBLE_MSG =
392-
"CodeQL Action version is incompatible with the code scanning endpoint. Please update to a compatible version of codeql-action.";
392+
"CodeQL Action version is incompatible with the API endpoint. Please update to a compatible version of `codeql-action`.";
393393

394394
/**
395395
* Send a status report to the code_scanning/analysis/status endpoint.
@@ -439,12 +439,16 @@ export async function sendStatusReport<S extends StatusReportBase>(
439439
) {
440440
core.warning(
441441
'Workflows triggered by Dependabot on the "push" event run with read-only access. ' +
442-
"Uploading Code Scanning results requires write access. " +
443-
'To use Code Scanning with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. ' +
442+
"Uploading CodeQL results requires write access. " +
443+
'To use CodeQL with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. ' +
444444
`See ${DocUrl.SCANNING_ON_PUSH} for more information on how to configure these events.`,
445445
);
446446
} else {
447-
core.warning(httpError.message);
447+
core.warning(
448+
"This run of the CodeQL Action does not have permission to access the CodeQL Action API endpoints. " +
449+
"This could be because the Action is running on a pull request from a fork. If not, " +
450+
`please ensure the workflow has at least the 'security-events: read' permission. Details: ${httpError.message}`,
451+
);
448452
}
449453
return;
450454
case 404:
@@ -466,7 +470,7 @@ export async function sendStatusReport<S extends StatusReportBase>(
466470
// something else has gone wrong and the request/response will be logged by octokit
467471
// it's possible this is a transient error and we should continue scanning
468472
core.warning(
469-
`An unexpected error occurred when sending code scanning status report: ${getErrorMessage(
473+
`An unexpected error occurred when sending a status report: ${getErrorMessage(
470474
e,
471475
)}`,
472476
);

0 commit comments

Comments
 (0)