Skip to content
Closed
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
20 changes: 14 additions & 6 deletions .github/workflows/pr_notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ jobs:
steps:
- name: Pull Request Details
run: |
echo "Pull Request: ${{ github.event.pull_request.title }}"
echo "Author: ${{ github.event.pull_request.user.login }}"
echo "Pull Request: ${GITHUB_EVENT_PULL_REQUEST_TITLE}"
echo "Author: ${GITHUB_EVENT_PULL_REQUEST_USER_LOGIN}"
env:
GITHUB_EVENT_PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }}
GITHUB_EVENT_PULL_REQUEST_USER_LOGIN: ${{ github.event.pull_request.user.login }}

- name: Google Chat Notification
run: |
Expand All @@ -30,19 +33,19 @@ jobs:
{
"keyValue": {
"topLabel": "Repo",
"content": "${{ github.event.pull_request.head.repo.full_name }}"
"content": "${GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME}"
}
},
{
"keyValue": {
"topLabel": "Title",
"content": "${{ github.event.pull_request.title }}"
"content": "${GITHUB_EVENT_PULL_REQUEST_TITLE}"
}
},
{
"keyValue": {
"topLabel": "Creator",
"content": "${{ github.event.pull_request.user.login }}"
"content": "${GITHUB_EVENT_PULL_REQUEST_USER_LOGIN}"
}
},
{
Expand Down Expand Up @@ -76,7 +79,7 @@ jobs:
"text": "Open Pull Request",
"onClick": {
"openLink": {
"url": "${{ github.event.pull_request.html_url }}"
"url": "${GITHUB_EVENT_PULL_REQUEST_HTML_URL}"
}
}
}
Expand All @@ -89,3 +92,8 @@ jobs:
}
]
}'
env:
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
GITHUB_EVENT_PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }}
GITHUB_EVENT_PULL_REQUEST_USER_LOGIN: ${{ github.event.pull_request.user.login }}
GITHUB_EVENT_PULL_REQUEST_HTML_URL: ${{ github.event.pull_request.html_url }}
20 changes: 14 additions & 6 deletions .github/workflows/push_notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,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 @@ -24,21 +27,21 @@ jobs:
{
"header": {
"title": "Push to main branch",
"subtitle": "${{ github.event.head_commit.message }}"
"subtitle": "${GITHUB_EVENT_HEAD_COMMIT_MESSAGE}"
},
"sections": [
{
"widgets": [
{
"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 @@ -48,7 +51,7 @@ jobs:
"text": "Ref comparison",
"onClick": {
"openLink": {
"url": "${{ github.event.compare }}"
"url": "${GITHUB_EVENT_COMPARE}"
}
}
}
Expand All @@ -61,4 +64,9 @@ jobs:
}
]
}'
env:
GITHUB_EVENT_HEAD_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
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 }}