Add "X-Github-Event" header, and change interface.

This commit is contained in:
nazoking
2015-01-06 17:07:32 +09:00
parent db55719a6f
commit ae7ead6272
5 changed files with 7 additions and 5 deletions

View File

@@ -192,10 +192,11 @@ trait PullRequestsControllerBase extends ControllerBase {
closeIssuesFromMessage(form.message, loginAccount.userName, owner, name)
}
// call web hook
// TODO: set action https://developer.github.com/v3/activity/events/types/#pullrequestevent
getWebHookURLs(owner, name) match {
case webHookURLs if(webHookURLs.nonEmpty) =>
for(ownerAccount <- getAccountByUserName(owner)){
callWebHook(owner, name, webHookURLs,
callWebHook("pull_request", webHookURLs,
WebHookPayload(git, loginAccount, mergeBaseRefName, repository, commits.flatten.toList, ownerAccount))
}
case _ =>