All triggers

Function NameDescription
onIssueWhen any action is performed on an issue.
onIssueOpenedWhen an issue is opened.
onIssueAssignedWhen an issue is assigned.
onIssueCommentWhen an issue is commented on.
onStarWhen a repo is starred or unstarred.
onNewStarWhen a repo is starred.
onNewRepositoryWhen a new repo is created.
onNewBranchOrTagWhen a new branch or tag is created.
onNewBranchWhen a new branch is created.
onPushWhen a push is made to a repo.
onPullRequestWhen activity occurs on a pull request (excluding reviews, issues, or comments).
onPullRequestReviewWhen a pull request review has activity.

Usage

import { Github, events } from "@trigger.dev/github";

const github = new Github({
  id: "github",
  token: process.env.GITHUB_TOKEN!,
});

client.defineJob({
  id: "github-integration-on-issue",
  name: "GitHub Integration - On Issue",
  version: "0.1.0",
  trigger: github.triggers.repo({
    event: events.onIssue,
    owner: "triggerdotdev",
    repo: "empty",
  }),
  run: async (payload, io, ctx) => {
    await io.logger.info("This is a simple log info message");
    //do stuff
  },
});