Skip to content

Commit e796fc6

Browse files
committed
Updates a few files
1 parent 1300fe4 commit e796fc6

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

.github/actions/file/src/generateIssueBody.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
import type { Finding } from "./types.d.js";
22

3-
export function generateIssueBody(finding: Finding, repoWithOwner: string): string {
3+
export function generateIssueBody(finding: Finding): string {
44
const solutionLong = finding.solutionLong
5-
?.split("\n")
6-
.map((line: string) =>
7-
!line.trim().startsWith("Fix any") &&
8-
!line.trim().startsWith("Fix all") &&
9-
line.trim() !== ""
10-
? `- ${line}`
11-
: line
12-
)
13-
.join("\n");
14-
const acceptanceCriteria = `## Acceptance Criteria
5+
?.split("\n")
6+
.map((line: string) =>
7+
!line.trim().startsWith("Fix any") &&
8+
!line.trim().startsWith("Fix all") &&
9+
line.trim() !== ""
10+
? `- ${line}`
11+
: line,
12+
)
13+
.join("\n");
14+
const acceptanceCriteria = `## Acceptance Criteria
1515
- [ ] The specific axe violation reported in this issue is no longer reproducible.
1616
- [ ] The fix MUST meet WCAG 2.1 guidelines OR the accessibility standards specified by the repository or organization.
1717
- [ ] A test SHOULD be added to ensure this specific axe violation does not regress.
1818
- [ ] This PR MUST NOT introduce any new accessibility issues or regressions.
1919
`;
20-
const body = `## What
20+
const body = `## What
2121
An accessibility scan flagged the element \`${finding.html}\` on ${finding.url} because ${finding.problemShort}. Learn more about why this was flagged by visiting ${finding.problemUrl}.
2222
2323
To fix this, ${finding.solutionShort}.
24-
${solutionLong ? `\nSpecifically:\n\n${solutionLong}` : ''}
24+
${solutionLong ? `\nSpecifically:\n\n${solutionLong}` : ""}
2525
2626
${acceptanceCriteria}
2727
`;

.github/actions/file/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default async function () {
6262
} else if (isNewFiling(filing)) {
6363
// Open a new issue for the filing
6464
response = await openIssue(octokit, repoWithOwner, filing.findings[0]);
65+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6566
(filing as any).issue = { state: "open" } as Issue;
6667
} else if (isRepeatedFiling(filing)) {
6768
// Reopen the filing’s issue (if necessary)

.github/actions/file/src/openIssue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function openIssue(octokit: Octokit, repoWithOwner: string, finding
2727
GITHUB_ISSUE_TITLE_MAX_LENGTH,
2828
);
2929

30-
const body = generateIssueBody(finding, repoWithOwner);
30+
const body = generateIssueBody(finding);
3131

3232
return octokit.request(`POST /repos/${owner}/${repo}/issues`, {
3333
owner,

0 commit comments

Comments
 (0)