feat(feature_flags): support gitlabUserList and strategy removal

What does this MR do?

Adds two fields the GitLab Feature Flags API already supports but that FeatureFlagStrategyOptions didn't expose:

  • UserListID *int64 (user_list_id) — binds a strategy to a gitlabUserList user list.
  • Destroy *bool (_destroy) — Rails-style nested-attributes flag to remove a strategy on update.

Also adds a UserList *FeatureFlagUserList field to the response type ProjectFeatureFlagStrategy, populated by the API's user_list response field when a strategy uses gitlabUserList.

Precedent for the _destroy pattern already exists in this codebase (protected_environments.go, group_protected_environments.go, protected_branches.go, group_protected_branches.go), so this follows the same *bool + `url:"_destroy,omitempty" json:"_destroy,omitempty"` shape.

Why?

This came up while implementing gitlab_project_feature_flag in terraform-provider-gitlab (see !3209). Without these fields, the Terraform resource had to reject the gitlabUserList strategy entirely and make the whole strategies attribute RequiresReplace (destroying and recreating the flag for any strategy change), since there was no way to remove a single strategy or bind a user list through the client. This unblocks a proper, non-destructive implementation there.

References

Testing

  • go build ./...
  • go test ./... -race
  • mise exec -- make fmt (no diff)
  • mise exec -- golangci-lint run ./... (0 issues)
  • Added TestUpdateProjectFeatureFlag_gitlabUserListAndDestroy, which asserts the outgoing JSON request body shape and the decoded response (including the new UserList field).

Merge request reports

Loading