Skip to content

Commit c48b648

Browse files
authored
Merge branch 'main' into smockle/fix-remove-deprecated-input
2 parents 9e22324 + 33b91d6 commit c48b648

File tree

8 files changed

+26
-66
lines changed

8 files changed

+26
-66
lines changed

.github/actions/auth/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ outputs:
1717
description: "Stringified JSON object containing 'username', 'password', 'cookies', and/or 'localStorage' from an authenticated session"
1818

1919
runs:
20-
using: "node20"
20+
using: "node24"
2121
main: "bootstrap.js"
2222

2323
branding:

.github/actions/file/README.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,20 @@ Files GitHub issues to track potential accessibility gaps.
3030

3131
#### `findings`
3232

33-
List of potential accessibility gaps (plus issue URLs), as stringified JSON. For example:
33+
**DEPRECATED: This output will be removed in `v2`.** List of potential accessibility gaps (plus issue URLs), as stringified JSON. For example:
3434

3535
```JS
3636
'[]'
3737
```
3838

3939
#### `closed_issues`
4040

41-
List of closed issues’ `id`, `nodeId`, `url`, and `title`, as stringified JSON. For example: `'[{"id":1,"nodeId":"SXNzdWU6MQ==","url":"https://github.com/github/docs/issues/123","title":"Accessibility issue: 1"},{"id":2,"nodeId":"SXNzdWU6Mg==","url":"https://github.com/github/docs/issues/124","title":"Accessibility issue: 2"},{"id":4,"nodeId":"SXNzdWU6NA==","url":"https://github.com/github/docs/issues/126","title":"Accessibility issue: 4"}]'`.
41+
**DEPRECATED: This output will be removed in `v2`.** List of closed issues’ `id`, `nodeId`, `url`, and `title`, as stringified JSON. For example: `'[{"id":1,"nodeId":"SXNzdWU6MQ==","url":"https://github.com/github/docs/issues/123","title":"Accessibility issue: 1"},{"id":2,"nodeId":"SXNzdWU6Mg==","url":"https://github.com/github/docs/issues/124","title":"Accessibility issue: 2"},{"id":4,"nodeId":"SXNzdWU6NA==","url":"https://github.com/github/docs/issues/126","title":"Accessibility issue: 4"}]'`.
4242

4343
#### `opened_issues`
4444

45-
List of newly-opened issues’ `id`, `nodeId`, `url`, and `title`, as stringified JSON. For example: `'[{"id":1,"nodeId":"SXNzdWU6MQ==","url":"https://github.com/github/docs/issues/123","title":"Accessibility issue: 1"},{"id":2,"nodeId":"SXNzdWU6Mg==","url":"https://github.com/github/docs/issues/124","title":"Accessibility issue: 2"},{"id":4,"nodeId":"SXNzdWU6NA==","url":"https://github.com/github/docs/issues/126","title":"Accessibility issue: 4"}]'`.
45+
**DEPRECATED: This output will be removed in `v2`.** List of newly-opened issues’ `id`, `nodeId`, `url`, and `title`, as stringified JSON. For example: `'[{"id":1,"nodeId":"SXNzdWU6MQ==","url":"https://github.com/github/docs/issues/123","title":"Accessibility issue: 1"},{"id":2,"nodeId":"SXNzdWU6Mg==","url":"https://github.com/github/docs/issues/124","title":"Accessibility issue: 2"},{"id":4,"nodeId":"SXNzdWU6NA==","url":"https://github.com/github/docs/issues/126","title":"Accessibility issue: 4"}]'`.
4646

4747
#### `repeated_issues`
4848

49-
List of repeated issues’ `id`, `nodeId`, `url`, and `title`, as stringified JSON. For example: `'[{"id":1,"nodeId":"SXNzdWU6MQ==","url":"https://github.com/github/docs/issues/123","title":"Accessibility issue: 1"},{"id":2,"nodeId":"SXNzdWU6Mg==","url":"https://github.com/github/docs/issues/124","title":"Accessibility issue: 2"},{"id":4,"nodeId":"SXNzdWU6NA==","url":"https://github.com/github/docs/issues/126","title":"Accessibility issue: 4"}]'`.
50-
51-
#### `closed_issue_urls`
52-
53-
**DEPRECATED: This output will be removed in `v2`.** List of URLs for closed issues, as stringified JSON. For example: `'["https://github.com/github/docs/issues/123","https://github.com/github/docs/issues/124","https://github.com/github/docs/issues/126","https://github.com/github/docs/issues/127"]'`.
54-
55-
#### `opened_issue_urls`
56-
57-
**DEPRECATED: This output will be removed in `v2`.** List of URLs for newly-opened issues, as stringified JSON. For example: `'["https://github.com/github/docs/issues/123","https://github.com/github/docs/issues/124","https://github.com/github/docs/issues/126","https://github.com/github/docs/issues/127"]'`.
58-
59-
#### `repeated_issue_urls`
60-
61-
**DEPRECATED: This output will be removed in `v2`.** List of URLs for repeated issues, as stringified JSON. For example: `'["https://github.com/github/docs/issues/123","https://github.com/github/docs/issues/124","https://github.com/github/docs/issues/126","https://github.com/github/docs/issues/127"]'`.
49+
**DEPRECATED: This output will be removed in `v2`.** List of repeated issues’ `id`, `nodeId`, `url`, and `title`, as stringified JSON. For example: `'[{"id":1,"nodeId":"SXNzdWU6MQ==","url":"https://github.com/github/docs/issues/123","title":"Accessibility issue: 1"},{"id":2,"nodeId":"SXNzdWU6Mg==","url":"https://github.com/github/docs/issues/124","title":"Accessibility issue: 2"},{"id":4,"nodeId":"SXNzdWU6NA==","url":"https://github.com/github/docs/issues/126","title":"Accessibility issue: 4"}]'`.

