-
-
Notifications
You must be signed in to change notification settings - Fork 21
48 lines (40 loc) · 2.45 KB
/
Copy pathissue-labeled.yml
File metadata and controls
48 lines (40 loc) · 2.45 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
# This workflow is based on https://github.com/vitejs/vite/tree/main/.github/workflows
name: Issue Labeled 🔖
on:
issues:
types: [labeled]
permissions:
issues: write
jobs:
reply-labeled:
name: Reply to labeled issue 💬
if: github.repository == 'lazarv/react-server'
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
steps:
- name: remove pending after contribution label
if: (github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted') && contains(github.event.issue.labels.*.name, 'pending triage')
run: gh issue edit "$ISSUE_NUMBER" --repo "$GH_REPO" --remove-label "pending triage"
- name: remove reproduction after contribution label
if: (github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted') && contains(github.event.issue.labels.*.name, 'needs reproduction')
run: gh issue edit "$ISSUE_NUMBER" --repo "$GH_REPO" --remove-label "needs reproduction"
- name: remove pending
if: contains(github.event.label.description, '(priority)') && contains(github.event.issue.labels.*.name, 'pending triage')
run: gh issue edit "$ISSUE_NUMBER" --repo "$GH_REPO" --remove-label "pending triage"
- name: remove enhancement pending
if: "(github.event.label.name == 'enhancement' || contains(github.event.label.description, '(priority)')) && contains(github.event.issue.labels.*.name, 'enhancement: pending triage')"
run: |
gh issue edit "$ISSUE_NUMBER" --repo "$GH_REPO" --remove-label "enhancement: pending triage"
- name: needs reproduction
if: github.event.label.name == 'needs reproduction'
run: |
gh issue comment "$ISSUE_NUMBER" \
--repo "$GH_REPO" \
--body "Hello @$ISSUE_AUTHOR. Please provide a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) using a GitHub repository. Issues marked with \`needs reproduction\` will be closed if they have no activity within 30 days."
- name: remove pending after reproduction label
if: github.event.label.name == 'needs reproduction' && contains(github.event.issue.labels.*.name, 'pending triage')
run: gh issue edit "$ISSUE_NUMBER" --repo "$GH_REPO" --remove-label "pending triage"