From d5e93f4bb352f5bb829ccee1e3b11113e2fc885b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 12:33:04 +0000 Subject: [PATCH 1/4] Initial plan From 60ae871e94adb77dacd88aaf3fc45e4409bdbc76 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 12:38:46 +0000 Subject: [PATCH 2/4] ci: label integration PR when snapshot updates are present Agent-Logs-Url: https://github.com/rockcarver/frodo-cli/sessions/785c4a92-f59d-43b8-850f-044d533d3e97 Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com> --- .github/workflows/integration-batch.yml | 23 +++++++++++++++++++++++ docs/INTEGRATION.md | 1 + 2 files changed, 24 insertions(+) diff --git a/.github/workflows/integration-batch.yml b/.github/workflows/integration-batch.yml index eac45447d..fb00cc2c7 100644 --- a/.github/workflows/integration-batch.yml +++ b/.github/workflows/integration-batch.yml @@ -192,6 +192,7 @@ jobs: npm test - name: Create or update PR integration -> main + id: integration_pr if: ${{ steps.dryrun.outputs.dry_run != 'true' }} env: GH_TOKEN: ${{ github.token }} @@ -242,8 +243,30 @@ 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="$(gh pr list --repo "$REPO" --state open --head integration --base main --json number --jq '.[0].number // empty')" + fi + + if [ -z "$integration_pr_number" ]; then + echo "Failed to determine integration PR number" >&2 + exit 1 + fi + echo "number=$integration_pr_number" >> "$GITHUB_OUTPUT" + + - name: Label integration PR for snapshot review + if: ${{ steps.dryrun.outputs.dry_run != 'true' }} + env: + GH_TOKEN: ${{ github.token }} + REPO: ${{ github.repository }} + run: | + snapshot_updates='${{ steps.merge.outputs.snapshot_updates }}' + integration_pr_number='${{ steps.integration_pr.outputs.number }}' + snapshot_file_count="$(echo "$snapshot_updates" | jq '.files | length')" + + if [ "$snapshot_file_count" -gt 0 ]; then + gh pr edit "$integration_pr_number" --repo "$REPO" --add-label integration-needs-snapshot-review fi - name: Job summary diff --git a/docs/INTEGRATION.md b/docs/INTEGRATION.md index f15e4559a..1cd62181e 100644 --- a/docs/INTEGRATION.md +++ b/docs/INTEGRATION.md @@ -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`: applied to the generated `integration -> main` PR when snapshot auto-recovery updates snapshot files. ## Selection rules From c58071e9b0320c24d29993ad3ab60c78d333efb6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 12:41:47 +0000 Subject: [PATCH 3/4] ci: add snapshot-review label to generated integration PR Agent-Logs-Url: https://github.com/rockcarver/frodo-cli/sessions/785c4a92-f59d-43b8-850f-044d533d3e97 Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com> --- .github/workflows/integration-batch.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-batch.yml b/.github/workflows/integration-batch.yml index fb00cc2c7..dc3288fdb 100644 --- a/.github/workflows/integration-batch.yml +++ b/.github/workflows/integration-batch.yml @@ -245,8 +245,8 @@ jobs: 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="$(gh pr list --repo "$REPO" --state open --head integration --base main --json number --jq '.[0].number // empty')" + created_pr_url="$(gh pr create --repo "$REPO" --head integration --base main --title "integration" --body "$body")" + integration_pr_number="$(gh pr view "$created_pr_url" --repo "$REPO" --json number --jq '.number')" fi if [ -z "$integration_pr_number" ]; then @@ -263,7 +263,7 @@ jobs: run: | snapshot_updates='${{ steps.merge.outputs.snapshot_updates }}' integration_pr_number='${{ steps.integration_pr.outputs.number }}' - snapshot_file_count="$(echo "$snapshot_updates" | jq '.files | length')" + snapshot_file_count="$(echo "$snapshot_updates" | jq -r '(.files // []) | length' 2>/dev/null || echo 0)" if [ "$snapshot_file_count" -gt 0 ]; then gh pr edit "$integration_pr_number" --repo "$REPO" --add-label integration-needs-snapshot-review From 71b8ed1772e6b1a59df3af5c29c5906ffc8a2f70 Mon Sep 17 00:00:00 2001 From: Volker Scheuber Date: Mon, 20 Apr 2026 20:02:38 -0600 Subject: [PATCH 4/4] Update .github/workflows/integration-batch.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/integration-batch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-batch.yml b/.github/workflows/integration-batch.yml index dc3288fdb..8b6086a0b 100644 --- a/.github/workflows/integration-batch.yml +++ b/.github/workflows/integration-batch.yml @@ -266,7 +266,7 @@ jobs: snapshot_file_count="$(echo "$snapshot_updates" | jq -r '(.files // []) | length' 2>/dev/null || echo 0)" if [ "$snapshot_file_count" -gt 0 ]; then - gh pr edit "$integration_pr_number" --repo "$REPO" --add-label integration-needs-snapshot-review + gh pr edit "$integration_pr_number" --repo "$REPO" --add-label integration-needs-snapshot-review || true fi - name: Job summary