From de78b4c2ee7e114dfe2a9dc5365ada7cdf23ae92 Mon Sep 17 00:00:00 2001 From: Anahide Tchertchian <608958+atchertchian@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:07:09 +0100 Subject: [PATCH 1/2] AAE-28530 Fix ReportPortal launch key Code block not supported in adaptative cards see https://github.com/OfficeDev/Microsoft-Teams-Samples/issues/1087 --- .github/actions/reportportal-summarize/get-teams-message.sh | 2 +- version.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/reportportal-summarize/get-teams-message.sh b/.github/actions/reportportal-summarize/get-teams-message.sh index d043070c8..4fa44e383 100755 --- a/.github/actions/reportportal-summarize/get-teams-message.sh +++ b/.github/actions/reportportal-summarize/get-teams-message.sh @@ -4,7 +4,7 @@ if [[ -n "$RP_LAUNCH_KEY" ]]; then NB=$(echo "$RP_CONTENT" | jq -r '.page.totalElements // "0"') if [[ "$NB" == "0" || -z "$NB" ]]; then - MSG+="No report found for key "'`'"$RP_LAUNCH_KEY"'`'"." + MSG+="No report found for key $RP_LAUNCH_KEY." MSG+="\n\nSee [latest reports]($RP_LAUNCH_URL)." elif [ "$NB" == "1" ]; then RP_LAUNCH_ID=$(echo "$RP_CONTENT" | jq -r '.content[0].id // empty') diff --git a/version.txt b/version.txt index 0414a3bad..fa9d61610 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v8.6.1 +v8.6.2 From 964061de3ad38c7dd822f5df8a0585131efc8af7 Mon Sep 17 00:00:00 2001 From: Anahide Tchertchian <608958+atchertchian@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:50:20 +0100 Subject: [PATCH 2/2] cover one more use case + fix tests --- .github/actions/reportportal-summarize/get-teams-message.sh | 2 +- .../reportportal-summarize/tests/get-teams-message.bats | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/reportportal-summarize/get-teams-message.sh b/.github/actions/reportportal-summarize/get-teams-message.sh index 4fa44e383..1b3f84d20 100755 --- a/.github/actions/reportportal-summarize/get-teams-message.sh +++ b/.github/actions/reportportal-summarize/get-teams-message.sh @@ -12,7 +12,7 @@ if [[ -n "$RP_LAUNCH_KEY" ]]; then [[ "$STATUS" == 'PASSED' ]] && ICON="✅" || ICON="❌" MSG+="See [report]($RP_LAUNCH_URL/$RP_LAUNCH_ID) $ICON" else - MSG+="$NB reports found for key "'`'"$RP_LAUNCH_KEY"'`'"." + MSG+="$NB reports found for key $RP_LAUNCH_KEY." while read -r id ; do read -r number read -r status diff --git a/.github/actions/reportportal-summarize/tests/get-teams-message.bats b/.github/actions/reportportal-summarize/tests/get-teams-message.bats index 8c4dd8eeb..c16bf908a 100644 --- a/.github/actions/reportportal-summarize/tests/get-teams-message.bats +++ b/.github/actions/reportportal-summarize/tests/get-teams-message.bats @@ -14,10 +14,10 @@ setup() { export RP_LAUNCH_URL=https://rpserver:8080/ui/#my-project/launches/all export NO_MESSAGE="message=" - export KEY_NO_REPORT="message=No report found for key \`my-tests-push-3665876492\`.\n\nSee [latest reports](https://rpserver:8080/ui/#my-project/launches/all)." + export KEY_NO_REPORT="message=No report found for key my-tests-push-3665876492.\n\nSee [latest reports](https://rpserver:8080/ui/#my-project/launches/all)." export SINGLE_REPORT="message=See [report](https://rpserver:8080/ui/#my-project/launches/all/88) ✅" export MULTIPLE_REPORTS=$(cat << BATS -message=3 reports found for key \`my-tests-push-3665876492\`.\n\n[Report #3](https://rpserver:8080/ui/#my-project/launches/all/91) ❌\n\n[Report #2](https://rpserver:8080/ui/#my-project/launches/all/90) WHATEVER_STATUS\n\n[Report #1](https://rpserver:8080/ui/#my-project/launches/all/89) ✅ +message=3 reports found for key my-tests-push-3665876492.\n\n[Report #3](https://rpserver:8080/ui/#my-project/launches/all/91) ❌\n\n[Report #2](https://rpserver:8080/ui/#my-project/launches/all/90) WHATEVER_STATUS\n\n[Report #1](https://rpserver:8080/ui/#my-project/launches/all/89) ✅ BATS ) }