-
Notifications
You must be signed in to change notification settings - Fork 74
49 lines (43 loc) · 1.34 KB
/
community-issue-notification.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Send the tracetest team a notification about a new
# issue opened by a user
on:
issues:
types:
- opened
permissions:
id-token: write
contents: read
issues: write
pull-requests: write
jobs:
notify_slack:
name: Notify team
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Load team members
id: load_team_members
run:
echo "team_members=$(cat .github/TEAM_MEMBERS.txt | tr '\n' ',')" >> $GITHUB_OUTPUT
- name: Check if it's team member
id: is_team_member
if: github.event.action == 'opened'
uses: mathnogueira/[email protected]
with:
blocked_users: ${{ steps.load_team_members.outputs.team_members }}
- name: Notify team about issue
if: |
steps.is_team_member.outputs.result == 'false'
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: tracetest
SLACK_COLOR: good
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_TITLE: An issue was opened by a user
SLACK_MESSAGE: ${{ github.event.issue.title }}
SLACK_USERNAME: GitHub
SLACK_LINK_NAMES: true
SLACK_FOOTER: ${{ github.event.issue.html_url }}
MSG_MINIMAL: true