Skip to content
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

Added release payload. #417

Merged
merged 1 commit into from
Aug 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions src/main/java/org/kohsuke/github/GHEventPayload.java
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,48 @@ public List<String> getModified() {
}
}

/**
* A release was added to the repo
*
* @see <a href="http://developer.github.com/v3/activity/events/types/#releaseevent">authoritative source</a>
*/
@SuppressFBWarnings(value = {"UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", "NP_UNWRITTEN_FIELD" },
justification = "Constructed by JSON deserialization")
public static class Release extends GHEventPayload {
private String action;
private GHRelease release;
private GHRepository repository;

@SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "Comes from JSON deserialization")
public String getAction() {
return action;
}

public GHRelease getRelease() {
return release;
}

public void setRelease(GHRelease release) {
this.release = release;
}

public GHRepository getRepository() {
return repository;
}

public void setRepository(GHRepository repository) {
this.repository = repository;
}

@Override
void wrapUp(GitHub root) {
super.wrapUp(root);
if (repository != null) {
repository.wrap(root);
}
}
}

/**
* A repository was created, deleted, made public, or made private.
*
Expand Down