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:
aleiby
2026-01-20 19:31:26 -08:00
committed by GitHub
parent 7564cd5997
commit 4dd11d4ffa
2 changed files with 63 additions and 2 deletions
+2 -2
View File
@@ -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)
}
}