@@ -36,7 +36,7 @@ assert_file_contains "$comment_file" "$action_version"
3636assert_file_contains " $comment_file " " $preview_url "
3737assert_file_contains " $comment_file " " Built to branch"
3838assert_file_contains " $comment_file " " pr-12345"
39- assert_file_contains " $comment_file " " qr.rossjrw.com " && exit 1 || true
39+ assert_file_contains " $comment_file " " /?url= " && exit 1 || true
4040
4141echo >&2 " test comment: removal"
4242echo >&2 " ==============================="
@@ -57,11 +57,11 @@ echo >&2 "==============================="
5757assert_file_contains " $comment_file " " PR Preview Action"
5858assert_file_contains " $comment_file " " $action_version "
5959assert_file_contains " $comment_file " " Preview removed"
60- assert_file_contains " $comment_file " " qr.rossjrw.com " && exit 1 || true
60+ assert_file_contains " $comment_file " " /?url= " && exit 1 || true
6161
6262echo >&2 " test comment: deployment with QR code"
6363echo >&2 " ==============================="
64- qr_code_provider=" https://qr.rossjrw .com/?url="
64+ qr_code_provider=" https://qr.example .com/?url="
6565bash lib/generate-comment.sh \
6666 " $action_repository " \
6767 " $action_version " \
@@ -77,4 +77,24 @@ qr_code_provider=""
7777cat >&2 " $comment_file "
7878echo >&2 " ==============================="
7979
80- assert_file_contains " $comment_file " " qr.rossjrw.com/?url=$preview_url "
80+ assert_file_contains " $comment_file " " qr.example.com/?url=$preview_url "
81+
82+ echo >&2 " test comment: deployment with QR code, backwards compatibility with qr-code:true"
83+ echo >&2 " ==============================="
84+ qr_code_provider=" true"
85+ bash lib/generate-comment.sh \
86+ " $action_repository " \
87+ " $action_version " \
88+ " $preview_url " \
89+ " $preview_branch " \
90+ " $server_url " \
91+ " $deployment_repository " \
92+ " $action_start_time " \
93+ " deploy" \
94+ " $qr_code_provider " \
95+ > " $comment_file "
96+ qr_code_provider=" "
97+ cat >&2 " $comment_file "
98+ echo >&2 " ==============================="
99+
100+ assert_file_contains " $comment_file " " qr.rossjrw.com"
0 commit comments