fix: use correct issue_tag_ids field for issue create --label

The GitLink v1 API expects issue_tag_ids (array of integers), not label_id.
This fixes the bug where --label was silently ignored when creating issues.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
15972095207 2026-06-04 08:50:37 +08:00
parent 2760c47115
commit 7f53548244
1 changed files with 4 additions and 1 deletions

View File

@ -83,7 +83,10 @@ func Shortcuts() []*common.Shortcut {
body["fixed_version_id"] = m
}
if l := ctx.Arg("label"); l != "" {
body["label_id"] = l
body["issue_tag_ids"] = []int{func() int {
id, _ := strconv.Atoi(l)
return id
}()}
}
env, err := ctx.CallAPI("POST", v1RepoPath(ctx)+"/issues", body)
if err != nil {