Skip to content

Commit dcb357a

Browse files
committed
datasource/gitlab_project_issues: Fix not_milestone to be simple string instead of list of strings
1 parent 155e585 commit dcb357a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

docs/data-sources/project_issues.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ data "gitlab_project_issues" "all_with_foo" {
5050
- `not_assignee_id` (List of Number) Return issues that do not match the assignee id.
5151
- `not_author_id` (List of Number) Return issues that do not match the author id.
5252
- `not_labels` (List of String) Return issues that do not match the labels.
53-
- `not_milestone` (List of String) Return issues that do not match the milestone.
53+
- `not_milestone` (String) Return issues that do not match the milestone.
5454
- `not_my_reaction_emoji` (List of String) Return issues not reacted by the authenticated user by the given emoji.
5555
- `order_by` (String) Return issues ordered by. Valid values are `created_at`, `updated_at`, `priority`, `due_date`, `relative_position`, `label_priority`, `milestone_due`, `popularity`, `weight`. Default is created_at
5656
- `scope` (String) Return issues for the given scope. Valid values are `created_by_me`, `assigned_to_me`, `all`. Defaults to all.

internal/provider/data_source_gitlab_project_issues.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ var _ = registerDataSource("gitlab_project_issues", func() *schema.Resource {
137137
},
138138
"not_milestone": {
139139
Description: "Return issues that do not match the milestone.",
140-
Type: schema.TypeList,
141-
Elem: &schema.Schema{Type: schema.TypeString},
140+
Type: schema.TypeString,
142141
Optional: true,
143142
},
144143
"my_reaction_emoji": {
@@ -251,7 +250,7 @@ func dataSourceGitlabProjectIssuesRead(ctx context.Context, d *schema.ResourceDa
251250
}
252251

253252
if v, ok := d.GetOk("not_milestone"); ok {
254-
options.NotMilestone = stringSetToStringSlice(v.(*schema.Set))
253+
options.NotMilestone = gitlab.String(v.(string))
255254
}
256255

257256
if v, ok := d.GetOk("scope"); ok {

0 commit comments

Comments
 (0)