|
1 | 1 | name: Discuss on Discord
|
| 2 | + |
2 | 3 | on:
|
3 | 4 | issues:
|
4 | 5 | types:
|
5 | 6 | - labeled
|
| 7 | + pull_request: |
| 8 | + types: |
| 9 | + - labeled |
6 | 10 | workflow_dispatch:
|
7 | 11 | inputs:
|
8 | 12 | issue_number:
|
9 | 13 | description: 'Issue number'
|
10 |
| - required: true |
11 |
| - |
| 14 | + pull_request_number: |
| 15 | + description: 'Pull request number' |
| 16 | + |
12 | 17 | permissions:
|
13 | 18 | issues: write
|
| 19 | + pull-requests: write |
14 | 20 |
|
15 | 21 | jobs:
|
16 | 22 | discord:
|
17 | 23 | runs-on: ubuntu-latest
|
18 | 24 | steps:
|
19 |
| - - name: Discuss on Discord |
| 25 | + - name: "Discuss on Discord-Issues" |
| 26 | + if: github.event.issue && contains(github.event.issue.labels.*.name, 'help wanted') |
20 | 27 | uses: EndBug/discuss-on-discord@v1.1.0
|
21 |
| - if: ${{ github.event.label.name == 'help wanted' }} |
22 | 28 | with:
|
23 |
| - discord_bot_token: ${{ secrets.DISCORD_BOT_TOKEN }} |
24 |
| - destination: ${{ secrets.DISCORD_BOT_DESTINATION }} |
25 |
| - issue_number: ${{ github.event.inputs.issue_number || github.event.issue.number }} |
26 |
| - issue_comment: Hey 👋, I've just created a [thread]($THREAD_LINK$) for this issue on [PyTorch-Ignite Discord](https://pytorch-ignite.ai/chat) where you can quickly talk to the community on the topic. |
| 29 | + discord_bot_token: ${{ secrets.DISCORD_BOT_TOKEN }} |
| 30 | + destination: ${{ secrets.DISCORD_BOT_DESTINATION }} |
| 31 | + issue_number: ${{ github.event.inputs.issue_number || github.event.issue.number }} |
| 32 | + issue_comment: Hey 👋, I've just created a [thread]($THREAD_LINK$) for this issue on [PyTorch-Ignite Discord](https://pytorch-ignite.ai/chat) where you can quickly talk to the community on the topic. |
| 33 | + discord_message: New issue created in `${{ github.repository }}`:<https://github.com/${{ github.repository }}/issues/${{ github.event.issue.number }}> |
| 34 | + |
| 35 | + - name: "Discuss on Discord-PR (Non-maintainer only)" |
| 36 | + if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'help wanted') |
| 37 | + uses: EndBug/discuss-on-discord@v1.1.0 |
| 38 | + with: |
| 39 | + discord_bot_token: ${{ secrets.DISCORD_BOT_TOKEN }} |
| 40 | + destination: ${{ secrets.DISCORD_BOT_DESTINATION }} |
| 41 | + issue_number: ${{ github.event.inputs.pull_request_number || github.event.pull_request.number }} |
| 42 | + issue_comment: Hey 👋, I've just created a [thread]($THREAD_LINK$) for this pull request on [PyTorch-Ignite Discord](https://pytorch-ignite.ai/chat) where you can quickly talk to the community on the topic. |
| 43 | + discord_message: New PR created in `${{ github.repository }}`:<https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}> |
| 44 | + |
0 commit comments