Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 6b34dde

Browse files
authored
Merge pull request #126 from Ayushmore1214/patch-1
Update slack.yml
2 parents f954791 + 6fbeb32 commit 6b34dde

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

.github/workflows/slack.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
1-
name: Slack Notify on Star
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:
11+
if: github.event_name == 'watch'
512
name: Notify Slack on star
613
runs-on: ubuntu-latest
714
steps:
815
- name: Get current star count
916
run: |
10-
echo "STARS=$(curl --silent 'https://api.github.com/repos/${{github.repository}}' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
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 ${{github.repository}}! (https://github.com/${{github.repository}}/stargazers) Total ⭐️: ${{env.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)