fix(refinery): use rig's default_branch instead of hardcoded 'main'
- Add DefaultBranch field to RoleData struct
- Update refinery.md.tmpl to use {{ .DefaultBranch }} template variable
- Populate DefaultBranch from rig config in prime.go and rig/manager.go
- Default to 'main' if not configured
- Add test verifying DefaultBranch rendering in refinery template
Fixes issue where refinery agents merged to master instead of the
configured default branch (e.g., 'develop' or 'develop-cstar').
This commit is contained in:
@@ -109,7 +109,7 @@ not by Go code. This follows the Zero Friction Control (ZFC) principle.
|
||||
**Example: Handling a Conflict**
|
||||
```bash
|
||||
git checkout -b temp origin/polecat/rictus-12345
|
||||
git rebase origin/main
|
||||
git rebase origin/{{ .DefaultBranch }}
|
||||
# If conflict:
|
||||
git status # See what conflicted
|
||||
# DECISION: Can I resolve it? Is it trivial?
|
||||
@@ -226,7 +226,7 @@ If queue empty, skip to context-check step.
|
||||
**process-branch**: Pick next branch, rebase on main
|
||||
```bash
|
||||
git checkout -b temp origin/polecat/<worker>
|
||||
git rebase origin/main
|
||||
git rebase origin/{{ .DefaultBranch }}
|
||||
```
|
||||
If conflicts unresolvable: notify polecat, skip to loop-check.
|
||||
|
||||
@@ -251,9 +251,9 @@ GATE: Cannot proceed to merge without fix OR bead filed
|
||||
|
||||
**merge-push**: Merge to main and push immediately
|
||||
```bash
|
||||
git checkout main
|
||||
git checkout {{ .DefaultBranch }}
|
||||
git merge --ff-only temp
|
||||
git push origin main
|
||||
git push origin {{ .DefaultBranch }}
|
||||
git branch -d temp
|
||||
git push origin --delete polecat/<worker>
|
||||
```
|
||||
@@ -340,8 +340,8 @@ gt mail send {{ .RigName }}/<worker> -s "Rebase needed" \
|
||||
|
||||
### Git Operations
|
||||
- `git fetch origin` - Fetch all remote branches
|
||||
- `git rebase origin/main` - Rebase on current main
|
||||
- `git push origin main` - Push merged changes
|
||||
- `git rebase origin/{{ .DefaultBranch }}` - Rebase on current main
|
||||
- `git push origin {{ .DefaultBranch }}` - Push merged changes
|
||||
|
||||
**IMPORTANT**: The merge queue source of truth is `gt mq list {{ .RigName }}`, NOT git branches.
|
||||
Do NOT use `git branch -r | grep polecat` or `git ls-remote | grep polecat` to check for work.
|
||||
|
||||
Reference in New Issue
Block a user