Skip to content

Commit 023413d

Browse files
authored
Merge branch 'master' into feat/academy-update
2 parents b2351a9 + 0360fc3 commit 023413d

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

.github/workflows/slack.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
11
name: Slack Notify
2-
on:
2+
3+
on:
34
watch:
45
types: [started]
6+
issues:
7+
types: [labeled]
8+
59
jobs:
610
star-notify:
711
if: github.event_name == 'watch'
812
name: Notify Slack on star
913
runs-on: ubuntu-latest
1014
steps:
11-
- name: Get current star count
12-
run: |
13-
echo "STARS=$(curl --silent 'https://api.github.com/repos/${{github.repository}}' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
14-
- name: Notify slack
15-
env:
16-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
17-
uses: pullreminders/slack-action@master
18-
with:
19-
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred ${{github.repository}}! (https://github.com/${{github.repository}}/stargazers) Total ⭐️: ${{env.STARS}}\"}'
15+
- name: Get current star count
16+
run: |
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
19+
env:
20+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
21+
uses: pullreminders/slack-action@master
22+
with:
23+
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred ${{ github.repository }}! (https://github.com/${{ github.repository }}/stargazers) Total ⭐️: ${{ env.STARS }}\"}'
24+
2025
good-first-issue-notify:
21-
if: github.event_name == 'issues' && github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only'
26+
if: github.event_name == 'issues' && (github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only')
2227
name: Notify Slack for new good-first-issue
2328
runs-on: ubuntu-latest
2429
steps:
25-
- name: Notify slack
30+
- name: Notify Slack
2631
env:
2732
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
2833
uses: pullreminders/slack-action@master
2934
with:
30-
args: '{\"channel\":\"C019426UBNY\",\"text\":\"A good first issue label was just added to ${{github.event.issue.html_url}}.\"}'
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)