Skip to content

Commit

Permalink
[ci] Update discord notification bot to use remote workflow (#7455)
Browse files Browse the repository at this point in the history
  • Loading branch information
poteto authored Jan 24, 2025
1 parent 2f24839 commit a5aad0d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/discord_notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@ name: Discord Notify

on:
pull_request_target:
types: [ labeled ]
types: [labeled]

jobs:
check_maintainer:
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
with:
actor: ${{ github.event.pull_request.user.login }}
is_remote: true

notify:
if: ${{ github.event.label.name == 'React Core Team' }}
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
needs: check_maintainer
runs-on: ubuntu-latest
steps:
- name: Discord Webhook Action
Expand All @@ -18,4 +25,4 @@ jobs:
embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}'
embed-description: ${{ github.event.pull_request.body }}
embed-url: ${{ github.event.pull_request.html_url }}
embed-url: ${{ github.event.pull_request.html_url }}

0 comments on commit a5aad0d

Please sign in to comment.