From 7c4fc5de0c5abc85be7bdb699cccec5da524b042 Mon Sep 17 00:00:00 2001 From: Vidya Sagar VOBBILISETTI Date: Thu, 14 May 2026 11:10:53 +0200 Subject: [PATCH] Normalize gitlabs opened and open states in issues and milestones just like in prs --- gitlab/issues.go | 7 ++++++- gitlab/milestones.go | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gitlab/issues.go b/gitlab/issues.go index 503a93f..92481ff 100644 --- a/gitlab/issues.go +++ b/gitlab/issues.go @@ -131,7 +131,12 @@ func (s *gitLabIssueService) List(ctx context.Context, owner, repo string, opts } if opts.State != "" && opts.State != stateAll { - glOpts.State = gitlab.Ptr(opts.State) + // GitLab uses "opened" not "open" + state := opts.State + if state == stateOpen { + state = stateOpened + } + glOpts.State = gitlab.Ptr(state) } if opts.Assignee != "" { glOpts.AssigneeUsername = gitlab.Ptr(opts.Assignee) diff --git a/gitlab/milestones.go b/gitlab/milestones.go index b27ca3c..c19b6fa 100644 --- a/gitlab/milestones.go +++ b/gitlab/milestones.go @@ -51,7 +51,12 @@ func (s *gitLabMilestoneService) List(ctx context.Context, owner, repo string, o } if opts.State != "" && opts.State != stateAll { - glOpts.State = gitlab.Ptr(opts.State) + // GitLab uses "opened" not "open" + state := opts.State + if state == stateOpen { + state = stateOpened + } + glOpts.State = gitlab.Ptr(state) } var all []forge.Milestone