fix(mq): use label instead of issue_type for merge-request filtering (#831)
The mq list --ready command was filtering by issue.Type == "merge-request", but beads created by `gt done` have issue_type='task' (the default) with a gt:merge-request label. This caused ready MRs to be filtered out. Changed to use beads.HasLabel() which checks the label, completing the migration from the deprecated issue_type field to labels. Added TestMRFilteringByLabel to verify the fix handles the bug scenario. Fixes #816 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,9 +48,9 @@ func runMQList(cmd *cobra.Command, args []string) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("querying ready MRs: %w", err)
|
||||
}
|
||||
// Filter to only merge-request type
|
||||
// Filter to only merge-request label (issue_type field is deprecated)
|
||||
for _, issue := range allReady {
|
||||
if issue.Type == "merge-request" {
|
||||
if beads.HasLabel(issue, "gt:merge-request") {
|
||||
issues = append(issues, issue)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user