-
Notifications
You must be signed in to change notification settings - Fork 731
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
[JENKINS-57430] Added some new GH Event Types #622
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b2701f5
[JENKINS-57430] Added some new GH Event Types
8f787e9
Added the Check Run event
bc8f0aa
Update GHEventPayload.java
a80b5b6
Fixed the findbugs errors
4f67f32
Update src/main/java/org/kohsuke/github/GHCheckRun.java
alexanderrtaylor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package org.kohsuke.github; | ||
|
||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; | ||
|
||
import java.io.IOException; | ||
import java.net.URL; | ||
|
||
/** | ||
* Represents a deployment | ||
* | ||
* @see <a href="https://developer.github.com/v3/checks/runs/">documentation</a> | ||
*/ | ||
|
||
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD", "URF_UNREAD_FIELD" }, | ||
justification = "JSON API") | ||
public class GHCheckRun extends GHObject { | ||
GHRepository owner; | ||
GitHub root; | ||
|
||
private String status; | ||
private String conclusion; | ||
private String name; | ||
private GHPullRequest[] pullRequests; | ||
|
||
GHCheckRun wrap(GHRepository owner) { | ||
this.owner = owner; | ||
this.root = owner.root; | ||
return this; | ||
} | ||
|
||
GHCheckRun wrap(GitHub root) { | ||
this.root = root; | ||
if (owner != null) { | ||
owner.wrap(root); | ||
} | ||
return this; | ||
} | ||
|
||
GHPullRequest[] wrap() { | ||
return pullRequests; | ||
} | ||
|
||
public String getStatus() { | ||
return status; | ||
} | ||
|
||
public String getConclusion() { | ||
return conclusion; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
GHPullRequest[] getPullRequests() throws IOException { | ||
if (pullRequests != null && pullRequests.length != 0) { | ||
for (GHPullRequest singlePull : pullRequests) { | ||
singlePull.refresh(); | ||
} | ||
} | ||
return pullRequests; | ||
} | ||
|
||
/** | ||
* @deprecated This object has no HTML URL. | ||
*/ | ||
@Override | ||
public URL getHtmlUrl() { | ||
return null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package org.kohsuke.github; | ||
|
||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; | ||
|
||
import java.net.URL; | ||
|
||
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD", "URF_UNREAD_FIELD" }, | ||
justification = "JSON API") | ||
public class GHRequestedAction extends GHObject { | ||
private GHRepository owner; | ||
private GitHub root; | ||
private String identifier; | ||
private String label; | ||
private String description; | ||
|
||
GHRequestedAction wrap(GHRepository owner) { | ||
this.owner = owner; | ||
wrap(owner.root); | ||
return this; | ||
} | ||
GHRequestedAction wrap(GitHub root) { | ||
this.root = root; | ||
if (owner != null) { | ||
owner.wrap(root); | ||
} | ||
return this; | ||
} | ||
|
||
String getIdentifier() { | ||
return identifier; | ||
} | ||
|
||
String getLabel() { | ||
return label; | ||
} | ||
|
||
String getDescription() { | ||
return description; | ||
} | ||
|
||
/** | ||
* @deprecated This object has no HTML URL. | ||
*/ | ||
@Override | ||
public URL getHtmlUrl() { | ||
return null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@nonnull