Skip to content

Commit 90764ef

Browse files
authored
ci: auto-close issues without repro, auto-label (#8725)
Implement Nissuer to auto-close issues without valid reproduction and auto-label based upon selections. **NOTE:** This does not exempt Payload team members from having a valid reproduction link.
1 parent d05e3b0 commit 90764ef

File tree

3 files changed

+90
-20
lines changed

3 files changed

+90
-20
lines changed

.github/ISSUE_TEMPLATE/1.bug_report_v3.yml

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,20 @@ name: Bug Report v3
22
description: Create a bug report for Payload v3 (beta)
33
labels: ['status: needs-triage', 'v3']
44
body:
5-
- type: input
6-
id: reproduction-link
7-
attributes:
8-
label: Link to reproduction
9-
description: Want us to look into your issue faster? Follow the [reproduction-guide](https://github.com/payloadcms/payload/blob/main/.github/reproduction-guide.md) for more information.
10-
validations:
11-
required: false
125

136
- type: textarea
147
attributes:
15-
label: Environment Info
16-
description: Paste output from `pnpm payload info` (>= beta.92) _or_ Payload, Node.js, and Next.js versions.
17-
render: text
18-
placeholder: |
19-
Payload:
20-
Node.js:
21-
Next.js:
8+
label: Describe the Bug
229
validations:
2310
required: true
2411

25-
- type: textarea
12+
- type: input
13+
id: reproduction-link
2614
attributes:
27-
label: Describe the Bug
15+
label: Link to the code that reproduces this issue
16+
description: >-
17+
Required: Please provide a link to your reproduction. Note, if the URL is invalid (404 or a private repository), we may close the issue.
18+
Either use `npx create-payload-app@beta -t blank` or follow the [reproduction-guide](https://github.com/payloadcms/payload/blob/main/.github/reproduction-guide.md) for more information.
2819
validations:
2920
required: true
3021

@@ -35,11 +26,44 @@ body:
3526
validations:
3627
required: true
3728

38-
- type: input
39-
id: adapters-plugins
29+
- type: dropdown
4030
attributes:
41-
label: Adapters and Plugins
42-
description: What adapters and plugins are you using if relevant? ie. db-mongodb, db-postgres, storage-vercel-blob, etc.
31+
label: Which area(s) are affected? (Select all that apply)
32+
multiple: true
33+
options:
34+
- 'Not sure'
35+
- 'area: core'
36+
- 'area: templates'
37+
- 'area: ui'
38+
- 'db-mongodb'
39+
- 'db-postgres'
40+
- 'db-sqlite'
41+
- 'db-vercel-postgres'
42+
- 'plugin: cloud'
43+
- 'plugin: cloud-storage'
44+
- 'plugin: form-builder'
45+
- 'plugin: nested-docs'
46+
- 'plugin: richtext-lexical'
47+
- 'plugin: richtext-slate'
48+
- 'plugin: search'
49+
- 'plugin: sentry'
50+
- 'plugin: seo'
51+
- 'plugin: stripe'
52+
- 'plugin: other'
53+
validations:
54+
required: true
55+
56+
- type: textarea
57+
attributes:
58+
label: Environment Info
59+
description: Paste output from `pnpm payload info` (>= beta.92) _or_ Payload, Node.js, and Next.js versions.
60+
render: bash
61+
placeholder: |
62+
Payload:
63+
Node.js:
64+
Next.js:
65+
validations:
66+
required: true
4367

4468
- type: markdown
4569
attributes:
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
We cannot recreate the issue with the provided information. **Please add a reproduction in order for us to be able to investigate.**
2+
3+
### Why was this issue marked with the `invalid-reproduction` label?
4+
5+
To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository created with `create-payload-app@beta -t blank` or a forked/branched version of this repository with tests added (more info in the [reproduction-guide](https://github.com/payloadcms/payload/blob/main/.github/reproduction-guide.md)).
6+
7+
To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as **minimal** as possible. This means that you should **remove unnecessary code, files, and dependencies** that do not contribute to the issue. Ensure your reproduction does not depend on secrets, 3rd party registries, private dependencies, or any other data that cannot be made public. Avoid a reproduction including a whole monorepo (unless relevant to the issue). The easier it is to reproduce the issue, the quicker we can help.
8+
9+
Please test your reproduction against the latest version of Payload to make sure your issue has not already been fixed.
10+
11+
### I added a link, why was it still marked?
12+
13+
Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "[example.com](http://example.com/)", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.
14+
15+
### Useful Resources
16+
17+
- [Reproduction Guide](https://github.com/payloadcms/payload/blob/main/.github/reproduction-guide.md)
18+
- [Contributing to Payload](https://www.youtube.com/watch?v=08Qa3ggR9rw)

.github/workflows/triage.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: triage
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
8+
env:
9+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10+
11+
permissions:
12+
issues: write
13+
14+
jobs:
15+
triage:
16+
name: nissuer
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: balazsorban44/[email protected]
20+
with:
21+
label-area-prefix: ""
22+
label-area-match: "name"
23+
label-area-section: 'Which area\(s\) are affected\? \(Select all that apply\)(.*)### Environment Info'
24+
reproduction-comment: '.github/comments/invalid-reproduction.md'
25+
reproduction-blocklist: 'github.com/\\w*/?$,github.com$'
26+
reproduction-link-section: '### Link to the code that reproduces this issue(.*)### Reproduction Steps'
27+
reproduction-invalid-label: 'invalid-reproduction'
28+
reproduction-issue-labels: 'status: needs-triage,'

0 commit comments

Comments
 (0)