Skip to content

Commit 0101855

Browse files
authored
Merge pull request #327 from githubnext/copilot/fix-gh-aw-upgrade
Fix gh-aw upgrade and unsigned PR branch pushes
2 parents 9362ea5 + 04af053 commit 0101855

6 files changed

Lines changed: 220 additions & 182 deletions

File tree

.github/aw/actions-lock.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,10 @@
55
"version": "v9.0.0",
66
"sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3"
77
},
8-
"github/gh-aw-actions/setup@v0.74.2": {
8+
"github/gh-aw-actions/setup@v0.74.4": {
99
"repo": "github/gh-aw-actions/setup",
10-
"version": "v0.74.2",
11-
"sha": "23453ecc01928d28ee1e773e403b216b29e89a5b"
12-
},
13-
"github/gh-aw/actions/setup@v0.74.2": {
14-
"repo": "github/gh-aw/actions/setup",
15-
"version": "v0.74.2",
16-
"sha": "59462bdec7dab53cd120a0931751e531c272636d"
10+
"version": "v0.74.4",
11+
"sha": "069305b523ecd7fbd05c5681a049b570b1fe6136"
1712
}
1813
}
1914
}

.github/workflows/autoloop.lock.yml

Lines changed: 76 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/autoloop.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ safe-outputs:
6363
recreate-ref: true
6464
max: 1
6565
push-to-pull-request-branch:
66+
signed-commits: false
6667
target: "*"
6768
title-prefix: "[Autoloop"
6869
protected-files:
@@ -447,10 +448,13 @@ Each run executes **one iteration for the single selected program**:
447448
elif [ "$ahead" != "0" ] && [ "$behind" != "0" ]; then
448449
# True divergence: branch has unique commits AND main has moved on.
449450
git checkout -B autoloop/{program-name} origin/autoloop/{program-name}
450-
git merge origin/main --no-edit -m "Merge main into autoloop/{program-name}"
451+
git rebase origin/main
452+
# If rebase conflicts occur, resolve them, run `git rebase --continue`,
453+
# and repeat until the rebase completes.
454+
git push --force-with-lease origin autoloop/{program-name}
451455
else
452456
# Already at main (ahead=0, behind=0) or only ahead of main (ahead>0,
453-
# behind=0). Nothing to merge — just check out the branch.
457+
# behind=0). Nothing to rebase — just check out the branch.
454458
git checkout -B autoloop/{program-name} origin/autoloop/{program-name}
455459
fi
456460
else
@@ -465,8 +469,8 @@ Each run executes **one iteration for the single selected program**:
465469
|---|---|---|---|
466470
| 0 | 0 | checkout (nothing to do) | branch is exactly at main |
467471
| 0 | >0 | **fast-forward + force-push** | branch's commits already in main; merging would produce noisy merge commit |
468-
| >0 | 0 | checkout (nothing to do) | unique work preserved; no upstream drift to merge |
469-
| >0 | >0 | checkout + merge | true divergence |
472+
| >0 | 0 | checkout (nothing to do) | unique work preserved; no upstream drift to rebase |
473+
| >0 | >0 | checkout + rebase + force-push | true divergence; preserves a linear branch |
470474

471475
Use `--force-with-lease` rather than `--force` so that if anyone else is simultaneously pushing to the branch, the update is rejected rather than overwriting their commits.
472476
2. Make the proposed changes to the target files only.
@@ -914,4 +918,3 @@ The `delta` is **signed by metric direction**: for `higher`-direction programs a
914918
915919
> **Do NOT modify files outside the program's Target list.**
916920
> The Target section of the program file is the allowlist. Touching anything else (including the evaluation script or the program file itself) is forbidden.
917-

0 commit comments

Comments
 (0)