Support additional params in trySignInSilently URL #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Send Notification | ||
env: | ||
ISSUE: ${{ github.event.issue }} | ||
TITLE: ${{ github.event.issue.title }} | ||
ISSUE_AUTHOR: ${{ github.event.issue.user.login }} | ||
ISSUE_URL: ${{ github.event.issue.html_url }} | ||
ISSUE_BODY: ${{ github.event.issue.body }} | ||
PULL_REQUEST: ${{github.event.pull_request}} | ||
PR_TITLE: ${{ github.event.pull_request.title }} | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
PR_AUTHOR: ${{ github.event.pull_request.user.login }} | ||
PR_BODY: ${{ github.event.pull_request.body }} | ||
on: | ||
issues: | ||
types: [opened] | ||
pull_request: | ||
types: [opened] | ||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Send notification on issue creation | ||
if: $ISSUE | ||
Check failure on line 26 in .github/workflows/notification.yml
|
||
run: | | ||
curl --location --request POST '${{secrets.WEBHOOK_CHAT}}' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"cards": [ | ||
{ | ||
"header": { | ||
"title": "ISSUE: $ISSUE_TITLE", | ||
"subtitle": "By $ISSUE_AUTHOR in Asgardeo SPA SDK Repo", | ||
"imageUrl": "https://avatars.githubusercontent.com/u/583231?v=4", | ||
"imageStyle": "IMAGE" | ||
}, | ||
"sections": { | ||
"widgets": [ | ||
{ | ||
"buttons": [ | ||
{ | ||
"textButton": { | ||
"text": "Open Issue", | ||
"onClick": { | ||
"openLink": { | ||
"url": "$ISSUE_URL" | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"textParagraph": { | ||
"text": "$ISSUE_BODY" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}' | ||
- name: Send notification on pull request creation | ||
if: $PULL_REQUEST | ||
run: | | ||
curl --location --request POST '${{secrets.WEBHOOK_CHAT}}' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"cards": [ | ||
{ | ||
"header": { | ||
"title": "PR: $PR_TITLE", | ||
"subtitle": "By $PR_AUTHOR in Asgardeo SPA SDK Repo", | ||
"imageUrl": "https://avatars.githubusercontent.com/u/583231?v=4", | ||
"imageStyle": "IMAGE" | ||
}, | ||
"sections": { | ||
"widgets": [ | ||
{ | ||
"buttons": [ | ||
{ | ||
"textButton": { | ||
"text": "Open PR", | ||
"onClick": { | ||
"openLink": { | ||
"url": "$PR_URL" | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"textParagraph": { | ||
"text": "$PR_BODY" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}' |