Skip to content

Commit 82bd244

Browse files
authored
chore: Add notification workflows (#43)
1 parent 3bb89a4 commit 82bd244

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Notify Comments on Open Issues
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
notify:
9+
runs-on: ubuntu-latest
10+
if: ${{ !github.event.issue.pull_request && (github.event.issue.state == 'closed' || contains(github.event.issue.labels.*.name, 'pending-response') || contains(github.event.issue.labels.*.name, 'closing soon')) }}
11+
steps:
12+
- name: Run webhook curl command
13+
env:
14+
WEBHOOK_URL: ${{ secrets.SLACK_COMMENT_WEBHOOK_URL }}
15+
BODY: ${{ toJson(github.event.comment.body) }}
16+
COMMENT_URL: ${{github.event.comment.html_url}} d
17+
shell: bash
18+
run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'"}'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Notify Amplify UI Android Release
2+
3+
on:
4+
release:
5+
types: [created, published]
6+
7+
jobs:
8+
notify:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Run webhook curl command
12+
env:
13+
WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK_URL }}
14+
VERSION: ${{github.event.release.html_url}}
15+
REPO_URL: ${{github.event.repository.html_url}}
16+
ACTION_NAME: ${{github.event.action}}
17+
shell: bash
18+
run: echo $VERSION | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"action":"'$ACTION_NAME'", "repo":"'$REPO_URL'", "version":"{}"}'

0 commit comments

Comments
 (0)