async handleIssueCommentEvent()

in functions/src/issues.ts [160:184]


  async handleIssueCommentEvent(
    event: types.github.WebhookEvent,
    action: CommentAction,
    issue: types.internal.Issue,
    comment: types.internal.Comment,
    repo: types.internal.Repository,
    sender: types.github.Sender
  ): Promise<types.Action[]> {
    switch (action) {
      case CommentAction.CREATED:
        return this.onCommentCreated(repo, issue, comment);
      case CommentAction.EDITED:
      /* falls through */
      case CommentAction.DELETED:
      /* falls through */
      default:
        log.debug("Unsupported comment action: " + action);
        log.debug("Issue: " + issue.title);
        log.debug("Comment: " + comment.body);
        break;
    }

    // Return empty action array if no action to be taken.
    return Promise.resolve([]);
  }