Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/pr_notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ jobs:
- name: Pull Request Details
run: |
echo "Pull Request: ${{ github.event.pull_request.number }}"
echo "Author: ${{ github.event.pull_request.user.login }}"
echo "Author: ${GITHUB_EVENT_PULL_REQUEST_USER_LOGIN}"
env:
GITHUB_EVENT_PULL_REQUEST_USER_LOGIN: ${{ github.event.pull_request.user.login }}

- name: Google Chat Notification
shell: bash
env:
TITLE: ${{ github.event.pull_request.title }}
LABELS: ${{ join(github.event.pull_request.labels.*.name, ', ') }}
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
GITHUB_EVENT_PULL_REQUEST_USER_LOGIN: ${{ github.event.pull_request.user.login }}
GITHUB_EVENT_PULL_REQUEST_HTML_URL: ${{ github.event.pull_request.html_url }}
run: |
curl --location --request POST '${{ secrets.WEBHOOK_URL }}' \
--header 'Content-Type: application/json' \
Expand All @@ -34,7 +39,7 @@ jobs:
{
"keyValue": {
"topLabel": "Repo",
"content": "${{ github.event.pull_request.head.repo.full_name }}"
"content": "${GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME}"
}
},
{
Expand All @@ -46,7 +51,7 @@ jobs:
{
"keyValue": {
"topLabel": "Creator",
"content": "${{ github.event.pull_request.user.login }}"
"content": "${GITHUB_EVENT_PULL_REQUEST_USER_LOGIN}"
}
},
{
Expand Down Expand Up @@ -80,7 +85,7 @@ jobs:
"text": "Open Pull Request",
"onClick": {
"openLink": {
"url": "${{ github.event.pull_request.html_url }}"
"url": "${GITHUB_EVENT_PULL_REQUEST_HTML_URL}"
}
}
}
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/push_notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ jobs:
- name: Main Branch Push
run: |
echo "Workflow initiated by event with name: ${{ github.event_name }}"
echo "Pushing commit to main: ${{ github.event.head_commit.id }}"
echo "Pushed by: ${{ github.event.pusher.name }}"
echo "Pushing commit to main: ${GITHUB_EVENT_HEAD_COMMIT_ID}"
echo "Pushed by: ${GITHUB_EVENT_PUSHER_NAME}"
env:
GITHUB_EVENT_HEAD_COMMIT_ID: ${{ github.event.head_commit.id }}
GITHUB_EVENT_PUSHER_NAME: ${{ github.event.pusher.name }}

- name: Push Notification to Google Chat
run: |
Expand All @@ -34,13 +37,13 @@ jobs:
{
"keyValue": {
"topLabel": "Repo",
"content": "${{ github.event.repository.full_name }}"
"content": "${GITHUB_EVENT_REPOSITORY_FULL_NAME}"
}
},
{
"keyValue": {
"topLabel": "Committed by",
"content": "${{ github.event.head_commit.author.username }}"
"content": "${GITHUB_EVENT_HEAD_COMMIT_AUTHOR_USERNAME}"
}
},
{
Expand All @@ -50,7 +53,7 @@ jobs:
"text": "Ref comparison",
"onClick": {
"openLink": {
"url": "${{ github.event.compare }}"
"url": "${GITHUB_EVENT_COMPARE}"
}
}
}
Expand All @@ -63,4 +66,8 @@ jobs:
}
]
}'
env:
GITHUB_EVENT_REPOSITORY_FULL_NAME: ${{ github.event.repository.full_name }}
GITHUB_EVENT_HEAD_COMMIT_AUTHOR_USERNAME: ${{ github.event.head_commit.author.username }}
GITHUB_EVENT_COMPARE: ${{ github.event.compare }}

Loading