From 08aac60394025a3495b5f6ab19f99508303e7020 Mon Sep 17 00:00:00 2001 From: Anahide Tchertchian <608958+atchertchian@users.noreply.github.com> Date: Thu, 5 Dec 2024 18:19:45 +0100 Subject: [PATCH 1/6] AAE-28530 Fix teams notification when filling needs --- .github/actions/send-teams-notification/action.yml | 2 +- .../tests/send-teams-notification.bats | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/actions/send-teams-notification/action.yml b/.github/actions/send-teams-notification/action.yml index f23dd941c..375606709 100644 --- a/.github/actions/send-teams-notification/action.yml +++ b/.github/actions/send-teams-notification/action.yml @@ -64,7 +64,7 @@ runs: env: NEEDS: ${{ inputs.needs }} run: | - NEEDS_OUTPUT=$(echo $NEEDS | jq -r 'to_entries[] | "\(.key): \(.value.result)"') + NEEDS_OUTPUT=$(echo $NEEDS | jq -r 'to_entries | map([.key, .value.result]|join(": ")) | join("\n")') echo "result=$NEEDS_OUTPUT" >> $GITHUB_OUTPUT - name: Compute message diff --git a/.github/actions/send-teams-notification/tests/send-teams-notification.bats b/.github/actions/send-teams-notification/tests/send-teams-notification.bats index a290300ac..4c06dad9b 100644 --- a/.github/actions/send-teams-notification/tests/send-teams-notification.bats +++ b/.github/actions/send-teams-notification/tests/send-teams-notification.bats @@ -257,7 +257,7 @@ BATS @test "needs" { export NEEDS_JSON=$(<$BATS_TEST_DIRNAME/sample-needs.json) - export NEEDS=$(echo $NEEDS_JSON | jq -r 'to_entries[] | "\(.key): \(.value.result)"') + export NEEDS=$(echo $NEEDS_JSON | jq -r 'to_entries | map([.key, .value.result]|join(": ")) | join("\n")') run compute-message.sh @@ -270,9 +270,6 @@ EOF BATS ) - echo $output - echo $expected_output - [ "$output" = "$expected_output" ] } From c9f484288c255e090716dc217b68754e1a1f8d01 Mon Sep 17 00:00:00 2001 From: Anahide Tchertchian <608958+atchertchian@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:11:24 +0100 Subject: [PATCH 2/6] fix --- .github/actions/send-teams-notification/action.yml | 4 +++- version.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/send-teams-notification/action.yml b/.github/actions/send-teams-notification/action.yml index 375606709..2e15753c6 100644 --- a/.github/actions/send-teams-notification/action.yml +++ b/.github/actions/send-teams-notification/action.yml @@ -65,7 +65,9 @@ runs: NEEDS: ${{ inputs.needs }} run: | NEEDS_OUTPUT=$(echo $NEEDS | jq -r 'to_entries | map([.key, .value.result]|join(": ")) | join("\n")') - echo "result=$NEEDS_OUTPUT" >> $GITHUB_OUTPUT + echo "result<> $GITHUB_OUTPUT + echo "$NEEDS_OUTPUT" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT - name: Compute message id: compute-message diff --git a/version.txt b/version.txt index 684f62b80..7949e7e56 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v8.5.0 +v8.5.1 From f70096f0cf6bb67240d7655a88def64b459c06ff Mon Sep 17 00:00:00 2001 From: Anahide Tchertchian <608958+atchertchian@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:16:17 +0100 Subject: [PATCH 3/6] fix --- .github/actions/send-teams-notification/action.yml | 3 +-- .../send-teams-notification/tests/send-teams-notification.bats | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/actions/send-teams-notification/action.yml b/.github/actions/send-teams-notification/action.yml index 2e15753c6..2eb5aff3b 100644 --- a/.github/actions/send-teams-notification/action.yml +++ b/.github/actions/send-teams-notification/action.yml @@ -64,9 +64,8 @@ runs: env: NEEDS: ${{ inputs.needs }} run: | - NEEDS_OUTPUT=$(echo $NEEDS | jq -r 'to_entries | map([.key, .value.result]|join(": ")) | join("\n")') echo "result<> $GITHUB_OUTPUT - echo "$NEEDS_OUTPUT" >> $GITHUB_OUTPUT + echo $NEEDS | jq -r 'to_entries[] | "\(.key): \(.value.result)"' >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - name: Compute message diff --git a/.github/actions/send-teams-notification/tests/send-teams-notification.bats b/.github/actions/send-teams-notification/tests/send-teams-notification.bats index 4c06dad9b..82374d6e9 100644 --- a/.github/actions/send-teams-notification/tests/send-teams-notification.bats +++ b/.github/actions/send-teams-notification/tests/send-teams-notification.bats @@ -257,7 +257,7 @@ BATS @test "needs" { export NEEDS_JSON=$(<$BATS_TEST_DIRNAME/sample-needs.json) - export NEEDS=$(echo $NEEDS_JSON | jq -r 'to_entries | map([.key, .value.result]|join(": ")) | join("\n")') + export NEEDS=$(echo $NEEDS_JSON | jq -r 'to_entries[] | "\(.key): \(.value.result)"') run compute-message.sh From e31dfb09479df12a87dfeb4fac720574ac396222 Mon Sep 17 00:00:00 2001 From: Anahide Tchertchian <608958+atchertchian@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:24:43 +0100 Subject: [PATCH 4/6] fix --- .github/actions/send-teams-notification/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/send-teams-notification/action.yml b/.github/actions/send-teams-notification/action.yml index 2eb5aff3b..a3f3a94ee 100644 --- a/.github/actions/send-teams-notification/action.yml +++ b/.github/actions/send-teams-notification/action.yml @@ -65,7 +65,7 @@ runs: NEEDS: ${{ inputs.needs }} run: | echo "result<> $GITHUB_OUTPUT - echo $NEEDS | jq -r 'to_entries[] | "\(.key): \(.value.result)"' >> $GITHUB_OUTPUT + echo $NEEDS | jq -r 'to_entries | map([.key, .value.result]|join(": ")) | join("\n\n")' >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - name: Compute message From dfe93ee073eb4a584659e17aebf16b1a286bd01e Mon Sep 17 00:00:00 2001 From: Anahide Tchertchian <608958+atchertchian@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:31:00 +0100 Subject: [PATCH 5/6] fix --- .../tests/send-teams-notification.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/send-teams-notification/tests/send-teams-notification.bats b/.github/actions/send-teams-notification/tests/send-teams-notification.bats index 82374d6e9..001d8772e 100644 --- a/.github/actions/send-teams-notification/tests/send-teams-notification.bats +++ b/.github/actions/send-teams-notification/tests/send-teams-notification.bats @@ -257,7 +257,7 @@ BATS @test "needs" { export NEEDS_JSON=$(<$BATS_TEST_DIRNAME/sample-needs.json) - export NEEDS=$(echo $NEEDS_JSON | jq -r 'to_entries[] | "\(.key): \(.value.result)"') + export NEEDS=$(echo $NEEDS_JSON | jq -r 'to_entries | map([.key, .value.result]|join(": ")) | join("\n\n")') run compute-message.sh @@ -265,7 +265,7 @@ BATS expected_output=$(cat << 'BATS' result< Date: Fri, 6 Dec 2024 15:27:10 +0100 Subject: [PATCH 6/6] Update version.txt --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index 102d10bda..0414a3bad 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v8.6.1 \ No newline at end of file +v8.6.1