-
Notifications
You must be signed in to change notification settings - Fork 97
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good to me, but spotted nits.
Co-authored-by: Arve Knudsen <[email protected]>
@aknuds1 - thanks for the feedback. Suggestions incorporated. It's worth noting that most of the things you mentioned were done that way just for consistency sake with the org. I used that file as a template for the changes. We may want to enter a new issue to clean up the other files so the coding style is consistent everywhere in the new fork. Thanks again! |
@jonathan-dorsey Gotcha, I think it would be best to enable style linting, but that requires more work. I suggest we do that through a dedicated PR. |
I think @marefr wants to have a look, but will be busy until the end of the week. |
Actually no, this is good to go. |
Thanks! |
This pull request updates the Team code to return the computed id value for newly created teams. This is necessary in support of adding team resource functionality in the terraform provider. See grafana/terraform-provider-grafana#120
Also updated the test to use and validate the newly returned id value. While there, modified the Team code to use a value instead of a pointer. This is more consistent with some of the similar code in org, alert, user...
NOTE: A better approach to these methods may be to accept an instance of Team that contains all the values for creating a new team object. Then a fully populated Team instance could be returned. This would work around the need to continually add parameters (and maybe return values for computed fields) as fields are added to the Team object in Grafana. Though I think this is likely a better long-term approach, I instead followed the patterns set out in other resources for consistency sake.