1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-08 01:19:59 +02:00

Refactor remove-failed-jobs.sh for improved readability and formatting

This commit is contained in:
mr. M 2025-01-12 16:37:27 +01:00
parent 040a8fad5b
commit 838569e386
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB

View file

@ -11,8 +11,8 @@ gh_bulk_delete_workflow_runs() {
# Fetch workflow runs that are cancelled, failed, or timed out # Fetch workflow runs that are cancelled, failed, or timed out
local runs local runs
runs=$(gh api repos/$repo/actions/runs --paginate | runs=$(gh api repos/$repo/actions/runs --paginate \
jq -r '.workflow_runs[] | | jq -r '.workflow_runs[] |
select(.conclusion == "cancelled" or select(.conclusion == "cancelled" or
.conclusion == "failure" or .conclusion == "failure" or
.conclusion == "timed_out") | .conclusion == "timed_out") |
@ -26,7 +26,7 @@ gh_bulk_delete_workflow_runs() {
# Loop through each run and delete it # Loop through each run and delete it
while IFS= read -r run; do while IFS= read -r run; do
echo "Attempting to delete run: https://github.com/$repo/actions/runs/$run" echo "Attempting to delete run: https://github.com/$repo/actions/runs/$run"
# Perform the deletion # Perform the deletion
if gh api -X DELETE repos/$repo/actions/runs/$run --silent; then if gh api -X DELETE repos/$repo/actions/runs/$run --silent; then
echo "Successfully deleted run: $run" echo "Successfully deleted run: $run"