-
Notifications
You must be signed in to change notification settings - Fork 58
CreateUser, DeleteUser and AddParticipant endpoints #145
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
CreateUser, DeleteUser and AddParticipant endpoints #145
Conversation
77b8948
to
fc7d2ff
Compare
return new AutoValue_DetailedUser(BitbucketUtils.nullToEmpty(errors), name, emailAddress, id, displayName, | ||
active, slug, type, directoryName, deletable, lastAuthenticationTimestamp, mutableDetails, mutableGroups); | ||
} | ||
} |
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.
Lets move the changes here into the User
domain object instead of creating something new.
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.
But what about the errors? I mean, there was instruction somewhere that domain objects that are used to create request can't be an error holders.
@Fallback(BitbucketFallbacks.RequestStatusOnError.class) | ||
@ResponseParser(RequestStatusParser.class) | ||
@POST | ||
RequestStatus postUser(@QueryParam("name") String name, |
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.
Lets change the method name to createUser
.
@Path("/{project}/repos/{repo}/pull-requests/{pullRequestId}/participants/{userSlug}") | ||
@Fallback(ParticipantsOnError.class) | ||
@PUT | ||
Participants putParticipant(@PathParam("project") String project, |
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.
Lets change the method name to addParticipant
.
A few comments on changing the names of things. Basically all methods named "put" replace with "add" and methods named "post" replace with "create". Make sure to update tests as well. Other than that the PR is in pretty good shape. |
And make sure to merge the Feel free to give the project a star/like as well :) |
78a68fa
to
03ed76a
Compare
When I run |
03ed76a
to
1ebeeb1
Compare
For issue #144.
It's adding three endpoints - PUT for PR participant (main goal of PR) and two endpoints for admin api (POST and DELETE user) which are needed for participant PUT integ tests.