We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b63356 commit 7f836efCopy full SHA for 7f836ef
.github/actions/get-github-workflow-approver/action.yml
@@ -53,9 +53,12 @@ runs:
53
--data-urlencode "per_page=${PER_PAGE}" \
54
--data-urlencode "page=${PAGE}" \
55
"$API_URL" > audit.json
56
-
+
57
MATCH_ENTRY=$(jq -r --arg run_id ${{ github.run_id }} '
58
- .[] | select(.workflow_run_id == ($run_id | tonumber))' audit.json)
+ [.[] | select(.workflow_run_id == ($run_id | tonumber))]
59
+ | sort_by(."@timestamp")
60
+ | last
61
+ ' audit.json)
62
63
if [[ -n "$MATCH_ENTRY" ]]; then
64
echo "Found matching approval:"
@@ -67,7 +70,6 @@ runs:
67
70
fi
68
71
done
69
72
73
if [[ -z "$APPROVER" ]]; then
74
echo "No approval found for workflow_run_id: $WORKFLOW_RUN_ID"
75
exit 1
0 commit comments