public getWebhookEvent()

in src/Handler.ts [37:83]


  public getWebhookEvent(webhook: Webhook): WebhookEventsUnion {
    switch (webhook.action) {
      case "create":
        switch (webhook.type) {
          case "Issue":
            return "CreateIssueWebhook";
          case "Comment":
            return "CreateCommentWebhook";
          case "IssueLabel":
            return "CreateIssueLabelWebhook";
          case "Reaction":
            return "CreateReactionWebhook";
          case "Project":
            return "CreateProjectWebhook";
        }
        break;
      case "update":
        switch (webhook.type) {
          case "Issue":
            return "UpdateIssueWebhook";
          case "Comment":
            return "UpdateCommentWebhook";
          case "IssueLabel":
            return "UpdateIssueLabelWebhook";
          case "Cycle":
            return "UpdateCycleWebhook";
          case "Project":
            return "UpdateProjectWebhook";
        }
        break;
      case "remove":
        switch (webhook.type) {
          case "Issue":
            return "RemoveIssueWebhook";
          case "Comment":
            return "RemoveCommentWebhook";
          case "IssueLabel":
            return "RemoveIssueLabelWebhook";
          case "Project":
            return "RemoveProjectWebhook";
        }
        break;
      default:
        break;
    }
    return "UnknownWebhook";
  }