fix: align assigneeID format with hooked issue format (#946)
The polecat manager was using rig/name format while sling sets rig/polecats/name. This caused gt polecat status to show 'done' for working polecats because GetAssignedIssue couldn't find them. Fixes gt-oohy
This commit is contained in:
@@ -90,9 +90,9 @@ func NewManager(r *rig.Rig, g *git.Git, t *tmux.Tmux) *Manager {
|
||||
}
|
||||
|
||||
// assigneeID returns the beads assignee identifier for a polecat.
|
||||
// Format: "rig/polecatName" (e.g., "gastown/Toast")
|
||||
// Format: "rig/polecats/polecatName" (e.g., "gastown/polecats/Toast")
|
||||
func (m *Manager) assigneeID(name string) string {
|
||||
return fmt.Sprintf("%s/%s", m.rig.Name, name)
|
||||
return fmt.Sprintf("%s/polecats/%s", m.rig.Name, name)
|
||||
}
|
||||
|
||||
// agentBeadID returns the agent bead ID for a polecat.
|
||||
@@ -265,8 +265,8 @@ func (m *Manager) buildBranchName(name, issue string) string {
|
||||
|
||||
// {year} and {month}
|
||||
now := time.Now()
|
||||
vars["{year}"] = now.Format("06") // YY format
|
||||
vars["{month}"] = now.Format("01") // MM format
|
||||
vars["{year}"] = now.Format("06") // YY format
|
||||
vars["{month}"] = now.Format("01") // MM format
|
||||
|
||||
// {name}
|
||||
vars["{name}"] = name
|
||||
@@ -1108,13 +1108,13 @@ func (m *Manager) CleanupStaleBranches() (int, error) {
|
||||
|
||||
// StalenessInfo contains details about a polecat's staleness.
|
||||
type StalenessInfo struct {
|
||||
Name string
|
||||
CommitsBehind int // How many commits behind origin/main
|
||||
HasActiveSession bool // Whether tmux session is running
|
||||
HasUncommittedWork bool // Whether there's uncommitted or unpushed work
|
||||
AgentState string // From agent bead (empty if no bead)
|
||||
IsStale bool // Overall assessment: safe to clean up
|
||||
Reason string // Why it's considered stale (or not)
|
||||
Name string
|
||||
CommitsBehind int // How many commits behind origin/main
|
||||
HasActiveSession bool // Whether tmux session is running
|
||||
HasUncommittedWork bool // Whether there's uncommitted or unpushed work
|
||||
AgentState string // From agent bead (empty if no bead)
|
||||
IsStale bool // Overall assessment: safe to clean up
|
||||
Reason string // Why it's considered stale (or not)
|
||||
}
|
||||
|
||||
// DetectStalePolecats identifies polecats that are candidates for cleanup.
|
||||
|
||||
Reference in New Issue
Block a user