diff --git a/src/main/scala/service/WebHookService.scala b/src/main/scala/service/WebHookService.scala index 0c050d9..a6e4d50 100644 --- a/src/main/scala/service/WebHookService.scala +++ b/src/main/scala/service/WebHookService.scala @@ -17,3 +17,39 @@ Query(WebHooks).filter(_.byPrimaryKey(owner, repository, url)).delete } + +object WebHookService { + + case class WebHookPayload( + before: String, + after: String, + ref: String, + commits: List[WebHookCommit], + repository: WebHookRepository) + + case class WebHookCommit( + id: String, + message: String, + timestamp: String, + url: String, + added: List[String], + removed: List[String], + modified: List[String], + author: WebHookUser) + + case class WebHookRepository( + name: String, + url: String, + pledgie: String, + description: String, + homepage: String, + watchers: Int, + forks: Int, + `private`: Boolean, + owner: WebHookUser) + + case class WebHookUser( + name: String, + email: String) + +}