LevelOps Tickets

Invoked with levelops.tickets().

1. create(title, [ reason ], userEmails[]) : String

  • Description: Create a LevelOps ticket.

  • Returns: id of ticket that was created

  • Examples:

ticketId = levelops.tickets().create("Ticket Title", ["user@levelops.io"]);
ticketId = levelops.tickets().create("Ticket Title", "Reason", []);

2. createFailureTriageTicket(title, [ reason ], userEmails[], cicdMappings[]) : String

  • Description: Create a LevelOps ticket for the purpose of triaging failures of CI/CD jobs.

  • Parameters: cicdMappings is an array of objects containing a job’s run id and optionally a stage id. { "run_id" : jobRunId } or { "run_id" : jobRunId, "stage_id" : stageId }

  • Returns: id of ticket that was created

  • Example:

ticketId = levelops
  .tickets()
  .createFailureTriageTicket("Title", ["user@levelops.io"], [{ run_id: jobRunId, stage_id: stageId }]);

3. sendSlackNotification(ticketId, recipients[])

  • Description: Send an interactive Slack message associated with a failure-triage ticket.

  • Example:

levelops.tickets().sendSlackNotification(ticketId, ["user@levelops.io"]);

Last updated