Unverified Commit bfc33e2b authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[ci] Remove the unused `wrong-issue-template` workflow and action (#97749)

The `issue_wrong_template.yml` workflow closed issues labeled `please
use the correct issue template`. That label was only ever applied
manually by maintainers and has not been used since January 2025 (9
issues total, ever), so every recent run of the workflow was skipped.
This change removes the workflow along with its backing
`wrong-issue-template` action (source, checked-in ncc bundle, and build
script).
Co-authored-by: 's avatarClaude Code (kimi-k3[1m]) <noreply@anthropic.com>
parent 1cb20a1d
......@@ -4,8 +4,7 @@
"scripts": {
"build-issues": "ncc build src/popular-issues.mjs -m -o dist/issues --license licenses.txt",
"build-prs": "ncc build src/popular-prs.ts -m -o dist/prs --license licenses.txt",
"build-feature-requests": "ncc build src/popular-feature-requests.mjs -m -o dist/feature-requests --license licenses.txt",
"build-wrong-issue-template": "ncc build src/wrong-issue-template.ts -m -o dist/wrong-issue-template --license licenses.txt"
"build-feature-requests": "ncc build src/popular-feature-requests.mjs -m -o dist/feature-requests --license licenses.txt"
},
"dependencies": {
"@actions/core": "^1.11.1",
......
import { info, setFailed } from '@actions/core'
import { context, getOctokit } from '@actions/github'
async function main() {
if (!process.env.GITHUB_TOKEN) throw new TypeError('GITHUB_TOKEN not set')
const octokit = getOctokit(process.env.GITHUB_TOKEN)
const { owner, repo } = context.repo
const issue = context.payload.issue
const body = `
This issue has been closed due to the incorrect issue template being used. Please make sure to submit a new issue using the [correct issue template](https://github.com/vercel/next.js/issues/new?assignees=&labels=bug&projects=&template=1.bug_report.yml). This will ensure that we have all the necessary information to triage your issue.
Thank you for your understanding and contributions.
Best regards,
The Next.js Team
`
try {
await octokit.rest.issues.createComment({
owner,
repo,
issue_number: issue.number,
body,
})
await octokit.rest.issues.update({
owner,
repo,
issue_number: issue.number,
state: 'closed',
})
info(
`Issue #${issue.number}, which was opened with the incorrect template, has been successfully closed.`
)
} catch (error) {
setFailed(error)
}
}
main()
name: 'Close issues using the wrong issue template'
on:
issues:
types: [labeled]
jobs:
close:
if: github.event.label.name == 'please use the correct issue template'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
package-manager-cache: false
- name: Setup corepack
run: |
npm i -g corepack@0.31
corepack enable
- name: 'Close issues using the wrong issue template'
run: node ./.github/actions/next-repo-actions/dist/wrong-issue-template/index.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment