Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 3a3dc8f

Browse files
authored
Send slack message on new issue (#1421)
<!-- A note on testing your PR --> <!-- Basic unit test run is executed against each commit in the PR. If you want to run a full integration test suite, you can trigger it by commenting with '/run-integration-tests' or '/run-it' -->
1 parent d34a823 commit 3a3dc8f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Issues and PRs Notification
2+
3+
permissions:
4+
contents: read
5+
pull-requests: read
6+
statuses: write
7+
8+
on:
9+
issues:
10+
types: [opened]
11+
pull_request:
12+
types: [opened]
13+
14+
jobs:
15+
notify-slack:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Send Slack notification for new issue or PR
19+
uses: slackapi/[email protected]
20+
with:
21+
method: chat.postMessage
22+
token: ${{ secrets.SLACK_BOT_TOKEN }}
23+
payload: |
24+
channel: ${{ secrets.SLACK_ISSUES_AND_PRS_CHANNEL_ID }}
25+
text: >
26+
${{ github.event_name == 'issues' && ':memo: *New Issue Created!*' || ':twisted_rightwards_arrows: *New Pull Request Opened!*' }}
27+
*Title:* ${{ github.event_name == 'issues' && github.event.issue.title || github.event.pull_request.title }}
28+
*Author:* ${{ github.event_name == 'issues' && github.event.issue.user.login || github.event.pull_request.user.login }}
29+
*URL:* ${{ github.event_name == 'issues' && github.event.issue.html_url || github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)