Skip to content

Commit 91c825e

Browse files
authored
chore(github-workflow): fix issue_bankrupt workflow again (vercel#66993)
## Why? Update location of `with` so `getInput('created')` is not undefined.
1 parent 7a9a0cc commit 91c825e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.github/actions/next-repo-actions/dist/bankrupt/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/next-repo-actions/src/bankrupt-issues.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ async function main() {
66

77
const octokit = getOctokit(process.env.GITHUB_TOKEN)
88
const { owner, repo } = context.repo
9-
const created = getInput('created')
10-
const year = created.slice(0, 4)
9+
const createdQuery = getInput('created')
10+
const dateRange = createdQuery.split('..').join(' to ')
1111
const body = `
1212
13-
We are in the process of closing issues dating back to ${year} to improve our focus on the most relevant and actionable problems.
13+
We are in the process of closing issues dating from ${dateRange} to improve our focus on the most relevant and actionable problems.
1414
1515
**_Why are we doing this?_**
1616
1717
Stale issues often lack recent updates and clear reproductions, making them difficult to address effectively. Our objective is to prioritize the most upvoted and actionable issues that have up-to-date reproductions, enabling us to resolve bugs more efficiently.
1818
19-
**_Why ${year} issues?_**
19+
**_Why these issues?_**
2020
21-
Issues from ${year} are likely to be outdated and less relevant to the current state of the codebase. By closing these older stale issues, we can better focus our efforts on more recent and relevant problems, ensuring a more effective and streamlined workflow.
21+
Issues dating from ${dateRange} are likely to be outdated and less relevant to the current state of the codebase. By closing these older stale issues, we can better focus our efforts on more recent and relevant problems, ensuring a more effective and streamlined workflow.
2222
2323
If your issue is still relevant, please reopen it using our [bug report template](https://github.com/vercel/next.js/issues/new?assignees=&labels=bug&projects=&template=1.bug_report.yml). Be sure to include any important context from the original issue in your new report.
2424
@@ -30,13 +30,13 @@ The Next.js Team
3030

3131
let issues: number[] = []
3232

33-
info(`created = ${created}`)
34-
info(`year = ${year}`)
33+
info(`created = ${createdQuery}`)
34+
info(`date range = ${dateRange}`)
3535
info(`body = ${body}`)
3636

3737
// try {
3838
// const { data } = await octokit.rest.search.issuesAndPullRequests({
39-
// q: `repo:${owner}/${repo} is:issue is:open created:${created}`,
39+
// q: `repo:${owner}/${repo} is:issue is:open created:${createdQuery}`,
4040
// })
4141

4242
// issues = data.items.map((issue) => issue.number)

.github/workflows/issue_bankrupt.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-node@v4
18-
- run: corepack enable
18+
1919
- name: 'Bankrupt issues & send notification to Slack'
20-
run: node ./.github/actions/next-repo-actions/dist/bankrupt/index.js
20+
uses: ./.github/actions/next-repo-actions/dist/bankrupt/index.js
2121
with:
2222
created: ${{ github.event.inputs.created }}
23-
env:
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25-
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}

0 commit comments

Comments
 (0)