Skip to content

Commit

Permalink
added setPayload to CommitCommentEvent and CreateEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Jan 21, 2015
1 parent 1b00c37 commit d6662d1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
import com.skiwi.githubhooksechatservice.events.github.classes.CommitComment;
import com.skiwi.githubhooksechatservice.events.github.classes.User;

/**
*
* @author Frank van Heeswijk
*/
@JsonTypeInfo(use = Id.NAME, defaultImpl = CommitCommentEvent.class)
public final class CommitCommentEvent extends GithubEvent {
@JsonProperty
private CommitComment comment;
Expand Down Expand Up @@ -59,4 +62,9 @@ public boolean equals(final Object obj) {
}
return true;
}

public void setPayload(CommitCommentEvent event) {
this.comment = event.comment;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
import com.skiwi.githubhooksechatservice.events.github.classes.User;

/**
*
* @author Frank van Heeswijk
*/
@JsonTypeInfo(use = Id.NAME, defaultImpl = CreateEvent.class)
public final class CreateEvent extends GithubEvent {
@JsonProperty
private String ref;
Expand Down Expand Up @@ -102,4 +105,13 @@ public boolean equals(final Object obj) {
}
return true;
}

public void setPayload(CreateEvent event) {
this.description = event.description;
this.masterBranch = event.masterBranch;
this.pusherType = event.pusherType;
this.ref = event.ref;
this.refType = event.refType;
}

}

0 comments on commit d6662d1

Please sign in to comment.