-
Notifications
You must be signed in to change notification settings - Fork 480
add project statistics information to projects api #192
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
Conversation
@gmessner any thoughts? |
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.
@jgoldhammer Thanks you for the contribution. Looks great, though I would ask that you remove the toString() methods, see comments in-line.
} | ||
|
||
@Override | ||
public String toString() { |
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.
Would prefer to not override toString(), as it would be inconsistent with the other model classes. If one would like to get a String representation of the instance, you can call the following, which will return formatted JSON String:
String json = org.gitlab4j.api.utils.JacksonJson.marshal(objectInstance);
public static final boolean isValid(Project project) { | ||
return (project != null && project.getId() != null); | ||
} | ||
|
||
@Override |
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.
Would prefer to not override toString(), as it would be inconsistent with the other model classes. If one would like to get a String representation of the instance, you can call the following, which will return formatted JSON String:
String json = org.gitlab4j.api.utils.JacksonJson.marshal(objectInstance);
Removed the toString method as suggested.
Removed toString method as suggested
I have updated my PR. I hope, it is ok now. Thanks |
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.
@jgoldhammer
Thanks for the quick changes. Approving and merging. Will do a release later today after I implement another feature.
Currently the projects api can be used to request project statistics from gitlab, but the response for the statistics is not recognized. This PR adds the information to the projects class.