-
Notifications
You must be signed in to change notification settings - Fork 203
34 lines (33 loc) · 1.31 KB
/
slackRemovalRequest.yml
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
name: Request Slack Removal for Offboarding Users
on:
issue_comment:
types: [created]
jobs:
check_comments:
runs-on: ubuntu-latest
name: Check comments for /request
steps:
- name: Check for command
uses: xt0rted/slash-command-action@v1
if: |
github.event_name == 'issue_comment' && github.event.action == 'created'
&& startsWith(github.event.comment.body, '/request')
id: request
with:
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
command: request
reaction: "true"
reaction-type: "eyes"
allow-edits: "false"
- name: Send Slack message
uses: archive/[email protected]
if: |
github.event_name == 'issue_comment' && github.event.action == 'created'
&& startsWith(github.event.comment.body, '/request')
with:
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
slack-channel: vsp-slack-user-management
slack-text: Hello! Please remove ${{ steps.request.outputs.command-arguments }} from DSVA Slack based on issue URL ${{ github.event.issue.html_url }}
slack-optional-icon_emoji: ":robot_face:"
slack-optional-unfurl_links: "false"
slack-optional-unfurl_media: "false"