.github/actions/file/action.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,18 @@ inputs:
1717

1818
outputs:
1919
findings:
20-
description: "List of potential accessibility gaps (plus issue URLs), as stringified JSON"
20+
description: "DEPRECATED: List of potential accessibility gaps (plus issue URLs), as stringified JSON"
2121
closed_issues:
22-
description: "List of closed issues, as stringified JSON"
22+
description: "DEPRECATED: List of closed issues, as stringified JSON"
2323
opened_issues:
24-
description: "List of newly-opened issues, as stringified JSON"
24+
description: "DEPRECATED: List of newly-opened issues, as stringified JSON"
2525
repeated_issues:
26-
description: "List of repeated issues, as stringified JSON"
27-
closed_issue_urls:
28-
description: "DEPRECATED: List of URLs for closed issues, as stringified JSON"
29-
opened_issue_urls:
30-
description: "DEPRECATED: List of URLs for newly-opened issues, as stringified JSON"
31-
repeated_issue_urls:
32-
description: "DEPRECATED: List of URLs for repeated issues, as stringified JSON"
26+
description: "DEPRECATED: List of repeated issues, as stringified JSON"
3327

3428
runs:
35-
using: "node20"
29+
using: "node24"
3630
main: "bootstrap.js"
3731

3832
branding:
3933
icon: "compass"
40-
color: "blue"
34+
color: "blue"

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

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,12 @@ export default async function () {
4040
},
4141
}
4242
});
43+
/** @deprecated */
4344
const closedIssues: Issue[] = [];
45+
/** @deprecated */
4446
const openedIssues: Issue[] = [];
47+
/** @deprecated */
4548
const repeatedIssues: Issue[] = [];
46-
/** @deprecated Use `closedIssues` instead. */
47-
const closedIssueUrls: string[] = [];
48-
/** @deprecated Use `openedIssues` instead. */
49-
const openedIssueUrls: string[] = [];
50-
/** @deprecated Use `repeatedIssues` instead. */
51-
const repeatedIssueUrls: string[] = [];
5249

5350
for (const cachedFinding of cachedFindings) {
5451
if (!findingsMap.has(`${cachedFinding.url};${cachedFinding.problemShort};${cachedFinding.html}`)) {
@@ -61,7 +58,6 @@ export default async function () {
6158
url: response.data.html_url,
6259
title: response.data.title,
6360
});
64-
closedIssueUrls.push(response.data.html_url);
6561
core.info(`Closed issue: ${response.data.title} (${repoWithOwner}#${response.data.number})`);
6662
} catch (error) {
6763
core.setFailed(`Failed to close issue for finding: ${error}`);
@@ -84,7 +80,6 @@ export default async function () {
8480
url: response.data.html_url,
8581
title: response.data.title,
8682
});
87-
repeatedIssueUrls.push(response.data.html_url);
8883
core.info(`Repeated issue: ${response.data.title} (${repoWithOwner}#${response.data.number})`);
8984
} else {
9085
// New finding was found in the latest run, so create its issue
@@ -94,7 +89,6 @@ export default async function () {
9489
url: response.data.html_url,
9590
title: response.data.title,
9691
});
97-
openedIssueUrls.push(response.data.html_url);
9892
core.info(`Created issue: ${response.data.title} (${repoWithOwner}#${response.data.number})`);
9993
}
10094
} catch (error) {
@@ -103,6 +97,7 @@ export default async function () {
10397
}
10498
}
10599

