From 6f248f6809a591760d43dce0b1f8aba919ff5442 Mon Sep 17 00:00:00 2001 From: Tore Martin Hagen <93583343+ToreMerkely@users.noreply.github.com> Date: Fri, 20 Sep 2024 08:38:35 +0200 Subject: [PATCH] never alone more info (#323) * Added some more annotations * Removed extra annotation on daily job * Send pr autor name since that is what we use --- bin/never_alone/create_never_alone_trail.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/never_alone/create_never_alone_trail.sh b/bin/never_alone/create_never_alone_trail.sh index bcaaeded..efa42249 100755 --- a/bin/never_alone/create_never_alone_trail.sh +++ b/bin/never_alone/create_never_alone_trail.sh @@ -203,7 +203,12 @@ function attest_commit_trail_never_alone if [ "${never_alone_data}" != "[]" ]; then latest_never_alone_data=$(echo "${never_alone_data}" | jq '.[-1]') url_to_source_attestation=$(echo $latest_never_alone_data | jq -r '.html_url') + pr_author_name=$(echo "${latest_never_alone_data}" | jq -r '.user_data.pullRequest.author.name') + review_decision=$(echo "${latest_never_alone_data}" | jq -r '.user_data.pullRequest.reviewDecision') + pr_url=$(echo "${latest_never_alone_data}" | jq -r '.user_data.pullRequest.url') + reviewers=$(echo "${latest_never_alone_data}" | jq -r '.user_data.pullRequest.reviews[0].author.name') set_never_alone_compliance "${latest_never_alone_data}" + if [ "${COMPLIANT_STATUS}" == "true" ]; then kosli attest generic \ --flow=${flow_name} \ @@ -211,7 +216,11 @@ function attest_commit_trail_never_alone --name="${commit_sha}" \ --commit=${commit_sha} \ --compliant="true" \ - --annotate="never_alone_data=${url_to_source_attestation}" + --annotate="never_alone_data=${url_to_source_attestation}" \ + --annotate="pr_author_name=${pr_author_name}" \ + --annotate="review_decision=${review_decision}" \ + --annotate="pull_request=${pr_url}" \ + --annotate="reviewers=${reviewers}" else kosli attest generic \ --flow=${flow_name} \ @@ -220,6 +229,10 @@ function attest_commit_trail_never_alone --commit=${commit_sha} \ --compliant="false" \ --annotate="never_alone_data=${url_to_source_attestation}" \ + --annotate="pr_author_name=${pr_author_name}" \ + --annotate="review_decision=${review_decision}" \ + --annotate="pull_request=${pr_url}" \ + --annotate="reviewers=${reviewers}" \ --annotate="reason_for_non_compliance=${REASON_FOR_NON_COMPLIANT}" fi fi