-
Notifications
You must be signed in to change notification settings - Fork 58
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
Issue-179 Implement last-modified API #180
Conversation
final Commit latestCommit, | ||
final List<Error> errors) { | ||
return new AutoValue_LastModifiedSummary(BitbucketUtils.nullToEmpty(errors), | ||
files, |
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 all use BitbucketUtils.nullToEmpty(files)
here as well.
import java.util.Map; | ||
|
||
@AutoValue | ||
public abstract class LastModifiedSummary implements ErrorsHolder { |
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 name to just LastModified
to match the endpoint being used. The name here isn't horrible, it's actually fine, I just like to try and match the returning object with the endpoint name if possible.
@adam-tylr couple minor nitpicky things to address but all-in-all the code is clean and there is not much to pick at. Good job and thanks. |
@cdancy I agree with both of those. I even had the nulltoEmpty(files) then talked myself out of it. |
@adam-tylr everything looks good on my end and thanks for the PR! I'm about to step out for a few hours but if you're looking for a point release with this change I can knock that out when I come back. Let me know. |
I just merged this PR but noticed there were a few more things I wanted to tackle. I can do them when I get back or if you're up for it have it but here they are:
|
I'll knock those out real quick. You don't need to create a release yet. I noticed the list-files api is only half implemented. You can't specify a path to list them at. I might tackle that this weekend if I have time. |
Another thought: I think i could probably write an HttpRequestFilter for this method that would allow us to combine both methods into a single version and if the path param is null we just scrub it from the request line. Thoughts? |
I think that makes sense. Especially since there are several endpoints all set up the same way. |
Note the API documentation reads as if the "at" query parameter is optional. It says it will use the default branch. However, when writing integration tests, I always got an
com.atlassian.bitbucket.validation.ArgumentValidationException
when I excluded it saying "Streaming modifications requires a starting commit." so I made it required.