Skip to content
Français

labelAdded

import { labelAdded } from "@elie-laloum/outpost";

Return the repository, number and target when the event adds this label to a GitHub issue or pull request, or to a GitLab issue or merge request; otherwise undefined. It reads only the verified payload and does not check who added the label.

Complete example and detailed rules.

  • eventRequired
    TriggerEvent
    Verified event from a GitHub or GitLab source.
  • labelRequired
    string
    Exact label name that must have just been added.

TriggerLabel | undefined

export declare function labelAdded(
  event: TriggerEvent,
  label: string,
): TriggerLabel | undefined;