Finished docs for github webhooks

This commit is contained in:
Eric Allam
2023-01-24 04:47:00 +00:00
parent 681955c19d
commit dc11daced1
9 changed files with 2123 additions and 36 deletions
@@ -0,0 +1,376 @@
---
title: "Issue Comment Event"
sidebarTitle: "Issue Comments"
description: "Trigger a workflow whenever an issue_comment action is performed in a GitHub repository."
---
## Usage
```ts
import { github } from "@trigger.dev/integrations";
new Trigger({
id: "demo",
on: github.events.issueCommentEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {},
}).listen();
```
## Params
<ParamField path="repo" type="string" required={true}>
The full path to the repository, including the organization
</ParamField>
## Event
<ResponseField name="action" type="string">
The issue_comment action, which can be either created, deleted, or edited.
</ResponseField>
<ResponseField name="comment" type="object" required={true}>
The comment object.
</ResponseField>
<ResponseField name="issue" type="object" required={true}>
The issue object.
</ResponseField>
<ResponseField name="repository" type="object" required={true}>
A repository on GitHub.
</ResponseField>
<ResponseField name="sender" type="object" required={true}>
The GitHub user object who performed the action.
</ResponseField>
<ResponseField name="organization" type="object">
The organization object the repository belongs to.
</ResponseField>
## Example Workflows
<CodeGroup>
```typescript Notify Slack on new Issue comment
new Trigger({
id: "github-to-slack",
name: "Notify Slack on new Issue comment",
on: github.events.issueCommentEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {
if (event.action === "created") {
await slack.postMessage("New Comment", {
channelName: "github-issues",
text: `New comment on issue ${event.issue.title} by ${event.sender.login}: ${event.comment.html_url}`,
});
}
},
}).listen();
```
</CodeGroup>
## Example Event payload
```json
{
"issue": {
"id": 1548436712,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/1",
"body": "Changed the body text once",
"user": {
"id": 10635986,
"url": "https://api.github.com/users/matt-aitken",
"type": "User",
"login": "matt-aitken",
"node_id": "MDQ6VXNlcjEwNjM1OTg2",
"html_url": "https://github.com/matt-aitken",
"gists_url": "https://api.github.com/users/matt-aitken/gists{/gist_id}",
"repos_url": "https://api.github.com/users/matt-aitken/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/10635986?v=4",
"events_url": "https://api.github.com/users/matt-aitken/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/matt-aitken/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/matt-aitken/followers",
"following_url": "https://api.github.com/users/matt-aitken/following{/other_user}",
"organizations_url": "https://api.github.com/users/matt-aitken/orgs",
"subscriptions_url": "https://api.github.com/users/matt-aitken/subscriptions",
"received_events_url": "https://api.github.com/users/matt-aitken/received_events"
},
"state": "open",
"title": "Changed test issue title",
"labels": [
{
"id": 5003355458,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/labels/documentation",
"name": "documentation",
"color": "0075ca",
"default": true,
"node_id": "LA_kwDOIxVdCc8AAAABKjklQg",
"description": "Improvements or additions to documentation"
},
{
"id": 5003355474,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/labels/enhancement",
"name": "enhancement",
"color": "a2eeef",
"default": true,
"node_id": "LA_kwDOIxVdCc8AAAABKjklUg",
"description": "New feature or request"
}
],
"locked": false,
"number": 1,
"node_id": "I_kwDOIxVdCc5cS0To",
"assignee": null,
"comments": 6,
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples/issues/1",
"assignees": [],
"closed_at": null,
"milestone": {
"id": 8941544,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/milestones/1",
"state": "open",
"title": "Test milestone",
"due_on": "2023-01-20T08:00:00Z",
"number": 1,
"creator": {
"id": 10635986,
"url": "https://api.github.com/users/matt-aitken",
"type": "User",
"login": "matt-aitken",
"node_id": "MDQ6VXNlcjEwNjM1OTg2",
"html_url": "https://github.com/matt-aitken",
"gists_url": "https://api.github.com/users/matt-aitken/gists{/gist_id}",
"repos_url": "https://api.github.com/users/matt-aitken/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/10635986?v=4",
"events_url": "https://api.github.com/users/matt-aitken/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/matt-aitken/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/matt-aitken/followers",
"following_url": "https://api.github.com/users/matt-aitken/following{/other_user}",
"organizations_url": "https://api.github.com/users/matt-aitken/orgs",
"subscriptions_url": "https://api.github.com/users/matt-aitken/subscriptions",
"received_events_url": "https://api.github.com/users/matt-aitken/received_events"
},
"node_id": "MI_kwDOIxVdCc4AiG_o",
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples/milestone/1",
"closed_at": null,
"created_at": "2023-01-19T03:02:37Z",
"labels_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/milestones/1/labels",
"updated_at": "2023-01-19T17:21:25Z",
"description": "",
"open_issues": 1,
"closed_issues": 0
},
"reactions": {
"+1": 0,
"-1": 0,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/1/reactions",
"eyes": 0,
"heart": 0,
"laugh": 0,
"hooray": 0,
"rocket": 0,
"confused": 0,
"total_count": 0
},
"created_at": "2023-01-19T02:50:49Z",
"events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/1/events",
"labels_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/1/labels{/name}",
"updated_at": "2023-01-24T04:18:52Z",
"comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/1/comments",
"state_reason": "reopened",
"timeline_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/1/timeline",
"repository_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples",
"active_lock_reason": null,
"author_association": "MEMBER",
"performed_via_github_app": null
},
"action": "created",
"sender": {
"id": 534,
"url": "https://api.github.com/users/ericallam",
"type": "User",
"login": "ericallam",
"node_id": "MDQ6VXNlcjUzNA==",
"html_url": "https://github.com/ericallam",
"gists_url": "https://api.github.com/users/ericallam/gists{/gist_id}",
"repos_url": "https://api.github.com/users/ericallam/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/534?v=4",
"events_url": "https://api.github.com/users/ericallam/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/ericallam/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/ericallam/followers",
"following_url": "https://api.github.com/users/ericallam/following{/other_user}",
"organizations_url": "https://api.github.com/users/ericallam/orgs",
"subscriptions_url": "https://api.github.com/users/ericallam/subscriptions",
"received_events_url": "https://api.github.com/users/ericallam/received_events"
},
"comment": {
"id": 1401375866,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/comments/1401375866",
"body": "New comment",
"user": {
"id": 534,
"url": "https://api.github.com/users/ericallam",
"type": "User",
"login": "ericallam",
"node_id": "MDQ6VXNlcjUzNA==",
"html_url": "https://github.com/ericallam",
"gists_url": "https://api.github.com/users/ericallam/gists{/gist_id}",
"repos_url": "https://api.github.com/users/ericallam/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/534?v=4",
"events_url": "https://api.github.com/users/ericallam/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/ericallam/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/ericallam/followers",
"following_url": "https://api.github.com/users/ericallam/following{/other_user}",
"organizations_url": "https://api.github.com/users/ericallam/orgs",
"subscriptions_url": "https://api.github.com/users/ericallam/subscriptions",
"received_events_url": "https://api.github.com/users/ericallam/received_events"
},
"node_id": "IC_kwDOIxVdCc5Th0x6",
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples/issues/1#issuecomment-1401375866",
"issue_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/1",
"reactions": {
"+1": 0,
"-1": 0,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/comments/1401375866/reactions",
"eyes": 0,
"heart": 0,
"laugh": 0,
"hooray": 0,
"rocket": 0,
"confused": 0,
"total_count": 0
},
"created_at": "2023-01-24T04:18:52Z",
"updated_at": "2023-01-24T04:18:52Z",
"author_association": "MEMBER",
"performed_via_github_app": null
},
"repository": {
"id": 588602633,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples",
"fork": false,
"name": "trigger.dev-examples",
"size": 161,
"forks": 0,
"owner": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"type": "Organization",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"topics": [],
"git_url": "git://github.com/triggerdotdev/trigger.dev-examples.git",
"license": null,
"node_id": "R_kgDOIxVdCQ",
"private": false,
"ssh_url": "git@github.com:triggerdotdev/trigger.dev-examples.git",
"svn_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"archived": false,
"disabled": false,
"has_wiki": false,
"homepage": null,
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"keys_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/keys{/key_id}",
"language": "TypeScript",
"tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/tags",
"watchers": 1,
"blobs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/blobs{/sha}",
"clone_url": "https://github.com/triggerdotdev/trigger.dev-examples.git",
"forks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/forks",
"full_name": "triggerdotdev/trigger.dev-examples",
"has_pages": false,
"hooks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/hooks",
"pulls_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls{/number}",
"pushed_at": "2023-01-23T19:06:36Z",
"teams_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/teams",
"trees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/trees{/sha}",
"created_at": "2023-01-13T14:26:45Z",
"events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/events",
"has_issues": true,
"issues_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues{/number}",
"labels_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/labels{/name}",
"merges_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/merges",
"mirror_url": null,
"updated_at": "2023-01-23T14:22:40Z",
"visibility": "public",
"archive_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/{archive_format}{/ref}",
"commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/commits{/sha}",
"compare_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/compare/{base}...{head}",
"description": "Node.js project with multiple example Trigger.dev workflows",
"forks_count": 0,
"is_template": false,
"open_issues": 2,
"branches_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/branches{/branch}",
"comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/comments{/number}",
"contents_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contents/{+path}",
"git_refs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/tags{/sha}",
"has_projects": true,
"releases_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/releases{/id}",
"statuses_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/{sha}",
"allow_forking": true,
"assignees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/assignees{/user}",
"downloads_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/downloads",
"has_downloads": false,
"languages_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/languages",
"default_branch": "main",
"milestones_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/milestones{/number}",
"stargazers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/stargazers",
"watchers_count": 1,
"deployments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/deployments",
"git_commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/commits{/sha}",
"has_discussions": false,
"subscribers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscribers",
"contributors_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contributors",
"issue_events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/events{/number}",
"stargazers_count": 1,
"subscription_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscription",
"collaborators_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/collaborators{/collaborator}",
"issue_comment_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/comments{/number}",
"notifications_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/notifications{?since,all,participating}",
"open_issues_count": 2,
"web_commit_signoff_required": false
},
"organization": {
"id": 95297378,
"url": "https://api.github.com/orgs/triggerdotdev",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"hooks_url": "https://api.github.com/orgs/triggerdotdev/hooks",
"repos_url": "https://api.github.com/orgs/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/orgs/triggerdotdev/events",
"issues_url": "https://api.github.com/orgs/triggerdotdev/issues",
"description": "",
"members_url": "https://api.github.com/orgs/triggerdotdev/members{/member}",
"public_members_url": "https://api.github.com/orgs/triggerdotdev/public_members{/member}"
}
}
```
@@ -4,6 +4,20 @@ sidebarTitle: "Issues"
description: "Trigger a workflow whenever an issue action is performed in a GitHub repository."
---
## Usage
```ts
import { github } from "@trigger.dev/integrations";
new Trigger({
id: "demo",
on: github.events.issueEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {},
}).listen();
```
## Params
<ParamField path="repo" type="string" required={true}>
@@ -27,7 +41,7 @@ description: "Trigger a workflow whenever an issue action is performed in a GitH
</ResponseField>
<ResponseField name="sender" type="object" required={true}>
The GitHub user object who starred the repository.
The GitHub user object who performed the action.
</ResponseField>
<ResponseField name="organization" type="object">
@@ -103,25 +117,11 @@ description: "Trigger a workflow whenever an issue action is performed in a GitH
## Example Workflows
<ResponseField name="issue" type="object" required={true}>
The issue object.
</ResponseField>
<CodeGroup>
```typescript Basic
const trigger = new Trigger({
id: "basic-example",
on: github.events.issueEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {},
});
```
```typescript Notify Slack on Critical Issue
new Trigger({
id: "github-issue-to-slack-message",
id: "github-to-slack",
name: "Notify of critical issues",
on: github.events.issueEvent({
repo: "triggerdotdev/trigger.dev",
@@ -138,14 +138,14 @@ new Trigger({
return event;
},
});
}).listen();
```
</CodeGroup>
## Example Event payload
```json Example
```json
{
"issue": {
"id": 1514714160,
@@ -4,9 +4,19 @@ sidebarTitle: "New Star"
description: "Trigger a workflow whenever a user star's the specified GitHub repository."
---
# New Star
## Usage
Trigger a workflow whenever a user star's the specified GitHub repository.
```ts
import { github } from "@trigger.dev/integrations";
new Trigger({
id: "demo",
on: github.events.newStarEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {},
}).listen();
```
## Params
@@ -40,17 +50,6 @@ Trigger a workflow whenever a user star's the specified GitHub repository.
<CodeGroup>
```typescript Basic
new Trigger({
id: "new-star",
name: "On New Star",
on: github.events.newStarEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {},
}).listen();
```
```typescript Notify Slack on New Star
import { slack } from "@trigger.dev/integrations";
@@ -0,0 +1,97 @@
---
title: "PR Review Comment Event"
sidebarTitle: "PR Review Comments"
description: "Trigger a workflow whenever an pull_request_review_comment action is performed in a GitHub repository."
---
<Note>
If you would like to trigger a workflow when a comment is made on a PR, use
the [issueCommentEvent](/integrations/apis/github/events/issue-comments)
instead
</Note>
## Usage
```ts
import { github } from "@trigger.dev/integrations";
new Trigger({
id: "demo",
on: github.events.pullRequestCommentEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {},
}).listen();
```
## Params
<ParamField path="repo" type="string" required={true}>
The full path to the repository, including the organization
</ParamField>
## Event
<ResponseField name="action" type="string">
The pull_request action, can be one of: `created`, `edited`, `deleted`.
</ResponseField>
<ResponseField name="comment" type="object" required={true}>
The pull request review comment object.
</ResponseField>
<ResponseField name="pull_request" type="object" required={true}>
The pull request object.
</ResponseField>
<ResponseField name="repository" type="object" required={true}>
A repository on GitHub.
</ResponseField>
<ResponseField name="sender" type="object" required={true}>
The GitHub user object who performed the action.
</ResponseField>
<ResponseField name="organization" type="object">
The organization object the repository belongs to.
</ResponseField>
## Additional event fields
### edited PR Review Comment
<ResponseField name="changes" type="object">
<Expandable title="properties">
<ResponseField name="body" type="object">
<Expandable title="properties" defaultOpen={true}>
<ResponseField name="from" type="string">
The previous body text.
</ResponseField>
</Expandable>
</ResponseField>
</Expandable>
</ResponseField>
## Example Workflows
<CodeGroup>
```typescript Notify Slack on new PR
new Trigger({
id: "new-pr",
name: "Notify Slack on new PR Review Comment",
on: github.events.pullRequestCommentEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {
if (event.action === "created") {
await slack.postMessage("New PR comment", {
channelName: "github-prs",
text: `New PR comment by ${event.sender.login} on PR ${event.pull_request.title} (${event.pull_request.html_url})`,
});
}
},
}).listen();
```
</CodeGroup>
@@ -0,0 +1,625 @@
---
title: "PR Review Event"
sidebarTitle: "PR Reviews"
description: "Trigger a workflow whenever an pull_request_review action is performed in a GitHub repository."
---
## Usage
```ts
import { github } from "@trigger.dev/integrations";
new Trigger({
id: "demo",
on: github.events.pullRequestReviewEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {},
}).listen();
```
## Params
<ParamField path="repo" type="string" required={true}>
The full path to the repository, including the organization
</ParamField>
## Event
<ResponseField name="action" type="string">
The pull_request_review action, can be one of: `submitted`, `edited`,
`dismissed`.
</ResponseField>
<ResponseField name="review" type="object" required={true}>
The pull request review object.
</ResponseField>
<ResponseField name="pull_request" type="object" required={true}>
The pull request object.
</ResponseField>
<ResponseField name="repository" type="object" required={true}>
A repository on GitHub.
</ResponseField>
<ResponseField name="sender" type="object" required={true}>
The GitHub user object who performed the action.
</ResponseField>
<ResponseField name="organization" type="object">
The organization object the repository belongs to.
</ResponseField>
## Additional event fields
### edited PR Review
<ResponseField name="changes" type="object">
<Expandable title="properties">
<ResponseField name="body" type="object">
<Expandable title="properties" defaultOpen={true}>
<ResponseField name="from" type="string">
The previous body text.
</ResponseField>
</Expandable>
</ResponseField>
</Expandable>
</ResponseField>
## Example Workflows
<CodeGroup>
```typescript Notify Slack on new PR Review
new Trigger({
id: "new-pr",
name: "Notify Slack on new PR Review",
on: github.events.pullRequestReviewEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {
if (event.action === "submitted") {
await slack.postMessage("New PR Review", {
channelName: "github-prs",
text: `New PR Review by ${event.sender.login} on PR ${event.pull_request.title} (${event.pull_request.html_url})`,
});
}
},
}).listen();
```
</CodeGroup>
## Example Event payload
```json
{
"action": "submitted",
"review": {
"id": 1266763458,
"body": "This is a PR review comment?",
"user": {
"id": 534,
"url": "https://api.github.com/users/ericallam",
"type": "User",
"login": "ericallam",
"node_id": "MDQ6VXNlcjUzNA==",
"html_url": "https://github.com/ericallam",
"gists_url": "https://api.github.com/users/ericallam/gists{/gist_id}",
"repos_url": "https://api.github.com/users/ericallam/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/534?v=4",
"events_url": "https://api.github.com/users/ericallam/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/ericallam/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/ericallam/followers",
"following_url": "https://api.github.com/users/ericallam/following{/other_user}",
"organizations_url": "https://api.github.com/users/ericallam/orgs",
"subscriptions_url": "https://api.github.com/users/ericallam/subscriptions",
"received_events_url": "https://api.github.com/users/ericallam/received_events"
},
"state": "commented",
"_links": {
"html": {
"href": "https://github.com/triggerdotdev/trigger.dev-examples/pull/4#pullrequestreview-1266763458"
},
"pull_request": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4"
}
},
"node_id": "PRR_kwDOIxVdCc5LgUbC",
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples/pull/4#pullrequestreview-1266763458",
"commit_id": "efc58e149c06f4a45ebf7a0bf34ac25cdcd34b07",
"submitted_at": "2023-01-24T04:24:58Z",
"pull_request_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4",
"author_association": "MEMBER"
},
"sender": {
"id": 534,
"url": "https://api.github.com/users/ericallam",
"type": "User",
"login": "ericallam",
"node_id": "MDQ6VXNlcjUzNA==",
"html_url": "https://github.com/ericallam",
"gists_url": "https://api.github.com/users/ericallam/gists{/gist_id}",
"repos_url": "https://api.github.com/users/ericallam/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/534?v=4",
"events_url": "https://api.github.com/users/ericallam/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/ericallam/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/ericallam/followers",
"following_url": "https://api.github.com/users/ericallam/following{/other_user}",
"organizations_url": "https://api.github.com/users/ericallam/orgs",
"subscriptions_url": "https://api.github.com/users/ericallam/subscriptions",
"received_events_url": "https://api.github.com/users/ericallam/received_events"
},
"repository": {
"id": 588602633,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples",
"fork": false,
"name": "trigger.dev-examples",
"size": 161,
"forks": 0,
"owner": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"type": "Organization",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"topics": [],
"git_url": "git://github.com/triggerdotdev/trigger.dev-examples.git",
"license": null,
"node_id": "R_kgDOIxVdCQ",
"private": false,
"ssh_url": "git@github.com:triggerdotdev/trigger.dev-examples.git",
"svn_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"archived": false,
"disabled": false,
"has_wiki": false,
"homepage": null,
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"keys_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/keys{/key_id}",
"language": "TypeScript",
"tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/tags",
"watchers": 1,
"blobs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/blobs{/sha}",
"clone_url": "https://github.com/triggerdotdev/trigger.dev-examples.git",
"forks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/forks",
"full_name": "triggerdotdev/trigger.dev-examples",
"has_pages": false,
"hooks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/hooks",
"pulls_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls{/number}",
"pushed_at": "2023-01-24T04:20:52Z",
"teams_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/teams",
"trees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/trees{/sha}",
"created_at": "2023-01-13T14:26:45Z",
"events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/events",
"has_issues": true,
"issues_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues{/number}",
"labels_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/labels{/name}",
"merges_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/merges",
"mirror_url": null,
"updated_at": "2023-01-23T14:22:40Z",
"visibility": "public",
"archive_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/{archive_format}{/ref}",
"commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/commits{/sha}",
"compare_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/compare/{base}...{head}",
"description": "Node.js project with multiple example Trigger.dev workflows",
"forks_count": 0,
"is_template": false,
"open_issues": 3,
"branches_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/branches{/branch}",
"comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/comments{/number}",
"contents_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contents/{+path}",
"git_refs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/tags{/sha}",
"has_projects": true,
"releases_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/releases{/id}",
"statuses_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/{sha}",
"allow_forking": true,
"assignees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/assignees{/user}",
"downloads_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/downloads",
"has_downloads": false,
"languages_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/languages",
"default_branch": "main",
"milestones_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/milestones{/number}",
"stargazers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/stargazers",
"watchers_count": 1,
"deployments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/deployments",
"git_commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/commits{/sha}",
"has_discussions": false,
"subscribers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscribers",
"contributors_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contributors",
"issue_events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/events{/number}",
"stargazers_count": 1,
"subscription_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscription",
"collaborators_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/collaborators{/collaborator}",
"issue_comment_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/comments{/number}",
"notifications_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/notifications{?since,all,participating}",
"open_issues_count": 3,
"web_commit_signoff_required": false
},
"organization": {
"id": 95297378,
"url": "https://api.github.com/orgs/triggerdotdev",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"hooks_url": "https://api.github.com/orgs/triggerdotdev/hooks",
"repos_url": "https://api.github.com/orgs/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/orgs/triggerdotdev/events",
"issues_url": "https://api.github.com/orgs/triggerdotdev/issues",
"description": "",
"members_url": "https://api.github.com/orgs/triggerdotdev/members{/member}",
"public_members_url": "https://api.github.com/orgs/triggerdotdev/public_members{/member}"
},
"pull_request": {
"id": 1214500311,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4",
"base": {
"ref": "main",
"sha": "e7c0680e23fcd3e52d35ddfbb4076112c640d9fa",
"repo": {
"id": 588602633,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples",
"fork": false,
"name": "trigger.dev-examples",
"size": 161,
"forks": 0,
"owner": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"type": "Organization",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"topics": [],
"git_url": "git://github.com/triggerdotdev/trigger.dev-examples.git",
"license": null,
"node_id": "R_kgDOIxVdCQ",
"private": false,
"ssh_url": "git@github.com:triggerdotdev/trigger.dev-examples.git",
"svn_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"archived": false,
"disabled": false,
"has_wiki": false,
"homepage": null,
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"keys_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/keys{/key_id}",
"language": "TypeScript",
"tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/tags",
"watchers": 1,
"blobs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/blobs{/sha}",
"clone_url": "https://github.com/triggerdotdev/trigger.dev-examples.git",
"forks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/forks",
"full_name": "triggerdotdev/trigger.dev-examples",
"has_pages": false,
"hooks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/hooks",
"pulls_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls{/number}",
"pushed_at": "2023-01-24T04:20:52Z",
"teams_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/teams",
"trees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/trees{/sha}",
"created_at": "2023-01-13T14:26:45Z",
"events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/events",
"has_issues": true,
"issues_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues{/number}",
"labels_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/labels{/name}",
"merges_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/merges",
"mirror_url": null,
"updated_at": "2023-01-23T14:22:40Z",
"visibility": "public",
"archive_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/{archive_format}{/ref}",
"commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/commits{/sha}",
"compare_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/compare/{base}...{head}",
"description": "Node.js project with multiple example Trigger.dev workflows",
"forks_count": 0,
"is_template": false,
"open_issues": 3,
"branches_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/branches{/branch}",
"comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/comments{/number}",
"contents_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contents/{+path}",
"git_refs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/tags{/sha}",
"has_projects": true,
"releases_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/releases{/id}",
"statuses_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/{sha}",
"allow_forking": true,
"assignees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/assignees{/user}",
"downloads_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/downloads",
"has_downloads": false,
"languages_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/languages",
"default_branch": "main",
"milestones_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/milestones{/number}",
"stargazers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/stargazers",
"watchers_count": 1,
"deployments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/deployments",
"git_commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/commits{/sha}",
"has_discussions": false,
"subscribers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscribers",
"allow_auto_merge": false,
"contributors_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contributors",
"issue_events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/events{/number}",
"stargazers_count": 1,
"subscription_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscription",
"collaborators_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/collaborators{/collaborator}",
"issue_comment_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/comments{/number}",
"notifications_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/notifications{?since,all,participating}",
"open_issues_count": 3,
"allow_merge_commit": true,
"allow_rebase_merge": true,
"allow_squash_merge": true,
"merge_commit_title": "MERGE_MESSAGE",
"allow_update_branch": false,
"merge_commit_message": "PR_TITLE",
"delete_branch_on_merge": false,
"squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
"squash_merge_commit_message": "COMMIT_MESSAGES",
"web_commit_signoff_required": false,
"use_squash_pr_title_as_default": false
},
"user": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"type": "Organization",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"label": "triggerdotdev:main"
},
"body": null,
"head": {
"ref": "resend",
"sha": "efc58e149c06f4a45ebf7a0bf34ac25cdcd34b07",
"repo": {
"id": 588602633,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples",
"fork": false,
"name": "trigger.dev-examples",
"size": 161,
"forks": 0,
"owner": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"type": "Organization",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"topics": [],
"git_url": "git://github.com/triggerdotdev/trigger.dev-examples.git",
"license": null,
"node_id": "R_kgDOIxVdCQ",
"private": false,
"ssh_url": "git@github.com:triggerdotdev/trigger.dev-examples.git",
"svn_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"archived": false,
"disabled": false,
"has_wiki": false,
"homepage": null,
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"keys_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/keys{/key_id}",
"language": "TypeScript",
"tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/tags",
"watchers": 1,
"blobs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/blobs{/sha}",
"clone_url": "https://github.com/triggerdotdev/trigger.dev-examples.git",
"forks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/forks",
"full_name": "triggerdotdev/trigger.dev-examples",
"has_pages": false,
"hooks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/hooks",
"pulls_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls{/number}",
"pushed_at": "2023-01-24T04:20:52Z",
"teams_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/teams",
"trees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/trees{/sha}",
"created_at": "2023-01-13T14:26:45Z",
"events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/events",
"has_issues": true,
"issues_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues{/number}",
"labels_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/labels{/name}",
"merges_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/merges",
"mirror_url": null,
"updated_at": "2023-01-23T14:22:40Z",
"visibility": "public",
"archive_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/{archive_format}{/ref}",
"commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/commits{/sha}",
"compare_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/compare/{base}...{head}",
"description": "Node.js project with multiple example Trigger.dev workflows",
"forks_count": 0,
"is_template": false,
"open_issues": 3,
"branches_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/branches{/branch}",
"comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/comments{/number}",
"contents_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contents/{+path}",
"git_refs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/tags{/sha}",
"has_projects": true,
"releases_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/releases{/id}",
"statuses_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/{sha}",
"allow_forking": true,
"assignees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/assignees{/user}",
"downloads_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/downloads",
"has_downloads": false,
"languages_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/languages",
"default_branch": "main",
"milestones_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/milestones{/number}",
"stargazers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/stargazers",
"watchers_count": 1,
"deployments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/deployments",
"git_commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/commits{/sha}",
"has_discussions": false,
"subscribers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscribers",
"allow_auto_merge": false,
"contributors_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contributors",
"issue_events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/events{/number}",
"stargazers_count": 1,
"subscription_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscription",
"collaborators_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/collaborators{/collaborator}",
"issue_comment_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/comments{/number}",
"notifications_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/notifications{?since,all,participating}",
"open_issues_count": 3,
"allow_merge_commit": true,
"allow_rebase_merge": true,
"allow_squash_merge": true,
"merge_commit_title": "MERGE_MESSAGE",
"allow_update_branch": false,
"merge_commit_message": "PR_TITLE",
"delete_branch_on_merge": false,
"squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
"squash_merge_commit_message": "COMMIT_MESSAGES",
"web_commit_signoff_required": false,
"use_squash_pr_title_as_default": false
},
"user": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"type": "Organization",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"label": "triggerdotdev:resend"
},
"user": {
"id": 534,
"url": "https://api.github.com/users/ericallam",
"type": "User",
"login": "ericallam",
"node_id": "MDQ6VXNlcjUzNA==",
"html_url": "https://github.com/ericallam",
"gists_url": "https://api.github.com/users/ericallam/gists{/gist_id}",
"repos_url": "https://api.github.com/users/ericallam/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/534?v=4",
"events_url": "https://api.github.com/users/ericallam/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/ericallam/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/ericallam/followers",
"following_url": "https://api.github.com/users/ericallam/following{/other_user}",
"organizations_url": "https://api.github.com/users/ericallam/orgs",
"subscriptions_url": "https://api.github.com/users/ericallam/subscriptions",
"received_events_url": "https://api.github.com/users/ericallam/received_events"
},
"draft": false,
"state": "open",
"title": "Example PR",
"_links": {
"html": {
"href": "https://github.com/triggerdotdev/trigger.dev-examples/pull/4"
},
"self": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4"
},
"issue": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/4"
},
"commits": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4/commits"
},
"comments": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/4/comments"
},
"statuses": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/efc58e149c06f4a45ebf7a0bf34ac25cdcd34b07"
},
"review_comment": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/comments{/number}"
},
"review_comments": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4/comments"
}
},
"labels": [],
"locked": false,
"number": 4,
"node_id": "PR_kwDOIxVdCc5IY83X",
"assignee": null,
"diff_url": "https://github.com/triggerdotdev/trigger.dev-examples/pull/4.diff",
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples/pull/4",
"assignees": [],
"closed_at": null,
"issue_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/4",
"merged_at": null,
"milestone": null,
"patch_url": "https://github.com/triggerdotdev/trigger.dev-examples/pull/4.patch",
"auto_merge": null,
"created_at": "2023-01-24T04:20:51Z",
"updated_at": "2023-01-24T04:24:58Z",
"commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4/commits",
"comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/4/comments",
"statuses_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/efc58e149c06f4a45ebf7a0bf34ac25cdcd34b07",
"requested_teams": [],
"merge_commit_sha": null,
"active_lock_reason": null,
"author_association": "MEMBER",
"review_comment_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/comments{/number}",
"requested_reviewers": [],
"review_comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4/comments"
}
}
```
@@ -0,0 +1,644 @@
---
title: "Pull Request Event"
sidebarTitle: "Pull Requests"
description: "Trigger a workflow whenever an pull_request action is performed in a GitHub repository."
---
## Usage
```ts
import { github } from "@trigger.dev/integrations";
new Trigger({
id: "demo",
on: github.events.pullRequestEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {},
}).listen();
```
## Params
<ParamField path="repo" type="string" required={true}>
The full path to the repository, including the organization
</ParamField>
## Event
<ResponseField name="action" type="string">
The pull_request action, which can one of assigned, unassigned,
auto_merge_enabled, auto_merge_disabled, review_requested,
review_request_removed, ready_for_review, labeled, unlabeled, opened, edited,
closed, reopened, synchronize, ready_for_review, locked, unlocked, or
converted_to_draft.
</ResponseField>
<ResponseField name="number" type="number" required={true}>
The pull request number.
</ResponseField>
<ResponseField name="pull_request" type="object" required={true}>
The pull request object.
</ResponseField>
<ResponseField name="repository" type="object" required={true}>
A repository on GitHub.
</ResponseField>
<ResponseField name="sender" type="object" required={true}>
The GitHub user object who performed the action.
</ResponseField>
<ResponseField name="organization" type="object">
The organization object the repository belongs to.
</ResponseField>
## Additional event fields
### review_requested/review_request_removed PRs
<ResponseField name="requested_reviewer" type="object">
The GitHub user object who was requested to review the PR.
</ResponseField>
<ResponseField name="requested_team" type="object">
The GitHub team object who was requested to review the PR.
</ResponseField>
### labeled/unlabeled PRs
<ResponseField name="label" type="object">
The label object.
</ResponseField>
### assigned/unassigned PRs
<ResponseField name="assignee" type="object">
The assignee object.
</ResponseField>
### edited PRs
<ResponseField name="changes" type="object">
<Expandable title="properties">
<ResponseField name="body" type="object">
<Expandable title="properties" defaultOpen={true}>
<ResponseField name="from" type="string">
The previous body text.
</ResponseField>
</Expandable>
</ResponseField>
<ResponseField name="title" type="object">
<Expandable title="properties" defaultOpen={true}>
<ResponseField name="from" type="string">
The previous title text.
</ResponseField>
</Expandable>
</ResponseField>
<ResponseField name="base" type="object">
<Expandable title="properties" defaultOpen={true}>
<ResponseField name="ref" type="object">
Use `ref.from` to get the previous base branch name.
</ResponseField>
<ResponseField name="sha" type="object">
Use `sha.from` to get the previous base branch SHA.
</ResponseField>
</Expandable>
</ResponseField>
</Expandable>
</ResponseField>
## Example Workflows
<CodeGroup>
```typescript Notify Slack on new PR
new Trigger({
id: "new-pr",
name: "Notify Slack on new PR",
on: github.events.pullRequestEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {
if (event.action === "opened") {
await slack.postMessage("New PR", {
channelName: "github-prs",
text: `New PR: ${event.pull_request.html_url}`,
});
}
},
}).listen();
```
</CodeGroup>
## Example Event payload
```json
{
"action": "opened",
"number": 4,
"sender": {
"id": 534,
"url": "https://api.github.com/users/ericallam",
"type": "User",
"login": "ericallam",
"node_id": "MDQ6VXNlcjUzNA==",
"html_url": "https://github.com/ericallam",
"gists_url": "https://api.github.com/users/ericallam/gists{/gist_id}",
"repos_url": "https://api.github.com/users/ericallam/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/534?v=4",
"events_url": "https://api.github.com/users/ericallam/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/ericallam/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/ericallam/followers",
"following_url": "https://api.github.com/users/ericallam/following{/other_user}",
"organizations_url": "https://api.github.com/users/ericallam/orgs",
"subscriptions_url": "https://api.github.com/users/ericallam/subscriptions",
"received_events_url": "https://api.github.com/users/ericallam/received_events"
},
"repository": {
"id": 588602633,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples",
"fork": false,
"name": "trigger.dev-examples",
"size": 161,
"forks": 0,
"owner": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"type": "Organization",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"topics": [],
"git_url": "git://github.com/triggerdotdev/trigger.dev-examples.git",
"license": null,
"node_id": "R_kgDOIxVdCQ",
"private": false,
"ssh_url": "git@github.com:triggerdotdev/trigger.dev-examples.git",
"svn_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"archived": false,
"disabled": false,
"has_wiki": false,
"homepage": null,
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"keys_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/keys{/key_id}",
"language": "TypeScript",
"tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/tags",
"watchers": 1,
"blobs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/blobs{/sha}",
"clone_url": "https://github.com/triggerdotdev/trigger.dev-examples.git",
"forks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/forks",
"full_name": "triggerdotdev/trigger.dev-examples",
"has_pages": false,
"hooks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/hooks",
"pulls_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls{/number}",
"pushed_at": "2023-01-24T04:20:52Z",
"teams_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/teams",
"trees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/trees{/sha}",
"created_at": "2023-01-13T14:26:45Z",
"events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/events",
"has_issues": true,
"issues_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues{/number}",
"labels_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/labels{/name}",
"merges_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/merges",
"mirror_url": null,
"updated_at": "2023-01-23T14:22:40Z",
"visibility": "public",
"archive_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/{archive_format}{/ref}",
"commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/commits{/sha}",
"compare_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/compare/{base}...{head}",
"description": "Node.js project with multiple example Trigger.dev workflows",
"forks_count": 0,
"is_template": false,
"open_issues": 3,
"branches_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/branches{/branch}",
"comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/comments{/number}",
"contents_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contents/{+path}",
"git_refs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/tags{/sha}",
"has_projects": true,
"releases_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/releases{/id}",
"statuses_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/{sha}",
"allow_forking": true,
"assignees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/assignees{/user}",
"downloads_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/downloads",
"has_downloads": false,
"languages_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/languages",
"default_branch": "main",
"milestones_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/milestones{/number}",
"stargazers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/stargazers",
"watchers_count": 1,
"deployments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/deployments",
"git_commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/commits{/sha}",
"has_discussions": false,
"subscribers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscribers",
"contributors_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contributors",
"issue_events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/events{/number}",
"stargazers_count": 1,
"subscription_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscription",
"collaborators_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/collaborators{/collaborator}",
"issue_comment_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/comments{/number}",
"notifications_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/notifications{?since,all,participating}",
"open_issues_count": 3,
"web_commit_signoff_required": false
},
"organization": {
"id": 95297378,
"url": "https://api.github.com/orgs/triggerdotdev",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"hooks_url": "https://api.github.com/orgs/triggerdotdev/hooks",
"repos_url": "https://api.github.com/orgs/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/orgs/triggerdotdev/events",
"issues_url": "https://api.github.com/orgs/triggerdotdev/issues",
"description": "",
"members_url": "https://api.github.com/orgs/triggerdotdev/members{/member}",
"public_members_url": "https://api.github.com/orgs/triggerdotdev/public_members{/member}"
},
"pull_request": {
"id": 1214500311,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4",
"base": {
"ref": "main",
"sha": "e7c0680e23fcd3e52d35ddfbb4076112c640d9fa",
"repo": {
"id": 588602633,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples",
"fork": false,
"name": "trigger.dev-examples",
"size": 161,
"forks": 0,
"owner": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"type": "Organization",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"topics": [],
"git_url": "git://github.com/triggerdotdev/trigger.dev-examples.git",
"license": null,
"node_id": "R_kgDOIxVdCQ",
"private": false,
"ssh_url": "git@github.com:triggerdotdev/trigger.dev-examples.git",
"svn_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"archived": false,
"disabled": false,
"has_wiki": false,
"homepage": null,
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"keys_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/keys{/key_id}",
"language": "TypeScript",
"tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/tags",
"watchers": 1,
"blobs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/blobs{/sha}",
"clone_url": "https://github.com/triggerdotdev/trigger.dev-examples.git",
"forks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/forks",
"full_name": "triggerdotdev/trigger.dev-examples",
"has_pages": false,
"hooks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/hooks",
"pulls_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls{/number}",
"pushed_at": "2023-01-24T04:20:52Z",
"teams_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/teams",
"trees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/trees{/sha}",
"created_at": "2023-01-13T14:26:45Z",
"events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/events",
"has_issues": true,
"issues_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues{/number}",
"labels_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/labels{/name}",
"merges_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/merges",
"mirror_url": null,
"updated_at": "2023-01-23T14:22:40Z",
"visibility": "public",
"archive_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/{archive_format}{/ref}",
"commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/commits{/sha}",
"compare_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/compare/{base}...{head}",
"description": "Node.js project with multiple example Trigger.dev workflows",
"forks_count": 0,
"is_template": false,
"open_issues": 3,
"branches_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/branches{/branch}",
"comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/comments{/number}",
"contents_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contents/{+path}",
"git_refs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/tags{/sha}",
"has_projects": true,
"releases_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/releases{/id}",
"statuses_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/{sha}",
"allow_forking": true,
"assignees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/assignees{/user}",
"downloads_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/downloads",
"has_downloads": false,
"languages_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/languages",
"default_branch": "main",
"milestones_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/milestones{/number}",
"stargazers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/stargazers",
"watchers_count": 1,
"deployments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/deployments",
"git_commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/commits{/sha}",
"has_discussions": false,
"subscribers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscribers",
"allow_auto_merge": false,
"contributors_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contributors",
"issue_events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/events{/number}",
"stargazers_count": 1,
"subscription_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscription",
"collaborators_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/collaborators{/collaborator}",
"issue_comment_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/comments{/number}",
"notifications_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/notifications{?since,all,participating}",
"open_issues_count": 3,
"allow_merge_commit": true,
"allow_rebase_merge": true,
"allow_squash_merge": true,
"merge_commit_title": "MERGE_MESSAGE",
"allow_update_branch": false,
"merge_commit_message": "PR_TITLE",
"delete_branch_on_merge": false,
"squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
"squash_merge_commit_message": "COMMIT_MESSAGES",
"web_commit_signoff_required": false,
"use_squash_pr_title_as_default": false
},
"user": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"type": "Organization",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"label": "triggerdotdev:main"
},
"body": null,
"head": {
"ref": "resend",
"sha": "efc58e149c06f4a45ebf7a0bf34ac25cdcd34b07",
"repo": {
"id": 588602633,
"url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples",
"fork": false,
"name": "trigger.dev-examples",
"size": 161,
"forks": 0,
"owner": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"type": "Organization",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"topics": [],
"git_url": "git://github.com/triggerdotdev/trigger.dev-examples.git",
"license": null,
"node_id": "R_kgDOIxVdCQ",
"private": false,
"ssh_url": "git@github.com:triggerdotdev/trigger.dev-examples.git",
"svn_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"archived": false,
"disabled": false,
"has_wiki": false,
"homepage": null,
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"keys_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/keys{/key_id}",
"language": "TypeScript",
"tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/tags",
"watchers": 1,
"blobs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/blobs{/sha}",
"clone_url": "https://github.com/triggerdotdev/trigger.dev-examples.git",
"forks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/forks",
"full_name": "triggerdotdev/trigger.dev-examples",
"has_pages": false,
"hooks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/hooks",
"pulls_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls{/number}",
"pushed_at": "2023-01-24T04:20:52Z",
"teams_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/teams",
"trees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/trees{/sha}",
"created_at": "2023-01-13T14:26:45Z",
"events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/events",
"has_issues": true,
"issues_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues{/number}",
"labels_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/labels{/name}",
"merges_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/merges",
"mirror_url": null,
"updated_at": "2023-01-23T14:22:40Z",
"visibility": "public",
"archive_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/{archive_format}{/ref}",
"commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/commits{/sha}",
"compare_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/compare/{base}...{head}",
"description": "Node.js project with multiple example Trigger.dev workflows",
"forks_count": 0,
"is_template": false,
"open_issues": 3,
"branches_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/branches{/branch}",
"comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/comments{/number}",
"contents_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contents/{+path}",
"git_refs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/tags{/sha}",
"has_projects": true,
"releases_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/releases{/id}",
"statuses_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/{sha}",
"allow_forking": true,
"assignees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/assignees{/user}",
"downloads_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/downloads",
"has_downloads": false,
"languages_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/languages",
"default_branch": "main",
"milestones_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/milestones{/number}",
"stargazers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/stargazers",
"watchers_count": 1,
"deployments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/deployments",
"git_commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/commits{/sha}",
"has_discussions": false,
"subscribers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscribers",
"allow_auto_merge": false,
"contributors_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contributors",
"issue_events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/events{/number}",
"stargazers_count": 1,
"subscription_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscription",
"collaborators_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/collaborators{/collaborator}",
"issue_comment_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/comments{/number}",
"notifications_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/notifications{?since,all,participating}",
"open_issues_count": 3,
"allow_merge_commit": true,
"allow_rebase_merge": true,
"allow_squash_merge": true,
"merge_commit_title": "MERGE_MESSAGE",
"allow_update_branch": false,
"merge_commit_message": "PR_TITLE",
"delete_branch_on_merge": false,
"squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
"squash_merge_commit_message": "COMMIT_MESSAGES",
"web_commit_signoff_required": false,
"use_squash_pr_title_as_default": false
},
"user": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"type": "Organization",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"label": "triggerdotdev:resend"
},
"user": {
"id": 534,
"url": "https://api.github.com/users/ericallam",
"type": "User",
"login": "ericallam",
"node_id": "MDQ6VXNlcjUzNA==",
"html_url": "https://github.com/ericallam",
"gists_url": "https://api.github.com/users/ericallam/gists{/gist_id}",
"repos_url": "https://api.github.com/users/ericallam/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/534?v=4",
"events_url": "https://api.github.com/users/ericallam/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/ericallam/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/ericallam/followers",
"following_url": "https://api.github.com/users/ericallam/following{/other_user}",
"organizations_url": "https://api.github.com/users/ericallam/orgs",
"subscriptions_url": "https://api.github.com/users/ericallam/subscriptions",
"received_events_url": "https://api.github.com/users/ericallam/received_events"
},
"draft": false,
"state": "open",
"title": "Example PR",
"_links": {
"html": {
"href": "https://github.com/triggerdotdev/trigger.dev-examples/pull/4"
},
"self": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4"
},
"issue": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/4"
},
"commits": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4/commits"
},
"comments": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/4/comments"
},
"statuses": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/efc58e149c06f4a45ebf7a0bf34ac25cdcd34b07"
},
"review_comment": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/comments{/number}"
},
"review_comments": {
"href": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4/comments"
}
},
"labels": [],
"locked": false,
"merged": false,
"number": 4,
"commits": 1,
"node_id": "PR_kwDOIxVdCc5IY83X",
"assignee": null,
"comments": 0,
"diff_url": "https://github.com/triggerdotdev/trigger.dev-examples/pull/4.diff",
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples/pull/4",
"additions": 220,
"assignees": [],
"closed_at": null,
"deletions": 0,
"issue_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/4",
"mergeable": null,
"merged_at": null,
"merged_by": null,
"milestone": null,
"patch_url": "https://github.com/triggerdotdev/trigger.dev-examples/pull/4.patch",
"auto_merge": null,
"created_at": "2023-01-24T04:20:51Z",
"rebaseable": null,
"updated_at": "2023-01-24T04:20:51Z",
"commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4/commits",
"comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/4/comments",
"statuses_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/efc58e149c06f4a45ebf7a0bf34ac25cdcd34b07",
"changed_files": 3,
"mergeable_state": "unknown",
"requested_teams": [],
"review_comments": 0,
"merge_commit_sha": null,
"active_lock_reason": null,
"author_association": "MEMBER",
"review_comment_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/comments{/number}",
"requested_reviewers": [],
"review_comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls/4/comments",
"maintainer_can_modify": false
}
}
```
@@ -0,0 +1,311 @@
---
title: "Push Event"
sidebarTitle: "Pushes"
description: "Trigger a workflow whenever a push action is performed in a GitHub repository."
---
## Usage
```ts
import { github } from "@trigger.dev/integrations";
new Trigger({
id: "demo",
on: github.events.pushEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {},
}).listen();
```
## Params
<ParamField path="repo" type="string" required={true}>
The full path to the repository, including the organization
</ParamField>
## Event
<ResponseField name="ref" type="string">
The full git ref that was pushed. Example: refs/heads/master.
</ResponseField>
<ResponseField name="before" type="string">
The SHA of the commit before the push.
</ResponseField>
<ResponseField name="after" type="string">
The SHA of the commit after the push.
</ResponseField>
<ResponseField name="created" type="boolean">
Whether this was a created branch or tag.
</ResponseField>
<ResponseField name="deleted" type="boolean">
Whether this was a deleted branch or tag.
</ResponseField>
<ResponseField name="forced" type="boolean">
Whether this was a forced update or not.
</ResponseField>
<ResponseField name="base_ref" type="string">
If the ref is a branch, this is the branch name that the push was made to.
</ResponseField>
<ResponseField name="compare" type="string">
The HTTP URL to compare the two commits.
</ResponseField>
<ResponseField name="commits" type="array">
An array of commit objects describing the pushed commits.
</ResponseField>
<ResponseField name="head_commit" type="object">
The head commit object.
</ResponseField>
<ResponseField name="repository" type="object" required={true}>
A repository on GitHub.
</ResponseField>
<ResponseField name="sender" type="object" required={true}>
The GitHub user object who performed the action.
</ResponseField>
<ResponseField name="organization" type="object">
The organization object the repository belongs to.
</ResponseField>
## Example Workflows
<CodeGroup>
```typescript Notify Slack on new push
new Trigger({
id: "github-to-slack",
name: "Notify of new push",
on: github.events.pushEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {
await slack.postMessage("New push to trigger.dev", {
channel: "github-changes",
text: `New push to trigger.dev by ${event.sender.login}: ${event.compare}`,
});
},
}).listen();
```
</CodeGroup>
## Example Event payload
```json
{
"ref": "refs/heads/main",
"after": "4a0834a1daa09cdd1a03038dbc131f807d887de8",
"before": "e7c0680e23fcd3e52d35ddfbb4076112c640d9fa",
"forced": false,
"pusher": {
"name": "ericallam",
"email": "eallam@icloud.com"
},
"sender": {
"id": 534,
"url": "https://api.github.com/users/ericallam",
"type": "User",
"login": "ericallam",
"node_id": "MDQ6VXNlcjUzNA==",
"html_url": "https://github.com/ericallam",
"gists_url": "https://api.github.com/users/ericallam/gists{/gist_id}",
"repos_url": "https://api.github.com/users/ericallam/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/534?v=4",
"events_url": "https://api.github.com/users/ericallam/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/ericallam/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/ericallam/followers",
"following_url": "https://api.github.com/users/ericallam/following{/other_user}",
"organizations_url": "https://api.github.com/users/ericallam/orgs",
"subscriptions_url": "https://api.github.com/users/ericallam/subscriptions",
"received_events_url": "https://api.github.com/users/ericallam/received_events"
},
"commits": [
{
"id": "4a0834a1daa09cdd1a03038dbc131f807d887de8",
"url": "https://github.com/triggerdotdev/trigger.dev-examples/commit/4a0834a1daa09cdd1a03038dbc131f807d887de8",
"added": [],
"author": {
"name": "Eric Allam",
"email": "eallam@icloud.com",
"username": "ericallam"
},
"message": "Add some documentation for how to run (needs work)",
"removed": [],
"tree_id": "5c06942324e80422eea4f4c11ff80d4bd8f9d7a7",
"distinct": true,
"modified": [
"README.md",
"pnpm-lock.yaml",
"src/examples/github-webhook.ts"
],
"committer": {
"name": "Eric Allam",
"email": "eallam@icloud.com",
"username": "ericallam"
},
"timestamp": "2023-01-24T04:43:40Z"
}
],
"compare": "https://github.com/triggerdotdev/trigger.dev-examples/compare/e7c0680e23fc...4a0834a1daa0",
"created": false,
"deleted": false,
"base_ref": null,
"repository": {
"id": 588602633,
"url": "https://github.com/triggerdotdev/trigger.dev-examples",
"fork": false,
"name": "trigger.dev-examples",
"size": 161,
"forks": 0,
"owner": {
"id": 95297378,
"url": "https://api.github.com/users/triggerdotdev",
"name": "triggerdotdev",
"type": "Organization",
"email": "hello@trigger.dev",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"html_url": "https://github.com/triggerdotdev",
"gists_url": "https://api.github.com/users/triggerdotdev/gists{/gist_id}",
"repos_url": "https://api.github.com/users/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/users/triggerdotdev/events{/privacy}",
"site_admin": false,
"gravatar_id": "",
"starred_url": "https://api.github.com/users/triggerdotdev/starred{/owner}{/repo}",
"followers_url": "https://api.github.com/users/triggerdotdev/followers",
"following_url": "https://api.github.com/users/triggerdotdev/following{/other_user}",
"organizations_url": "https://api.github.com/users/triggerdotdev/orgs",
"subscriptions_url": "https://api.github.com/users/triggerdotdev/subscriptions",
"received_events_url": "https://api.github.com/users/triggerdotdev/received_events"
},
"topics": [],
"git_url": "git://github.com/triggerdotdev/trigger.dev-examples.git",
"license": null,
"node_id": "R_kgDOIxVdCQ",
"private": false,
"ssh_url": "git@github.com:triggerdotdev/trigger.dev-examples.git",
"svn_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"archived": false,
"disabled": false,
"has_wiki": false,
"homepage": null,
"html_url": "https://github.com/triggerdotdev/trigger.dev-examples",
"keys_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/keys{/key_id}",
"language": "TypeScript",
"tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/tags",
"watchers": 1,
"blobs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/blobs{/sha}",
"clone_url": "https://github.com/triggerdotdev/trigger.dev-examples.git",
"forks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/forks",
"full_name": "triggerdotdev/trigger.dev-examples",
"has_pages": false,
"hooks_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/hooks",
"pulls_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/pulls{/number}",
"pushed_at": 1674535423,
"teams_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/teams",
"trees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/trees{/sha}",
"created_at": 1673620005,
"events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/events",
"has_issues": true,
"issues_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues{/number}",
"labels_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/labels{/name}",
"merges_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/merges",
"mirror_url": null,
"stargazers": 1,
"updated_at": "2023-01-23T14:22:40Z",
"visibility": "public",
"archive_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/{archive_format}{/ref}",
"commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/commits{/sha}",
"compare_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/compare/{base}...{head}",
"description": "Node.js project with multiple example Trigger.dev workflows",
"forks_count": 0,
"is_template": false,
"open_issues": 2,
"branches_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/branches{/branch}",
"comments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/comments{/number}",
"contents_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contents/{+path}",
"git_refs_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/tags{/sha}",
"has_projects": true,
"organization": "triggerdotdev",
"releases_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/releases{/id}",
"statuses_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/statuses/{sha}",
"allow_forking": true,
"assignees_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/assignees{/user}",
"downloads_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/downloads",
"has_downloads": false,
"languages_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/languages",
"master_branch": "main",
"default_branch": "main",
"milestones_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/milestones{/number}",
"stargazers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/stargazers",
"watchers_count": 1,
"deployments_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/deployments",
"git_commits_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/git/commits{/sha}",
"has_discussions": false,
"subscribers_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscribers",
"contributors_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/contributors",
"issue_events_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/events{/number}",
"stargazers_count": 1,
"subscription_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/subscription",
"collaborators_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/collaborators{/collaborator}",
"issue_comment_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/issues/comments{/number}",
"notifications_url": "https://api.github.com/repos/triggerdotdev/trigger.dev-examples/notifications{?since,all,participating}",
"open_issues_count": 2,
"web_commit_signoff_required": false
},
"head_commit": {
"id": "4a0834a1daa09cdd1a03038dbc131f807d887de8",
"url": "https://github.com/triggerdotdev/trigger.dev-examples/commit/4a0834a1daa09cdd1a03038dbc131f807d887de8",
"added": [],
"author": {
"name": "Eric Allam",
"email": "eallam@icloud.com",
"username": "ericallam"
},
"message": "Add some documentation for how to run (needs work)",
"removed": [],
"tree_id": "5c06942324e80422eea4f4c11ff80d4bd8f9d7a7",
"distinct": true,
"modified": [
"README.md",
"pnpm-lock.yaml",
"src/examples/github-webhook.ts"
],
"committer": {
"name": "Eric Allam",
"email": "eallam@icloud.com",
"username": "ericallam"
},
"timestamp": "2023-01-24T04:43:40Z"
},
"organization": {
"id": 95297378,
"url": "https://api.github.com/orgs/triggerdotdev",
"login": "triggerdotdev",
"node_id": "O_kgDOBa4fYg",
"hooks_url": "https://api.github.com/orgs/triggerdotdev/hooks",
"repos_url": "https://api.github.com/orgs/triggerdotdev/repos",
"avatar_url": "https://avatars.githubusercontent.com/u/95297378?v=4",
"events_url": "https://api.github.com/orgs/triggerdotdev/events",
"issues_url": "https://api.github.com/orgs/triggerdotdev/issues",
"description": "",
"members_url": "https://api.github.com/orgs/triggerdotdev/members{/member}",
"public_members_url": "https://api.github.com/orgs/triggerdotdev/public_members{/member}"
}
}
```
+24 -5
View File
@@ -39,11 +39,19 @@
"navigation": [
{
"group": "Getting Started",
"pages": ["welcome", "getting-started", "get-help"]
"pages": [
"welcome",
"getting-started",
"get-help"
]
},
{
"group": "Examples",
"pages": ["examples/github", "examples/shopify", "examples/slack"]
"pages": [
"examples/github",
"examples/shopify",
"examples/slack"
]
},
{
"group": "Triggers",
@@ -61,7 +69,9 @@
"pages": [
{
"group": "Slack",
"pages": ["integrations/apis/slack/actions/post-message"]
"pages": [
"integrations/apis/slack/actions/post-message"
]
}
]
},
@@ -80,7 +90,11 @@
},
{
"group": "Guides",
"pages": ["guides/resumability", "guides/zod", "guides/event-driven"]
"pages": [
"guides/resumability",
"guides/zod",
"guides/event-driven"
]
},
{
"group": "Webhook Catalog",
@@ -88,7 +102,12 @@
{
"group": "GitHub",
"pages": [
"integrations/apis/github/events/push",
"integrations/apis/github/events/issues",
"integrations/apis/github/events/issue-comments",
"integrations/apis/github/events/pull-requests",
"integrations/apis/github/events/pull-request-reviews",
"integrations/apis/github/events/pull-request-comments",
"integrations/apis/github/events/new-star"
]
}
@@ -100,4 +119,4 @@
"github": "https://github.com/triggerdotdev/trigger.dev",
"discord": "https://discord.gg/nkqV9xBYWy"
}
}
}
+16
View File
@@ -17,6 +17,22 @@ new Trigger({
},
}).listen();
new Trigger({
id: "github-issue-comment",
name: "GitHub issue comment: triggerdotdev/trigger.dev-examples",
apiKey: "trigger_dev_zC25mKNn6c0q",
endpoint: "ws://localhost:8889/ws",
logLevel: "debug",
on: github.events.issueCommentEvent({
repo: "triggerdotdev/trigger.dev-examples",
}),
run: async (event, ctx) => {
await ctx.logger.info(`Action was ${event.action}`);
return {};
},
}).listen();
new Trigger({
id: "github-webhook-pull_request",
name: "GitHub PR: triggerdotdev/trigger.dev-examples",