|
5 | 5 | issues: |
6 | 6 | types: [labeled] |
7 | 7 |
|
| 8 | +permissions: |
| 9 | + issues: write |
| 10 | + |
8 | 11 | jobs: |
9 | 12 | reply-labeled: |
10 | 13 | name: Reply to labeled issue 💬 |
11 | 14 | if: github.repository == 'lazarv/react-server' |
12 | 15 | runs-on: ubuntu-latest |
| 16 | + env: |
| 17 | + GH_TOKEN: ${{ github.token }} |
| 18 | + GH_REPO: ${{ github.repository }} |
| 19 | + ISSUE_NUMBER: ${{ github.event.issue.number }} |
| 20 | + ISSUE_AUTHOR: ${{ github.event.issue.user.login }} |
13 | 21 | steps: |
14 | | - - name: contribution welcome |
15 | | - if: github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted' |
16 | | - uses: actions-cool/issues-helper@v3 |
17 | | - with: |
18 | | - actions: "remove-labels" |
19 | | - token: ${{ secrets.GITHUB_TOKEN }} |
20 | | - issue-number: ${{ github.event.issue.number }} |
21 | | - labels: "pending triage, needs reproduction" |
| 22 | + - name: remove pending after contribution label |
| 23 | + if: (github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted') && contains(github.event.issue.labels.*.name, 'pending triage') |
| 24 | + run: gh issue edit "$ISSUE_NUMBER" --repo "$GH_REPO" --remove-label "pending triage" |
| 25 | + |
| 26 | + - name: remove reproduction after contribution label |
| 27 | + if: (github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted') && contains(github.event.issue.labels.*.name, 'needs reproduction') |
| 28 | + run: gh issue edit "$ISSUE_NUMBER" --repo "$GH_REPO" --remove-label "needs reproduction" |
22 | 29 |
|
23 | 30 | - name: remove pending |
24 | 31 | if: contains(github.event.label.description, '(priority)') && contains(github.event.issue.labels.*.name, 'pending triage') |
25 | | - uses: actions-cool/issues-helper@v3 |
26 | | - with: |
27 | | - actions: "remove-labels" |
28 | | - token: ${{ secrets.GITHUB_TOKEN }} |
29 | | - issue-number: ${{ github.event.issue.number }} |
30 | | - labels: "pending triage" |
| 32 | + run: gh issue edit "$ISSUE_NUMBER" --repo "$GH_REPO" --remove-label "pending triage" |
31 | 33 |
|
32 | 34 | - name: remove enhancement pending |
33 | 35 | if: "(github.event.label.name == 'enhancement' || contains(github.event.label.description, '(priority)')) && contains(github.event.issue.labels.*.name, 'enhancement: pending triage')" |
34 | | - uses: actions-cool/issues-helper@v3 |
35 | | - with: |
36 | | - actions: "remove-labels" |
37 | | - token: ${{ secrets.GITHUB_TOKEN }} |
38 | | - issue-number: ${{ github.event.issue.number }} |
39 | | - labels: "enhancement: pending triage" |
| 36 | + run: | |
| 37 | + gh issue edit "$ISSUE_NUMBER" --repo "$GH_REPO" --remove-label "enhancement: pending triage" |
40 | 38 |
|
41 | 39 | - name: needs reproduction |
42 | 40 | if: github.event.label.name == 'needs reproduction' |
43 | | - uses: actions-cool/issues-helper@v3 |
44 | | - with: |
45 | | - actions: "create-comment, remove-labels" |
46 | | - token: ${{ secrets.GITHUB_TOKEN }} |
47 | | - issue-number: ${{ github.event.issue.number }} |
48 | | - body: | |
49 | | - Hello @${{ github.event.issue.user.login }}. 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. |
50 | | - labels: "pending triage" |
| 41 | + run: | |
| 42 | + gh issue comment "$ISSUE_NUMBER" \ |
| 43 | + --repo "$GH_REPO" \ |
| 44 | + --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." |
| 45 | +
|
| 46 | + - name: remove pending after reproduction label |
| 47 | + if: github.event.label.name == 'needs reproduction' && contains(github.event.issue.labels.*.name, 'pending triage') |
| 48 | + run: gh issue edit "$ISSUE_NUMBER" --repo "$GH_REPO" --remove-label "pending triage" |
0 commit comments