File tree Expand file tree Collapse file tree 1 file changed +36
-11
lines changed Expand file tree Collapse file tree 1 file changed +36
-11
lines changed Original file line number Diff line number Diff line change 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+
39jobs :
410 star-notify :
11+ if : github.event_name == 'watch'
512 name : Notify Slack on star
613 runs-on : ubuntu-latest
714 steps :
8- - name : Get current star count
9- 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
12- env :
13- SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
14- uses : pullreminders/slack-action@master
15- with :
16- 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+
19+ - name : Notify Slack
20+ 21+ with :
22+ method : chat.postMessage
23+ token : ${{ secrets.SLACK_BOT_TOKEN }}
24+ payload : |
25+ channel: CSK7N9TGX
26+ type: "mrkdwn"
27+ text: "<https://github.com/${{ github.actor }}|${{ github.actor }}> just starred <https://github.com/${{ github.repository }}/stargazers|${{ github.repository }}> bringing the total ⭐️ count up to: ${{ env.STARS }}"
28+
29+ good-first-issue-notify :
30+ if : github.event_name == 'issues' && (github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only')
31+ name : Notify Slack for new good-first-issue
32+ runs-on : ubuntu-latest
33+ steps :
34+ - name : Notify Slack
35+ 36+ with :
37+ method : chat.postMessage
38+ token : ${{ secrets.SLACK_BOT_TOKEN }}
39+ payload : |
40+ channel: C019426UBNY
41+ text: ":new: Good first issue up for grabs: <${{ github.event.issue.title }}|${{ github.event.issue.html_url }}>"
You can’t perform that action at this time.
0 commit comments