Skip to content

Commit 7d6dcd3

Browse files
authored
Merge pull request #263 from RanitMukherjee/patch-2
Update slack.yml
2 parents 98effaa + 112857f commit 7d6dcd3

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/slack.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,27 @@ jobs:
1515
- name: Get current star count
1616
run: |
1717
echo "STARS=$(curl --silent 'https://api.github.com/repos/${{ github.repository }}' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
18+
1819
- name: Notify Slack
19-
env:
20-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
21-
uses: pullreminders/slack-action@master
20+
uses: slackapi/slack-github-action@v2.1.1
2221
with:
23-
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred ${{ github.repository }}! (https://github.com/${{ github.repository }}/stargazers) Total ⭐️: ${{ env.STARS }}\"}'
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 }}"
2428
2529
good-first-issue-notify:
2630
if: github.event_name == 'issues' && (github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only')
2731
name: Notify Slack for new good-first-issue
2832
runs-on: ubuntu-latest
2933
steps:
3034
- name: Notify Slack
31-
env:
32-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
33-
uses: pullreminders/slack-action@master
35+
uses: slackapi/slack-github-action@v2.1.1
3436
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-
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 }}>"

0 commit comments

Comments
 (0)