-
Notifications
You must be signed in to change notification settings - Fork 736
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
GHRepository.createCheckRun #753
Conversation
Do we also need another |
Yes, could be added as well. AFAICT it is not a top priority since “creating” a run with the same name as an existing one effectively overwrites it. |
src/main/java/org/kohsuke/github/GHCheckRunAnnotationLevel.java
Outdated
Show resolved
Hide resolved
…d does not improve API comprehension at all
} | ||
|
||
/** | ||
* Drafts an action section. |
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 links to the pertinent GitHub docs, such as https://developer.github.com/v3/checks/runs/#actions-object.
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.
There's a maximum of three actions allowed. But the GitHub docs do not make it clear what happens when actions are exceeded. We should at least mention the limit here.
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.
As elsewhere, I think it is pointless to even mention these sorts of limitations in Javadoc here, as the limits could be changed at any time and the code in this repository would become stale and misleading. (For example, some fields accept quite arbitrary-seeming lengths such as 20 characters.) It is the caller’s responsibility to follow GitHub’s current limits, and deal with whatever errors result if those are exceeded.
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.
(The exception being the 50 annotation limit, since that has a documented and tested solution—adding annotations in batches of 50 or less—which can be implemented in the library.)
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.
Coming along really well.
I suppose unrelated flake:
|
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're discussing the design of parts of the API.
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 also look into regenerating all WireMock data files to use the new filename convention.
BTW you need to revisit tests from #595, which have flaked twice in this PR’s builds. Deleting |
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.
Thanks, Jesse!
Description
Continues #723 & #740 to create a check run. Partially addresses #520.
I am leery of building this on top of #724, which I can barely understand but anyway does not feel appropriate here since for example a
GHCheckRun
is not a complete model object: it has anOutput
nested object with anannotationsCount
&annotationsUrl
but there is not currently any separate model for the actual annotation data. Some sort of builder pattern is needed, but I find the style used here (inspired byGHPullRequestReviewBuilder
) more intuitive and straightforward and it is clear what Java method actually corresponds to the REST call.Before submitting a PR:
master
. Create your PR from that branch.mvn -D enable-ci clean install site
locally. This may reformat your code, commit those changes. If this command doesn't succeed, your change will not pass CI.