100+
// Deprecated outputs
106101
core.setOutput("closed_issues", JSON.stringify(closedIssues));
107102
core.setOutput("opened_issues", JSON.stringify(openedIssues));
108103
core.setOutput("repeated_issues", JSON.stringify(repeatedIssues));
@@ -111,17 +106,10 @@ export default async function () {
111106
core.debug(`Output: 'opened_issues: ${JSON.stringify(openedIssues)}'`);
112107
core.debug(`Output: 'repeated_issues: ${JSON.stringify(repeatedIssues)}'`);
113108
core.debug(`Output: 'findings: ${JSON.stringify(findings)}'`);
114-
115-
// Deprecated outputs
116-
core.setOutput("closed_issue_urls", JSON.stringify(closedIssueUrls));
117-
core.setOutput("opened_issue_urls", JSON.stringify(openedIssueUrls));
118-
core.setOutput("repeated_issue_urls", JSON.stringify(repeatedIssueUrls));
119-
core.warning("The 'closed_issue_urls' output is deprecated and will be removed in v2. If you use the 'closed_issue_urls' output, please migrate to the 'closed_issues' output.");
120-
core.debug(`Output: 'closed_issue_urls: ${JSON.stringify(closedIssueUrls)}'`);
121-
core.warning("The 'opened_issue_urls' output is deprecated and will be removed in v2. If you use the 'opened_issue_urls' output, please migrate to the 'opened_issues' output.");
122-
core.debug(`Output: 'opened_issue_urls: ${JSON.stringify(openedIssueUrls)}'`);
123-
core.warning("The 'repeated_issue_urls' output is deprecated and will be removed in v2. If you use the 'repeated_issue_urls' output, please migrate to the 'repeated_issues' output.");
124-
core.debug(`Output: 'repeated_issue_urls: ${JSON.stringify(repeatedIssueUrls)}'`);
109+
core.warning("The 'closed_issues' output is deprecated and will be removed in v2.");
110+
core.warning("The 'opened_issues' output is deprecated and will be removed in v2.");
111+
core.warning("The 'repeated_issues' output is deprecated and will be removed in v2.");
112+
core.warning("The 'findings' output is deprecated and will be removed in v2.");
125113

126114
core.info("Finished 'file' action");
127115
}

.github/actions/find/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ outputs:
1515
description: "List of potential accessibility gaps, as stringified JSON"
1616

1717
runs:
18-
using: "node20"
18+
using: "node24"
1919
main: "bootstrap.js"
2020

2121
branding:

.github/actions/fix/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ inputs:
1313
required: true
1414

1515
runs:
16-
using: "node20"
16+
using: "node24"
1717
main: "bootstrap.js"
1818

1919
branding:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Trigger the workflow manually or automatically based on your configuration. The
9696
| `urls` | Yes | Newline-delimited list of URLs to scan | `https://primer.style`<br>`https://primer.style/octicons` |
9797
| `repository` | Yes | Repository (with owner) for issues and PRs | `primer/primer-docs` |
9898
| `token` | Yes | PAT with write permissions (see above) | `${{ secrets.GH_TOKEN }}` |
99-
| `cache_key` | No | Custom key for caching findings across runs<br>Allowed: `A-Za-z0-9._/-` | `cached_findings-main-primer.style.json` |
99+
| `cache_key` | Yes | Key for caching findings across runs<br>Allowed: `A-Za-z0-9._/-` | `cached_findings-main-primer.style.json` |
100100
| `login_url` | No | If scanned pages require authentication, the URL of the login page | `https://github.com/login` |
101101
| `username` | No | If scanned pages require authentication, the username to use for login | `some-user` |
102102
| `password` | No | If scanned pages require authentication, the password to use for login | `correct-horse-battery-staple` |

action.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ inputs:
1313
description: "Personal access token (PAT) with fine-grained permissions 'contents: write', 'issues: write', and 'pull_requests: write'"
1414
required: true
1515
cache_key:
16-
description: "Custom key for caching findings across runs"
17-
required: false
16+
description: "Key for caching findings across runs"
17+
required: true
1818
login_url:
1919
description: "If scanned pages require authentication, the URL of the login page"
2020
required: false
@@ -35,21 +35,11 @@ inputs:
3535
runs:
3636
using: "composite"
3737
steps:
38-
- name: Generate cache key
39-
id: cache_key
40-
shell: bash
41-
run: |
42-
CACHE_KEY="${{ inputs.cache_key }}"
43-
if [[ -z "$CACHE_KEY" ]]; then
44-
# If cache_key is not provided, generate a default one using the branch name, replacing characters (e.g. `/`) which would create unexpected paths.
45-
CACHE_KEY=$(printf 'cached_findings-%s' "${{ github.ref_name }}" | tr -cs 'A-Za-z0-9._-' '_')
46-
fi
47-
echo "cache_key=$CACHE_KEY" >> $GITHUB_OUTPUT
4838
- name: Restore cached_findings
4939
id: restore
5040
uses: ./.github/actions/gh-cache/cache
5141
with:
52-
key: ${{ steps.cache_key.outputs.cache_key }}
42+
key: ${{ inputs.cache_key }}
5343
token: ${{ inputs.token }}
5444
- if: ${{ inputs.login_url && inputs.username && inputs.password && !inputs.auth_context }}
5545
name: Authenticate
@@ -84,7 +74,7 @@ runs:
8474
- name: Save cached_findings
8575
uses: ./.github/actions/gh-cache/cache
8676
with:
87-
key: ${{ steps.cache_key.outputs.cache_key }}
77+
key: ${{ inputs.cache_key }}
8878
value: ${{ steps.file.outputs.findings }}
8979
token: ${{ inputs.token }}
9080

0 commit comments

Comments
 (0)