Skip to content

Commit

Permalink
never alone more info (#323)
Browse files Browse the repository at this point in the history
* Added some more annotations

* Removed extra annotation on daily job

* Send pr autor name since that is what we use
  • Loading branch information
ToreMerkely authored Sep 20, 2024
1 parent 85743be commit 6f248f6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion bin/never_alone/create_never_alone_trail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,24 @@ 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} \
--trail=${trail_name} \
--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} \
Expand All @@ -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
Expand Down

0 comments on commit 6f248f6

Please sign in to comment.