From 6cacd5a7c46fb1bb86c536031140da92863ce451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 1 Dec 2022 12:19:09 +0100 Subject: [PATCH 1/3] chore: add issue labeler --- .github/ISSUE_TEMPLATE/1.bug_report.yml | 2 +- .github/issue-labeler.yml | 64 +++++++++++++++++++ .github/workflows/issue_labeler.yml | 18 ++++++ .../workflows/{lock.yml => issue_lock.yml} | 0 .../workflows/{stale.yml => issue_stale.yml} | 0 ...validate_issue.yml => issue_validator.yml} | 0 6 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 .github/issue-labeler.yml create mode 100644 .github/workflows/issue_labeler.yml rename .github/workflows/{lock.yml => issue_lock.yml} (100%) rename .github/workflows/{stale.yml => issue_stale.yml} (100%) rename .github/workflows/{validate_issue.yml => issue_validator.yml} (100%) diff --git a/.github/ISSUE_TEMPLATE/1.bug_report.yml b/.github/ISSUE_TEMPLATE/1.bug_report.yml index baf58b4dbc09..7638b1432473 100644 --- a/.github/ISSUE_TEMPLATE/1.bug_report.yml +++ b/.github/ISSUE_TEMPLATE/1.bug_report.yml @@ -32,6 +32,7 @@ body: - 'Dynamic imports (next/dynamic)' - 'ESLint (eslint-config-next)' - 'Font optimization (@next/font)' + - 'Head component/file (next/head / head.js)' - 'Internationalzation (i18n)' - 'Image optmization (next/image, next/legacy/image)' - 'Jest (next/jest)' @@ -45,7 +46,6 @@ body: - 'SWC transpilation' - 'Turbopack (--turbo)' - 'TypeScript' - - 'Other' - type: input attributes: label: Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster diff --git a/.github/issue-labeler.yml b/.github/issue-labeler.yml new file mode 100644 index 000000000000..3abc7c326f93 --- /dev/null +++ b/.github/issue-labeler.yml @@ -0,0 +1,64 @@ +# https://github.com/github/issue-labeler#basic-examples + +# Should match the list "Which area of Next.js is affected?" in: +# https://github.com/vercel/next.js/blob/canary/.github/ISSUE_TEMPLATE/1.bug_report.yml +'area: app': + - 'App directory (appDir: true)' +'area: create-next-app': + - 'CLI (create-next-app)' +'area: data fetching': + - 'Data fetching (gS(S)P, getInitialProps)' +'area: next/dynamic': + - 'Dynamic imports (next/dynamic)' +'area: ESLint': + - 'ESLint (eslint-config-next)' +'area: Font Optimization': + - 'Font optimization (@next/font)' +'area: next/head / head.js': + - 'Head component/file (next/head / head.js)' +'area: I18n': + - 'Internationalzation (i18n)' +'area: next/image': + - 'Image optmization (next/image, next/legacy/image)' +'area: Jest': + - 'Jest (next/jest)' +'area: Edge': + - 'Middleware / Edge (API routes, runtime)' +'area: package manager': + - 'Package manager (npm, pnpm, Yarn)' +'area: Routing': + - 'Routing (next/router, next/navigation, next/link)' +'area: next/script': + - 'Script optimizatzion (next/script)' +'area: standalone mode': + - 'Standalone mode (output: "standalone")' +'area: export': + - 'Static HTML Export (next export)' +'area: SWC Minify': + - 'SWC minifier (swcMinify: true)' +'area: SWC transforms': + - 'SWC transpilation' +'area: Turbopack': + - 'Turbopack (--turbo)' +'area: TypeScript': + - 'TypeScript' +# Less used/old/redundant labels +# area: AMP +# area: API routes +# area: Application Code +# area: Codemods +# area: Compiler Performance +# area: Compiler +# area: Concurrent Features +# area: Debugger +# area: Developer Experience +# area: Ecosystem +# area: experimental +# area: Middleware +# area: Reliability +# area: Repository Maintenance +# area: Server Components +# area: Static Generation +# area: styled-jsx +# area: Tracing +# area: URL Imports diff --git a/.github/workflows/issue_labeler.yml b/.github/workflows/issue_labeler.yml new file mode 100644 index 000000000000..2be486363818 --- /dev/null +++ b/.github/workflows/issue_labeler.yml @@ -0,0 +1,18 @@ +# https://github.com/github/issue-labeler#create-workflow + +name: Label issues + +on: + issues: + types: [opened] + +jobs: + triage: + name: Triage + runs-on: ubuntu-latest + steps: + - uses: github/issue-labeler@v2.5 + with: + repo-token: '${{ secrets.GITHUB_TOKEN }}' + configuration-path: '.github/issue-labeler.yml' + enable-versioned-regex: 0 diff --git a/.github/workflows/lock.yml b/.github/workflows/issue_lock.yml similarity index 100% rename from .github/workflows/lock.yml rename to .github/workflows/issue_lock.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/issue_stale.yml similarity index 100% rename from .github/workflows/stale.yml rename to .github/workflows/issue_stale.yml diff --git a/.github/workflows/validate_issue.yml b/.github/workflows/issue_validator.yml similarity index 100% rename from .github/workflows/validate_issue.yml rename to .github/workflows/issue_validator.yml From ffeaa1f54a84e9e8f804fffafadf58b0720c294c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 1 Dec 2022 12:33:37 +0100 Subject: [PATCH 2/3] only auto label bug template issues --- .github/workflows/issue_labeler.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/issue_labeler.yml b/.github/workflows/issue_labeler.yml index 2be486363818..ea9bbdf329d0 100644 --- a/.github/workflows/issue_labeler.yml +++ b/.github/workflows/issue_labeler.yml @@ -8,6 +8,7 @@ on: jobs: triage: + if: '${{ github.event.label.name == "template: bug" }}' name: Triage runs-on: ubuntu-latest steps: From b3fbf610480a9319aef8668eb6085893b3f618b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 1 Dec 2022 12:40:39 +0100 Subject: [PATCH 3/3] clarify the dropdown supports multiple selects --- .github/ISSUE_TEMPLATE/1.bug_report.yml | 2 +- .github/issue-labeler.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1.bug_report.yml b/.github/ISSUE_TEMPLATE/1.bug_report.yml index 7638b1432473..4c0d08bc6cd6 100644 --- a/.github/ISSUE_TEMPLATE/1.bug_report.yml +++ b/.github/ISSUE_TEMPLATE/1.bug_report.yml @@ -23,7 +23,7 @@ body: required: true - type: dropdown attributes: - label: Which area of Next.js is affected? (leave empty if unsure) + label: Which area(s) of Next.js are affected? (leave empty if unsure) multiple: true options: - 'App directory (appDir: true)' diff --git a/.github/issue-labeler.yml b/.github/issue-labeler.yml index 3abc7c326f93..3463af474920 100644 --- a/.github/issue-labeler.yml +++ b/.github/issue-labeler.yml @@ -1,6 +1,6 @@ # https://github.com/github/issue-labeler#basic-examples -# Should match the list "Which area of Next.js is affected?" in: +# Should match the list "Which area(s) of Next.js are affected?" in: # https://github.com/vercel/next.js/blob/canary/.github/ISSUE_TEMPLATE/1.bug_report.yml 'area: app': - 'App directory (appDir: true)'