Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/update-pr-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ permissions:
contents: write
pull-requests: write

# Serialize runs per PR: the push that finishes a conflict resolution fires a
# synchronize event while the conflict label is still attached, so without a
# group the follow-up run races the one that triggered it.
concurrency:
group: update-pr-stack-${{ github.event.pull_request.number }}
cancel-in-progress: false

jobs:
update-pr-stack:
runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ on:
pull_request:
types: [closed, synchronize]

concurrency:
group: update-pr-stack-${{ github.event.pull_request.number }}
cancel-in-progress: false

jobs:
update-pr-stack:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -110,6 +114,10 @@ permissions:
contents: write
pull-requests: write

concurrency:
group: update-pr-stack-${{ github.event.pull_request.number }}
cancel-in-progress: false

jobs:
update-pr-stack:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions tests/test_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ wait_for_synchronize_workflow() {
log_cmd gh run view "$target_run_id" --repo "$REPO_FULL_NAME" --log || echo >&2 "Could not fetch logs for run $target_run_id"
return 1
fi
elif [[ "$run_status" == "queued" || "$run_status" == "in_progress" || "$run_status" == "waiting" ]]; then
elif [[ "$run_status" == "queued" || "$run_status" == "in_progress" || "$run_status" == "waiting" || "$run_status" == "pending" ]]; then
echo >&2 "Workflow $target_run_id is $run_status. Sleeping $sleep_time seconds."
else
echo >&2 "Workflow $target_run_id has unexpected status: $run_status. Conclusion: $run_conclusion"
Expand Down Expand Up @@ -665,7 +665,7 @@ wait_for_workflow() {
log_cmd gh run view "$target_run_id" --repo "$REPO_FULL_NAME" --log || echo >&2 "Could not fetch logs for run $target_run_id"
return 1
fi
elif [[ "$run_status" == "queued" || "$run_status" == "in_progress" || "$run_status" == "waiting" ]]; then
elif [[ "$run_status" == "queued" || "$run_status" == "in_progress" || "$run_status" == "waiting" || "$run_status" == "pending" ]]; then
echo >&2 "Workflow $target_run_id is $run_status. Sleeping $sleep_time seconds."
else
echo >&2 "Workflow $target_run_id has unexpected status: $run_status. Conclusion: $run_conclusion"
Expand Down
Loading