Improve GH action update-pr log messages (#860)

pull/862/head
Yuri Astrakhan 2020-05-07 17:20:06 -04:00 zatwierdzone przez GitHub
rodzic 632a33ed05
commit dd3cb077a2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -149,7 +149,7 @@ jobs:
# If the most recent run did not succeed, or if the run is too old, ignore it # If the most recent run did not succeed, or if the run is too old, ignore it
| select(.success and (now - (.updated_at|fromdate)) / 60 < ($IGNORE_RUNS_OLDER_THAN | tonumber)) | select(.success and (now - (.updated_at|fromdate)) / 60 < ($IGNORE_RUNS_OLDER_THAN | tonumber))
# Keep just the pull request number mapping to run ID # Keep just the pull request number mapping to run ID
| [ .pr_number, .id, .key ] | { pr_number, id, key }
) )
' <( echo "$WORKFLOW_PR_RUNS" ) <( echo "$PULL_REQUESTS" ) )" ' <( echo "$WORKFLOW_PR_RUNS" ) <( echo "$PULL_REQUESTS" ) )"
@ -161,12 +161,13 @@ jobs:
exit exit
else else
echo "$JOBS_COUNT '$WORKFLOW_NAME' jobs have been updated in the last $IGNORE_RUNS_OLDER_THAN minutes" echo "$JOBS_COUNT '$WORKFLOW_NAME' jobs have been updated in the last $IGNORE_RUNS_OLDER_THAN minutes"
echo "$PR_JOB_MAP" | jq -r '.[] | " * PR #\(.pr_number) Job #\(.id) -- \(.key) "'
fi fi
# #
# Iterate over the found pairs of PR number + run ID, and update them all # Iterate over the found pairs of PR number + run ID, and update them all
# #
echo "$PR_JOB_MAP" | jq -r '.[] | @sh' | \ echo "$PR_JOB_MAP" | jq -r '.[] | [ .pr_number, .id, .key ] | @sh' | \
while read -r PR_NUMBER RUN_ID RUN_KEY; do while read -r PR_NUMBER RUN_ID RUN_KEY; do
echo "Processing '$WORKFLOW_NAME' run #$RUN_ID for pull request #$PR_NUMBER $RUN_KEY..." echo "Processing '$WORKFLOW_NAME' run #$RUN_ID for pull request #$PR_NUMBER $RUN_KEY..."