Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions .github/workflows/discord_issues.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Discuss on Discord
name: Discuss "help-wanted" issue on Discord

on:
issues:
Expand All @@ -11,8 +11,7 @@ on:
inputs:
issue_number:
description: 'Issue number'
pull_request_number:
description: 'Pull request number'
required: true

permissions:
issues: write
Expand All @@ -23,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Discuss on Discord-Issues"
if: github.event.issue && contains(github.event.issue.labels.*.name, 'help wanted')
if: ${{ github.event.label.name == 'help wanted' }}
uses: EndBug/[email protected]
with:
discord_bot_token: ${{ secrets.DISCORD_BOT_TOKEN }}
Expand All @@ -32,13 +31,4 @@ jobs:
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.
discord_message: New issue created in `${{ github.repository }}`:<https://github.com/${{ github.repository }}/issues/${{ github.event.issue.number }}>

- name: "Discuss on Discord-PR (Non-maintainer only)"
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'help wanted')
uses: EndBug/[email protected]
with:
discord_bot_token: ${{ secrets.DISCORD_BOT_TOKEN }}
destination: ${{ secrets.DISCORD_BOT_DESTINATION }}
issue_number: ${{ github.event.inputs.pull_request_number || github.event.pull_request.number }}
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.
discord_message: New PR created in `${{ github.repository }}`:<https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}>


28 changes: 28 additions & 0 deletions .github/workflows/discord_pull_requests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Discuss "help-wanted" PR on Discord

on:
pull_request:
types:
- labeled
workflow_dispatch:
inputs:
pull_request_number:
description: 'Pull request number'

permissions:
pull-requests: write

jobs:
discord:
runs-on: ubuntu-latest
steps:
- name: "Discuss on Discord-PR (Non-maintainer only)"
if: ${{ github.event.label.name == 'help wanted' }}
uses: EndBug/[email protected]
with:
discord_bot_token: ${{ secrets.DISCORD_BOT_TOKEN }}
destination: ${{ secrets.DISCORD_BOT_DESTINATION }}
issue_number: ${{ github.event.inputs.pull_request_number || github.event.pull_request.number }}
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.
discord_message: New PR created in `${{ github.repository }}`:<https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}>