-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Labels API #131
feat: Labels API #131
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.
I don't understand the reason why a pointer to a slice is returned in GetLabels and Find methods, is there a need to modify the returned data?
api/examples_test.go
Outdated
|
||
labelName := "Active State" | ||
props := map[string]string{"color": "33ffdd", "description": "Marks org active"} | ||
label, err := labelsApi.CreateLabelWithName(ctx, *myorg.Id, labelName, props) |
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.
you could use myorg.Id
, it looks better
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.
However, API with string pointers as params is weird as well, it isn't?
But, CreateLabelWithName
should be with objects, ids should be used in CreateLabelWithNameWithId
. This is consistent with other *Apis., thanks for noticing this.
It is simply the same type as returned from the generated API, without the necessity to create an empty slice just in case of an error. It is similar pattern as in all other *Apis. |
Closes #130
Added support for managing labels in general and managing labels in organization