Permalink
Browse files

Add support to delete org webhook

  • Loading branch information...
anish committed Jun 29, 2016
1 parent 58d1e9a commit 893a166f0227d41ef94051ade705245c96a990f0
Showing with 6 additions and 0 deletions.
  1. +6 −0 app/utils/GitHub.scala
@@ -284,6 +284,12 @@ class GitHub @Inject() (configuration: Configuration, ws: WSClient) (implicit ec
ws(path, accessToken).post(json).flatMap(created)
}
// todo make the tests cleanup their webhooks, pr webhooks have a limit of 20
def deleteOrgWebhook(org: String, hookId: Int, accessToken: String): Future[Unit] = {
val path = s"orgs/$org/hooks/$hookId"
ws(path, accessToken).delete().flatMap(nocontent)
}
def orgMembers(org: String, accessToken: String): Future[JsArray] = {
val path = s"orgs/$org/members"
ws(path, accessToken).get().flatMap(ok[JsArray])

0 comments on commit 893a166

Please sign in to comment.