fix(mq): skip closed MRs in list, next, and ready views (#563)
* fix(mq): skip closed MRs in list, next, and ready views (gt-qtb3w) The gt mq list command with --status=open filter was incorrectly displaying CLOSED merge requests as 'ready'. This occurred because bd list --status=open was returning closed issues. Added manual status filtering in three locations: - mq_list.go: Filter closed MRs in all list views - mq_next.go: Skip closed MRs when finding next ready MR - engineer.go: Skip closed MRs in refinery's ready queue Also fixed build error in mail_queue.go where QueueConfig struct (non-pointer) was being compared to nil. Workaround for upstream bd list status filter bug. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * style: fix gofmt issue in engineer.go comment block Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -630,11 +630,12 @@ func (e *Engineer) HandleMRInfoFailure(mr *MRInfo, result ProcessResult) {
|
||||
// Returns the created task's ID for blocking the MR until resolution.
|
||||
//
|
||||
// Task format:
|
||||
// Title: Resolve merge conflicts: <original-issue-title>
|
||||
// Type: task
|
||||
// Priority: inherit from original + boost (P2 -> P1)
|
||||
// Parent: original MR bead
|
||||
// Description: metadata including branch, conflict SHA, etc.
|
||||
//
|
||||
// Title: Resolve merge conflicts: <original-issue-title>
|
||||
// Type: task
|
||||
// Priority: inherit from original + boost (P2 -> P1)
|
||||
// Parent: original MR bead
|
||||
// Description: metadata including branch, conflict SHA, etc.
|
||||
//
|
||||
// Merge Slot Integration:
|
||||
// Before creating a conflict resolution task, we acquire the merge-slot for this rig.
|
||||
@@ -768,6 +769,11 @@ func (e *Engineer) ListReadyMRs() ([]*MRInfo, error) {
|
||||
// Convert beads issues to MRInfo
|
||||
var mrs []*MRInfo
|
||||
for _, issue := range issues {
|
||||
// Skip closed MRs (workaround for bd list not respecting --status filter)
|
||||
if issue.Status != "open" {
|
||||
continue
|
||||
}
|
||||
|
||||
fields := beads.ParseMRFields(issue)
|
||||
if fields == nil {
|
||||
continue // Skip issues without MR fields
|
||||
|
||||
Reference in New Issue
Block a user