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