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: add a github client #2747
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.
Would you add brief Javadoc for future maintainers?
<version>3.2.5</version> | ||
<configuration> | ||
<environmentVariables> | ||
<GITHUB_TOKEN>fake_value</GITHUB_TOKEN> |
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.
Add source code comment how it helps tests.
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.
Done.
import java.util.List; | ||
import java.util.Objects; | ||
|
||
public class GitHubClient { |
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.
Can you add Javadoc?
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.
Done.
@@ -29,7 +29,7 @@ | |||
public class DepsDevClient { |
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.
Can you add Javadoc?
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.
Done.
@@ -0,0 +1,5 @@ | |||
package com.google.cloud.model; | |||
|
|||
public record PullRequestStatus(long created, long merged, Interval interval) { |
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.
Can you add Javadoc, especially which part of the dependency report this helps, with an example value.
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.
We can change the class name to PullRequestStatistics
.
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.
Done.
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.
Can you run the google-java-format formatter?
git diff -U0 origin/main |google-java-format-diff.py -p1 -i
The formatter does not merge multiple lines. Ensure you read the formatted files.
* GitHubClient is a class that sends HTTP requests to the GitHub RESTful API. | ||
* It provides methods for interacting with various GitHub resources such as repositories, | ||
* issues, users, etc. | ||
* <p> |
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.
New line before <p>
. No new line after <p>
. https://google.github.io/styleguide/javaguide.html#s7.1.2-javadoc-paragraphs
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 formatted the code using
git diff -U0 origin/main | python google-java-format-diff.py -p1 -i
Quality Gate passed for 'gapic-generator-java-root'Issues Measures |
Quality Gate passed for 'java_showcase_integration_tests'Issues Measures |
In this PR: - Add a github client to retrieve pull request status from a repository. - Add unit test.
In this PR: - Add a github client to retrieve pull request status from a repository. - Add unit test.
In this PR: