-
Notifications
You must be signed in to change notification settings - Fork 47.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Better filtering for discord notifications
We don't always consistently use "tags" in commit messages, so let's use the filepaths modified in the PR instead to determine which channel to send notifications to.
- Loading branch information
Showing
3 changed files
with
48 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: (Compiler) Discord Notify | ||
|
||
on: | ||
pull_request_target: | ||
types: [labeled] | ||
paths: | ||
- compiler/** | ||
- .github/workflows/compiler_**.yml | ||
|
||
jobs: | ||
notify: | ||
if: ${{ github.event.label.name == 'React Core Team' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Discord Webhook Action | ||
uses: tsickert/[email protected] | ||
with: | ||
webhook-url: ${{ secrets.COMPILER_DISCORD_WEBHOOK_URL }} | ||
embed-author-name: ${{ github.event.pull_request.user.login }} | ||
embed-author-url: ${{ github.event.pull_request.user.html_url }} | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: (Runtime) Discord Notify | ||
|
||
on: | ||
pull_request_target: | ||
types: [labeled] | ||
paths-ignore: | ||
- compiler/** | ||
- .github/workflows/compiler_**.yml | ||
|
||
jobs: | ||
notify: | ||
if: ${{ github.event.label.name == 'React Core Team' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Discord Webhook Action | ||
uses: tsickert/[email protected] | ||
with: | ||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} | ||
embed-author-name: ${{ github.event.pull_request.user.login }} | ||
embed-author-url: ${{ github.event.pull_request.user.html_url }} | ||
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 }} |
This file was deleted.
Oops, something went wrong.