Skip to content

Commit 8d8ae18

Browse files
committed
update slack.yml
Signed-off-by: Pranav Singh <pranavsingh02@hotmail.com>
1 parent a994484 commit 8d8ae18

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.github/workflows/slack.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
1-
name: Slack Notify on Star
2-
on: watch
1+
name: Slack Notify
2+
on:
3+
watch:
4+
issues:
5+
types: [labeled]
36
jobs:
47
star-notify:
8+
if: github.event_name == 'watch'
59
name: Notify Slack on star
610
runs-on: ubuntu-latest
711
steps:
812
- name: Get current star count
913
run: |
10-
echo ::set-env name=STARS::$(curl --silent 'https://api.github.com/repos/layer5io/wasm-filters' -H 'Accept: application/vnd.github.preview' | jq '.watchers_count')
14+
echo "STARS=$(curl --silent 'https://api.github.com/repos/${{github.repository}}' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
1115
- name: Notify slack
1216
env:
1317
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
1418
uses: pullreminders/slack-action@master
1519
with:
16-
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"Someone just starred WASM Filters! (https://github.com/layer5io/wasm-filters/stargazers) Total ⭐️: ${{env.STARS}}\"}'
20+
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred ${{github.repository}}! (https://github.com/${{github.repository}}/stargazers) Total ⭐️: ${{env.STARS}}\"}'
21+
good-first-issue-notify:
22+
if: github.event_name == 'issues' && github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only'
23+
name: Notify Slack for new good-first-issue
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Notify slack
27+
env:
28+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
29+
uses: pullreminders/slack-action@master
30+
with:
31+
args: '{\"channel\":\"C019426UBNY\",\"text\":\"A good first issue label was just added to ${{github.event.issue.html_url}}.\"}'

0 commit comments

Comments
 (0)