Skip to content

Commit f3a85cf

Browse files
committed
BREAKING CHANGE(File): Remove deprecated outputs
1 parent 646190d commit f3a85cf

File tree

3 files changed

+17
-47
lines changed

3 files changed

+17
-47
lines changed

.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: 5 additions & 11 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:
3529
using: "node20"
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
}

0 commit comments

Comments
 (0)