Skip to content

Commit c302eb6

Browse files
authored
Merge pull request #59 from RanitMukherjee/patch-1
Update slack.yaml
2 parents e1cc634 + 4759392 commit c302eb6

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

.github/slack.yaml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,36 @@
1-
name: Notify slack
2-
on: watch
1+
name: Slack Notify
2+
3+
on:
4+
watch:
5+
types: [started]
6+
issues:
7+
types: [labeled]
8+
39
jobs:
410
star-notify:
5-
name: Notify slack on star
11+
if: github.event_name == 'watch'
12+
name: Notify Slack on star
613
runs-on: ubuntu-latest
714
steps:
815
- name: Get current star count
916
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')
11-
- name: Notify slack
17+
echo "STARS=$(curl --silent 'https://api.github.com/repos/${{ github.repository }}' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
18+
- name: Notify Slack
1219
env:
1320
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
1421
uses: pullreminders/slack-action@master
1522
with:
16-
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred wasm-filters! (https://github.com/layer5io/wasm-filters/stargazers) Total stars: ${{env.STARS}}\"}'
17-
command: echo "Now at ${{env.STARS}} stars."
23+
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred ${{ github.repository }}! (https://github.com/${{ github.repository }}/stargazers) Total ⭐️: ${{ env.STARS }}\"}'
24+
25+
good-first-issue-notify:
26+
if: github.event_name == 'issues' && (github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only')
27+
name: Notify Slack for new good-first-issue
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Notify Slack
31+
env:
32+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
33+
uses: pullreminders/slack-action@master
34+
with:
35+
args: '{\"channel\":\"C019426UBNY\",\"type\":\"section\",\"text\":\":new: Good first issue up for grabs: ${{ github.event.issue.title }} - ${{ github.event.issue.html_url }} \"}'
36+

0 commit comments

Comments
 (0)