diff --git a/src/main/java/org/kohsuke/github/GHEventPayload.java b/src/main/java/org/kohsuke/github/GHEventPayload.java index b01b32e432..6c72764f4b 100644 --- a/src/main/java/org/kohsuke/github/GHEventPayload.java +++ b/src/main/java/org/kohsuke/github/GHEventPayload.java @@ -716,6 +716,48 @@ public List getModified() { } } + /** + * A release was added to the repo + * + * @see authoritative source + */ + @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. *