GitHub Tasks
These are the docs for Trigger.dev v2 which will be deprecated on January 31st, 2025. You probably want the v3 docs.
Tasks are executed after the job is triggered and are the main building blocks of a job. You can string together as many tasks as you want.
All tasks
createIssue
Creates a new issue in a repository. Official GitHub docs.
addIssueAssignees
Adds assignees to an existing issue. Official GitHub docs.
addIssueLabels
Adds labels to an existing issue. Official GitHub docs.
createIssueComment
Creates a new comment on an existing issue. Official GitHub docs.
getRepo
Retrieves information about a repository. Official GitHub docs.
createIssueCommentWithReaction
Creates a new comment on an existing issue with a reaction. Official GitHub docs.
addIssueCommentReaction
Adds a reaction to an existing issue comment. Official GitHub docs.
updateWebhook
Updates an existing webhook. Official GitHub docs.
createWebhook
Creates a new webhook. Official GitHub docs.
listWebhooks
Lists the webhooks for a repository. Official GitHub docs.
updateOrgWebhook
Updates an existing webhook for an organization. Official GitHub docs.
createOrgWebhook
Creates a new webhook for an organization. Official GitHub docs.
listOrgWebhooks
Lists the webhooks for an organization. Official GitHub docs.
Example usage
In this example we’ll create a task that adds an assignee and a label to an issue when it’s opened.
Using the underlying GitHub client
You can access the Octokit instance by using the runTask
method on the integration: