Markdown is not supported - roll back and fix typo

This commit is contained in:
Simon Engledew 2020-11-25 13:06:51 +00:00
parent 94b10dbb8f
commit c5f58f3ee7
No known key found for this signature in database
GPG key ID: 84302E7B02FE8BCE
3 changed files with 7 additions and 15 deletions

10
lib/actions-util.js generated
View file

@ -118,7 +118,7 @@ exports.WorkflowErrors = toCodedErrors({
MissingHooks: `Please specify on.push and on.pull_request hooks so that Code Scanning can compare pull requests against the state of the base branch.`,
MissingPullRequestHook: `Please specify an on.pull_request hook so that Code Scanning is run against pull requests.`,
MissingPushHook: `Please specify an on.push hook so that Code Scanning can compare pull requests against the state of the base branch.`,
PathsSpecified: `Please do not specify paths in on.pull as this can cause missing Code Scanning analysis states for the base branch.`,
PathsSpecified: `Please do not specify paths in on.push as this can cause missing Code Scanning analysis states for the base branch.`,
CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`,
});
function validateWorkflow(doc) {
@ -224,12 +224,8 @@ async function getWorkflowErrors() {
exports.getWorkflowErrors = getWorkflowErrors;
function formatWorkflowErrors(errors) {
const issuesWere = errors.length === 1 ? "issue was" : "issues were";
const errorsList = `* ${errors.map((e) => e.message).join("\n* ")}`;
return `${errors.length} ${issuesWere} detected with this workflow:
${errorsList}
Please visit https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning for the latest guidance on configuring Code Scanning.`;
const errorsList = errors.map((e) => e.message).join(", ");
return `${errors.length} ${issuesWere} detected with this workflow: ${errorsList}`;
}
exports.formatWorkflowErrors = formatWorkflowErrors;
function formatWorkflowCause(errors) {

File diff suppressed because one or more lines are too long

View file

@ -154,7 +154,7 @@ export const WorkflowErrors = toCodedErrors({
MissingHooks: `Please specify on.push and on.pull_request hooks so that Code Scanning can compare pull requests against the state of the base branch.`,
MissingPullRequestHook: `Please specify an on.pull_request hook so that Code Scanning is run against pull requests.`,
MissingPushHook: `Please specify an on.push hook so that Code Scanning can compare pull requests against the state of the base branch.`,
PathsSpecified: `Please do not specify paths in on.pull as this can cause missing Code Scanning analysis states for the base branch.`,
PathsSpecified: `Please do not specify paths in on.push as this can cause missing Code Scanning analysis states for the base branch.`,
CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`,
});
@ -269,13 +269,9 @@ export async function getWorkflowErrors(): Promise<CodedError[] | undefined> {
export function formatWorkflowErrors(errors: CodedError[]): string {
const issuesWere = errors.length === 1 ? "issue was" : "issues were";
const errorsList = `* ${errors.map((e) => e.message).join("\n* ")}`;
const errorsList = errors.map((e) => e.message).join(", ");
return `${errors.length} ${issuesWere} detected with this workflow:
${errorsList}
Please visit https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning for the latest guidance on configuring Code Scanning.`;
return `${errors.length} ${issuesWere} detected with this workflow: ${errorsList}`;
}
export function formatWorkflowCause(errors?: CodedError[]): undefined | string {