Skip to content
Français

TriggerCommand

import type { TriggerCommand } from "@elie-laloum/outpost";
  • sourceRequired
    "github" | "gitlab" | "slack"
    Sender of the command: github, gitlab or slack.
  • textRequired
    string
    Trimmed text after the command; empty when the command has no argument.
  • repositoryOptional
    string | undefined
    Repository of the commented issue or request, for GitHub and GitLab comments.
  • numberOptional
    number | undefined
    Number or IID of the commented issue or request, when the payload provides it.
  • targetOptional
    "issue" | "pull-request" | undefined
    issue or pull-request, present with number.
export interface TriggerCommand {
  readonly source: "github" | "gitlab" | "slack";
  /** Text following the command, trimmed. */
  readonly text: string;
  readonly repository?: string;
  readonly number?: number;
  readonly target?: "issue" | "pull-request";
}