mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
(refs #74)Added case classes for payload of web hook.
This commit is contained in:
@@ -17,3 +17,39 @@ trait WebHookService {
|
|||||||
Query(WebHooks).filter(_.byPrimaryKey(owner, repository, url)).delete
|
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)
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user