commit
f8da78cbf5
|
@ -14,6 +14,7 @@ public abstract class WebHook {
|
|||
private String objectKind;
|
||||
private String hookName;
|
||||
private String jsonBody;
|
||||
private User sender;
|
||||
|
||||
public String getJsonBody() { return this.jsonBody; }
|
||||
|
||||
|
@ -43,6 +44,14 @@ public abstract class WebHook {
|
|||
this.repository = repository;
|
||||
}
|
||||
|
||||
public User getSender() {
|
||||
return sender;
|
||||
}
|
||||
|
||||
public void setSender(User sender) {
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
public String getWebHookDescription() {
|
||||
return hookName;
|
||||
}
|
||||
|
@ -60,6 +69,7 @@ public abstract class WebHook {
|
|||
.append(repository, webHook.repository)
|
||||
.append(objectKind, webHook.objectKind)
|
||||
.append(hookName, webHook.hookName)
|
||||
.append(sender, webHook.sender)
|
||||
.isEquals();
|
||||
}
|
||||
|
||||
|
@ -69,6 +79,7 @@ public abstract class WebHook {
|
|||
.append(repository)
|
||||
.append(hookName)
|
||||
.append(objectKind)
|
||||
.append(sender)
|
||||
.toHashCode();
|
||||
}
|
||||
|
||||
|
@ -78,6 +89,7 @@ public abstract class WebHook {
|
|||
.append("repository", repository)
|
||||
.append("hookName", hookName)
|
||||
.append("objectKind", objectKind)
|
||||
.append("sender", sender)
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ class NoteHookTriggerHandlerImpl extends AbstractWebHookTriggerHandler<NoteHook>
|
|||
.withTargetNamespace(hook.getProject().getNamespace())
|
||||
.withTargetRepoSshUrl(hook.getProject().getSshUrl())
|
||||
.withTargetRepoHttpUrl(hook.getProject().getGitHttpUrl())
|
||||
.withTriggeredByUser(hook.getComment().getUser().getName())
|
||||
.withTriggeredByUser(hook.getSender().getName())
|
||||
.withTriggerPhrase(hook.getComment().getBody())
|
||||
.withSha(hook.getComment().getCommitId())
|
||||
.withPathWithNamespace(hook.getProject().getPathWithNamespace())
|
||||
|
@ -201,7 +201,7 @@ class NoteHookTriggerHandlerImpl extends AbstractWebHookTriggerHandler<NoteHook>
|
|||
.withTargetNamespace(hook.getPullRequest().getTarget().getNamespace())
|
||||
.withTargetRepoSshUrl(hook.getPullRequest().getTarget().getSshUrl())
|
||||
.withTargetRepoHttpUrl(hook.getPullRequest().getTarget().getGitHttpUrl())
|
||||
.withTriggeredByUser(hook.getPullRequest().getHead().getUser().getName())
|
||||
.withTriggeredByUser(hook.getSender().getName())
|
||||
.withLastCommit(hook.getPullRequest().getMergeCommitSha())
|
||||
.withSha(hook.getPullRequest().getMergeCommitSha())
|
||||
.withAfter(hook.getPullRequest().getMergeCommitSha())
|
||||
|
|
|
@ -228,7 +228,7 @@ class PullRequestHookTriggerHandlerImpl extends AbstractWebHookTriggerHandler<Pu
|
|||
.withTargetNamespace(hook.getPullRequest().getTarget().getNamespace())
|
||||
.withTargetRepoSshUrl(hook.getPullRequest().getTarget().getSshUrl())
|
||||
.withTargetRepoHttpUrl(hook.getPullRequest().getTarget().getGitHttpUrl())
|
||||
.withTriggeredByUser(hook.getPullRequest().getHead().getUser().getName())
|
||||
.withTriggeredByUser(hook.getSender().getName())
|
||||
.withLastCommit(hook.getPullRequest().getMergeCommitSha())
|
||||
.withSha(hook.getPullRequest().getMergeCommitSha())
|
||||
.withAfter(hook.getPullRequest().getMergeCommitSha())
|
||||
|
|
|
@ -92,7 +92,7 @@ class PushHookTriggerHandlerImpl extends AbstractWebHookTriggerHandler<PushHook>
|
|||
.withTargetNamespace("")
|
||||
.withTargetRepoSshUrl("")
|
||||
.withTargetRepoHttpUrl("")
|
||||
.withTriggeredByUser(retrievePushedBy(hook))
|
||||
.withTriggeredByUser(hook.getSender().getName())
|
||||
.withBefore(hook.getBefore())
|
||||
.withAfter(hook.getAfter())
|
||||
.withRef(hook.getRef())
|
||||
|
|
Loading…
Reference in New Issue