Skip to content

Commit

Permalink
ci: auto-close issues without repro, auto-label (#8725)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
denolfe authored Oct 16, 2024
1 parent d05e3b0 commit 90764ef
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 20 deletions.
64 changes: 44 additions & 20 deletions .github/ISSUE_TEMPLATE/1.bug_report_v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,20 @@ name: Bug Report v3
description: Create a bug report for Payload v3 (beta)
labels: ['status: needs-triage', 'v3']
body:
- type: input
id: reproduction-link
attributes:
label: Link to reproduction
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.
validations:
required: false

- type: textarea
attributes:
label: Environment Info
description: Paste output from `pnpm payload info` (>= beta.92) _or_ Payload, Node.js, and Next.js versions.
render: text
placeholder: |
Payload:
Node.js:
Next.js:
label: Describe the Bug
validations:
required: true

- type: textarea
- type: input
id: reproduction-link
attributes:
label: Describe the Bug
label: Link to the code that reproduces this issue
description: >-
Required: Please provide a link to your reproduction. Note, if the URL is invalid (404 or a private repository), we may close the issue.
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.
validations:
required: true

Expand All @@ -35,11 +26,44 @@ body:
validations:
required: true

- type: input
id: adapters-plugins
- type: dropdown
attributes:
label: Adapters and Plugins
description: What adapters and plugins are you using if relevant? ie. db-mongodb, db-postgres, storage-vercel-blob, etc.
label: Which area(s) are affected? (Select all that apply)
multiple: true
options:
- 'Not sure'
- 'area: core'
- 'area: templates'
- 'area: ui'
- 'db-mongodb'
- 'db-postgres'
- 'db-sqlite'
- 'db-vercel-postgres'
- 'plugin: cloud'
- 'plugin: cloud-storage'
- 'plugin: form-builder'
- 'plugin: nested-docs'
- 'plugin: richtext-lexical'
- 'plugin: richtext-slate'
- 'plugin: search'
- 'plugin: sentry'
- 'plugin: seo'
- 'plugin: stripe'
- 'plugin: other'
validations:
required: true

- type: textarea
attributes:
label: Environment Info
description: Paste output from `pnpm payload info` (>= beta.92) _or_ Payload, Node.js, and Next.js versions.
render: bash
placeholder: |
Payload:
Node.js:
Next.js:
validations:
required: true

- type: markdown
attributes:
Expand Down
18 changes: 18 additions & 0 deletions .github/comments/invalid-reproduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
We cannot recreate the issue with the provided information. **Please add a reproduction in order for us to be able to investigate.**

### Why was this issue marked with the `invalid-reproduction` label?

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)).

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.

Please test your reproduction against the latest version of Payload to make sure your issue has not already been fixed.

### I added a link, why was it still marked?

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.

### Useful Resources

- [Reproduction Guide](https://github.com/payloadcms/payload/blob/main/.github/reproduction-guide.md)
- [Contributing to Payload](https://www.youtube.com/watch?v=08Qa3ggR9rw)
28 changes: 28 additions & 0 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: triage

on:
issues:
types:
- opened

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

permissions:
issues: write

jobs:
triage:
name: nissuer
runs-on: ubuntu-latest
steps:
- uses: balazsorban44/[email protected]
with:
label-area-prefix: ""
label-area-match: "name"
label-area-section: 'Which area\(s\) are affected\? \(Select all that apply\)(.*)### Environment Info'
reproduction-comment: '.github/comments/invalid-reproduction.md'
reproduction-blocklist: 'github.com/\\w*/?$,github.com$'
reproduction-link-section: '### Link to the code that reproduces this issue(.*)### Reproduction Steps'
reproduction-invalid-label: 'invalid-reproduction'
reproduction-issue-labels: 'status: needs-triage,'

0 comments on commit 90764ef

Please sign in to comment.