Skip to content
Closed
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
18 changes: 18 additions & 0 deletions .github/workflows/integration-batch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,26 @@ jobs:
existing="$(gh pr list --repo "$REPO" --state open --head integration --base main --json number --jq '.[0].number // empty')"
if [ -n "$existing" ]; then
gh pr edit "$existing" --repo "$REPO" --title "integration" --body "$body"
integration_pr_number="$existing"
else
gh pr create --repo "$REPO" --head integration --base main --title "integration" --body "$body"
integration_pr_number=""
max_attempts=5
for _ in $(seq 1 "$max_attempts"); do
integration_pr_number="$(gh pr list --repo "$REPO" --state open --head integration --base main --json number --jq '.[0].number // empty')"
if [[ "$integration_pr_number" =~ ^[0-9]+$ ]]; then
break
fi
sleep 2
done
if ! [[ "$integration_pr_number" =~ ^[0-9]+$ ]]; then
echo "Unable to resolve integration PR number after $max_attempts retry attempts" >&2
exit 1
fi
fi

if echo "$snapshot_updates" | jq -e '.files | length > 0' >/dev/null; then
gh pr edit "$integration_pr_number" --repo "$REPO" --add-label integration-needs-snapshot-review
fi

- name: Job summary
Expand Down
1 change: 1 addition & 0 deletions docs/INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The [`integration-batch` workflow](../.github/workflows/integration-batch.yml) a
- `integration-batch`: PR is queued for integration batching.
- `integrated`: PR was successfully merged into the `integration` branch by automation.
- `integration-failed`: automation attempted integration but hit a merge conflict.
- `integration-needs-snapshot-review`: generated `integration -> main` PR where snapshot auto-recovery updated snapshot files.

## Selection rules

Expand Down