def githubHook()

in app/controllers/Api.scala [35:44]


  def githubHook() = Action.async(parse.json) { implicit request =>
    val githubDeliveryGuid = request.headers.get("X-GitHub-Delivery")

    val eventOpt: Option[String] = request.headers.get("X-Github-Event")
    val repoIdOpt = Option.unless(eventOpt.contains("ping"))(parseGitHubHookJson(request.body))

    logger.info(s"githubHook event=${eventOpt.getOrElse("unknown")} repo=${repoIdOpt.map(_.fullName)} githubDeliveryGuid=$githubDeliveryGuid xRequestId=$xRequestId")

    repoIdOpt.fold(Future.successful(Ok("pong")))(updateForRepo)
  }