-
Notifications
You must be signed in to change notification settings - Fork 191
48 lines (40 loc) · 1.96 KB
/
issue-labeled.yml
File metadata and controls
48 lines (40 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Issue Labeled
on:
issues:
types: [labeled]
jobs:
reply-labeled:
if: github.repository == 'voidzero-dev/vite-plus'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Remove triage labels (contribution welcome / help wanted)
if: github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
shell: bash
run: |
gh issue edit "$ISSUE_NUMBER" \
--remove-label "pending triage" \
--remove-label "needs reproduction" || true
- name: Comment and remove triage on "needs reproduction"
if: github.event.label.name == 'needs reproduction'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_USER: ${{ github.event.issue.user.login }}
shell: bash
run: |
gh issue comment "$ISSUE_NUMBER" --body "Hello @${ISSUE_USER} 👋
Please provide a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) using a GitHub repository. This helps us understand and resolve your issue much faster.
**A good reproduction should be:**
- **Minimal** – include only the code necessary to demonstrate the issue
- **Complete** – contain everything needed to run and observe the problem
- **Reproducible** – consistently show the issue with clear steps
If no reproduction is provided, issues labeled \`needs reproduction\` will be closed after 3 days of inactivity.
For more context on why this is required, please read: https://antfu.me/posts/why-reproductions-are-required"
gh issue edit "$ISSUE_NUMBER" --remove-label "pending triage" || true