feat(cloud): add UserService.GetAllUsers(ctx,options) wrapper for full user enumeration#736
Open
ATMackay wants to merge 3 commits intoandygrunwald:mainfrom
Open
feat(cloud): add UserService.GetAllUsers(ctx,options) wrapper for full user enumeration#736ATMackay wants to merge 3 commits intoandygrunwald:mainfrom
UserService.GetAllUsers(ctx,options) wrapper for full user enumeration#736ATMackay wants to merge 3 commits intoandygrunwald:mainfrom
Conversation
| // GetAllUsers returns a list of all users, including active users, inactive users and previously deleted users that have an Atlassian account. | ||
| // | ||
| // JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-users-get | ||
| func (s *UserService) GetAllUsers(ctx context.Context) ([]User, *Response, error) { |
Owner
There was a problem hiding this comment.
In the Jira docs, it looks like that this function can accept startAt and maxResults as input parameters. What do you think about adding this capability here as well?
Otherwise, adding those later would be a breaking change.
UserService.GetAllUsers(ctx) wrapper for full user enumerationUserService.GetAllUsers(ctx,options) wrapper for full user enumeration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What this PR does / why we need it:
Jira exposes get all users endpoints distinct from user search. Search endpoints are better for interactive/fuzzy lookup and have different behavior/limits. Adding a distinct
GetAllUsersavoids mixing search semantics with full user enumeration.Which issue(s) this PR fixes:
No issue, I am currently using go-jira with custom wrappers and thought this would be useful.
Special notes for your reviewer:
Great project, keep up the good work!