Skip to content

Commit 62b7223

Browse files
authored
Enclose env vars with double quotes (#217)
1 parent ee9775d commit 62b7223

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/pr_notification.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ on:
77
jobs:
88
notify-pull-request:
99
runs-on: ubuntu-latest
10-
env:
11-
TITLE: ${{ github.event.pull_request.title }}
12-
LABELS: ${{ join(github.event.pull_request.labels.*.name, ', ') }}
1310
steps:
1411
- name: Pull Request Details
1512
run: |
1613
echo "Pull Request: ${{ github.event.pull_request.number }}"
1714
echo "Author: ${{ github.event.pull_request.user.login }}"
1815
1916
- name: Google Chat Notification
17+
shell: bash
18+
env:
19+
TITLE: ${{ github.event.pull_request.title }}
20+
LABELS: ${{ join(github.event.pull_request.labels.*.name, ', ') }}
2021
run: |
2122
curl --location --request POST '${{ secrets.WEBHOOK_URL }}' \
2223
--header 'Content-Type: application/json' \
@@ -39,7 +40,7 @@ jobs:
3940
{
4041
"keyValue": {
4142
"topLabel": "Title",
42-
"content": "$TITLE"
43+
"content": "'"$TITLE"'"
4344
}
4445
},
4546
{
@@ -69,7 +70,7 @@ jobs:
6970
{
7071
"keyValue": {
7172
"topLabel": "Labels",
72-
"content": "- $LABELS"
73+
"content": "- '"$LABELS"'"
7374
}
7475
},
7576
{

.github/workflows/push_notification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
{
2727
"header": {
2828
"title": "Push to main branch",
29-
"subtitle": "$COMMIT"
29+
"subtitle": "'"$COMMIT"'"
3030
},
3131
"sections": [
3232
{

0 commit comments

Comments
 (0)