From ffb17bd425fcd0d6b08ff4cd40a8fc211336bc5d Mon Sep 17 00:00:00 2001 From: Sinto Sajeev <115780473+sinto-aot@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:00:03 +0530 Subject: [PATCH] Updated GitHub issues notification (#2355) * Create issue-notification.yml * Update issue-notification.yml * Update issue-notification.yml * Update issue-notification.yml --- .github/workflows/issue-notification.yml | 62 ++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/issue-notification.yml diff --git a/.github/workflows/issue-notification.yml b/.github/workflows/issue-notification.yml new file mode 100644 index 0000000000..d66be4eb86 --- /dev/null +++ b/.github/workflows/issue-notification.yml @@ -0,0 +1,62 @@ +name: Issue Creation Tracker +on: + issues: + types: [opened, closed] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Git Issue Details + run: | + echo "Issue creator: ${{ github.event.issue.user.login }}" + echo "Issue number: ${{ github.event.issue.number }}" + echo "Issue url: ${{ github.event.issue.html_url }}" + echo "Assigned labels: " ${{ join(github.event.issue.labels.*.name) }} + - name: Google Chat Notification + run: | + curl --location --request POST '${{ secrets.NOTIFY_GITHUB_ISSUES }}' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "cards": [ + { + "header": { + "title": "Issue Tracker", + "subtitle": "Issue No: #${{ github.event.issue.number }}" + }, + "sections": [ + { + "widgets": [ + { + "keyValue": { + "topLabel": "Creator", + "content": "${{ github.event.issue.user.login }}" + }, + }, + { + "keyValue": { + "topLabel": "Assigned Lables", + "content": "- ${{ join(github.event.issue.labels.*.name) }}" + } + }, + { + "buttons": [ + { + "textButton": { + "text": "OPEN ISSUE", + "onClick": { + "openLink": { + "url": "${{ github.event.issue.html_url }}" + } + } + } + } + ] + } + ] + } + ] + } + ] + }' \ No newline at end of file