Skip to content

Commit

Permalink
AAE-28530 Fix teams notif management of multiple "needs" info (#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
atchertchian authored Dec 6, 2024
1 parent cf10f6e commit fe9dee4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/actions/send-teams-notification/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ runs:
env:
NEEDS: ${{ inputs.needs }}
run: |
NEEDS_OUTPUT=$(echo $NEEDS | jq -r 'to_entries[] | "\(.key): \(.value.result)"')
echo "result=$NEEDS_OUTPUT" >> $GITHUB_OUTPUT
echo "result<<EOF" >> $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
id: compute-message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,22 +257,19 @@ 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

[ "$status" -eq 0 ]

expected_output=$(cat << 'BATS'
result<<EOF
build: success\npromote: failure\n\nfix: update retry inputs to use string type\n\n* use strings\n* add tests
build: success\n\npromote: failure\n\nfix: update retry inputs to use string type\n\n* use strings\n* add tests
EOF
BATS
)

echo $output
echo $expected_output

[ "$output" = "$expected_output" ]

}
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.6.0
v8.6.1

0 comments on commit fe9dee4

Please sign in to comment.