| 1 |
name: README.md Changed |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
paths: |
| 8 |
- 'README.md' |
| 9 |
|
| 10 |
jobs: |
| 11 |
send_notification: |
| 12 |
runs-on: ubuntu-latest |
| 13 |
steps: |
| 14 |
- uses: actions/checkout@v4 |
| 15 |
- name: Send notification to README Authors |
| 16 |
env: |
| 17 |
GITHUB_TOKEN: ${{ secrets.GHP_README_WORKFLOW }} |
| 18 |
GIT_SHA: ${{ github.sha }} |
| 19 |
run: | |
| 20 |
COMMIT=$(git rev-parse --short "$GIT_SHA") |
| 21 |
AUTHORS='@willmcgugan @oleksis @Adilius' |
| 22 |
BODY="🤓 $AUTHORS README.md changed 📝. Check the [commit $COMMIT](https://github.com/willmcgugan/rich/commit/$GIT_SHA) 👀" |
| 23 |
DISCUSSIONID='MDEwOkRpc2N1c3Npb24zMzI2NzM0' |
| 24 |
gh api graphql -H 'GraphQL-Features: discussions_api' -f body="$BODY" -F discussionId="$DISCUSSIONID" -f query='mutation($body: String!, $discussionId: ID!){addDiscussionComment(input:{body: $body , discussionId: $discussionId}){comment{id}}}' |