Our GitHub integration allows you to create triggers and tasks that interact with GitHub. Trigger jobs when events happen, like when a new issue is added to a repo, or when a pull request is opened, etc. You can also perform tasks like creating issues, getting information about a repo, adding comments, and much more.
To create a personal access token on GitHub, login and follow the instructions. Information on the required scopes can be found here.
my-job.ts
Copy
Ask AI
import { GitHub } from "@trigger.dev/github";//create GitHub client using a tokenconst github = new GitHub({ id: "github", token: process.env.GITHUB_TOKEN!,});...
To use OAuth you can connect to GitHub via the Trigger.dev web app. Click ‘Integrations’ in the side panel of any project, and configure GitHub with the ID you want to use in your job and the required scopes.
my-job.ts
Copy
Ask AI
import { GitHub } from "@trigger.dev/github";//create GitHub client using OAuthconst github = new GitHub({ id: "github",});...