|
8 | 8 | notify:
|
9 | 9 | runs-on: ubuntu-latest
|
10 | 10 | permissions: {}
|
11 |
| - if: ${{ !github.event.issue.pull_request && !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }} |
| 11 | + if: ${{ !github.event.issue.pull_request }} |
12 | 12 | steps:
|
13 | 13 | - name: Run webhook curl command
|
14 | 14 | env:
|
15 | 15 | WEBHOOK_URL: ${{ secrets.SLACK_COMMENT_WEBHOOK_URL }}
|
16 | 16 | BODY: ${{ toJson(github.event.comment.body) }}
|
17 |
| - COMMENT_URL: ${{github.event.comment.html_url}} |
| 17 | + COMMENT_URL: ${{ github.event.comment.html_url }} |
| 18 | + USER: ${{ github.event.comment.user.login }} |
18 | 19 | shell: bash
|
19 |
| - run: echo $BODY | sed "s/\\\n/. /g; s/\\\r//g; s/[^a-zA-Z0-9 &().,:]//g" | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'"}' |
| 20 | + run: echo $BODY | sed "s/\\\n/. /g; s/\\\r//g; s/[^a-zA-Z0-9 &().,:]//g" | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'", "user":"'$USER'"}' |
20 | 21 |
|
21 |
| - remove-pending-response-label: |
| 22 | + adjust-labels: |
22 | 23 | runs-on: ubuntu-latest
|
23 | 24 | permissions:
|
24 | 25 | issues: write
|
25 |
| - if: ${{ !github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'pending-response') }} |
| 26 | + env: |
| 27 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 28 | + ISSUE_NUMBER: ${{ github.event.issue.number }} |
| 29 | + REPOSITORY_NAME: ${{ github.event.repository.full_name }} |
26 | 30 | steps:
|
27 |
| - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 |
28 |
| - - name: remove unnecessary labels after closing |
| 31 | + - name: remove pending-community-response when new comment received |
| 32 | + if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) && !github.event.issue.pull_request }} |
| 33 | + shell: bash |
| 34 | + run: | |
| 35 | + gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-community-response" |
| 36 | + - name: add pending-maintainer-response when new community comment received |
| 37 | + if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }} |
| 38 | + shell: bash |
| 39 | + run: | |
| 40 | + gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --add-label "pending-maintainer-response" |
| 41 | + - name: remove pending-maintainer-response when new owner/member comment received |
| 42 | + if: ${{ contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }} |
29 | 43 | shell: bash
|
30 |
| - env: |
31 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
32 |
| - ISSUE_NUMBER: ${{ github.event.issue.number }} |
33 | 44 | run: |
|
34 |
| - gh issue edit $ISSUE_NUMBER --remove-label "pending-response" |
| 45 | + gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-maintainer-response" |
| 46 | + |
0 commit comments