From 587438938ca077dfb4c510376e649c97988d703e Mon Sep 17 00:00:00 2001 From: Trevor Currie Date: Thu, 22 Feb 2018 09:38:25 -0800 Subject: [PATCH] Added release payload. --- .../org/kohsuke/github/GHEventPayload.java | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) 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. *