From 0ad09eb11f99ebdf0fb51dc2a09d752ad2ab4cf5 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 21 Jun 2023 19:41:33 +0100 Subject: [PATCH] Pull request event --- examples/nextjs-example/src/jobs/github.ts | 14 + integrations/github/src/index.ts | 45 ++ integrations/github/src/webhook-examples.ts | 647 ++++++++++++++++++++ 3 files changed, 706 insertions(+) diff --git a/examples/nextjs-example/src/jobs/github.ts b/examples/nextjs-example/src/jobs/github.ts index 769ea3e25..7e6ae5a90 100644 --- a/examples/nextjs-example/src/jobs/github.ts +++ b/examples/nextjs-example/src/jobs/github.ts @@ -147,3 +147,17 @@ new Job(client, { return { payload, ctx }; }, }); + +new Job(client, { + id: "github-integration-on-pull-request", + name: "GitHub Integration - On Pull Request", + version: "0.1.0", + trigger: githubApiKey.triggers.repo({ + event: events.onPullRequest, + repo: "triggerdotdev/empty", + }), + run: async (payload, io, ctx) => { + await io.logger.info("This is a simple log info message"); + return { payload, ctx }; + }, +}); diff --git a/integrations/github/src/index.ts b/integrations/github/src/index.ts index f128eabb3..0a584d367 100644 --- a/integrations/github/src/index.ts +++ b/integrations/github/src/index.ts @@ -5,6 +5,7 @@ import { IssuesAssignedEvent, IssuesEvent, IssuesOpenedEvent, + PullRequestEvent, PushEvent, RepositoryCreatedEvent, StarCreatedEvent, @@ -24,6 +25,7 @@ import { issueCommentCreated, issueOpened, newBranch, + pullRequestOpened, push, starredRepo, } from "./webhook-examples"; @@ -325,6 +327,47 @@ const onPush: EventSpecification = { }, }; +const onPullRequest: EventSpecification = { + name: "pull_request", + title: "On pull request", + source: "github.com", + icon: "github", + examples: [pullRequestOpened], + parsePayload: (payload) => payload as PullRequestEvent, + runProperties: (payload) => [ + { + label: "Repo", + text: payload.repository.name, + url: payload.repository.url, + }, + { + label: "action", + text: payload.action, + }, + { + label: "Number", + text: `${payload.number}`, + }, + { + label: "Title", + text: payload.pull_request.title, + }, + { + label: "Author", + text: payload.pull_request.user.login, + url: payload.pull_request.user.html_url, + }, + { + label: "Commits", + text: `${payload.pull_request.commits}`, + }, + { + label: "Body", + text: truncate(payload.pull_request.body ?? "none", 40), + }, + ], +}; + export const events = { /** When any action is performed on an issue */ onIssue, @@ -346,6 +389,8 @@ export const events = { onNewBranch, /** When a push is made to a repo */ onPush, + /** When activity occurs on a pull request. Doesn't include reviews, issues or comments. */ + onPullRequest, }; // params.event has to be a union of all the values of the exports events object diff --git a/integrations/github/src/webhook-examples.ts b/integrations/github/src/webhook-examples.ts index 8b228111f..c07d5468c 100644 --- a/integrations/github/src/webhook-examples.ts +++ b/integrations/github/src/webhook-examples.ts @@ -1528,3 +1528,650 @@ export const push: EventSpecificationExample = { }, }, }; + +export const pullRequestOpened: EventSpecificationExample = { + id: "pull_request.opened", + name: "Pull request opened", + payload: { + action: "opened", + number: 5, + sender: { + 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", + }, + repository: { + id: 656732269, + url: "https://api.github.com/repos/triggerdotdev/empty", + fork: false, + name: "empty", + size: 0, + 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/empty.git", + license: null, + node_id: "R_kgDOJyTwbQ", + private: false, + ssh_url: "git@github.com:triggerdotdev/empty.git", + svn_url: "https://github.com/triggerdotdev/empty", + archived: false, + disabled: false, + has_wiki: true, + homepage: null, + html_url: "https://github.com/triggerdotdev/empty", + keys_url: + "https://api.github.com/repos/triggerdotdev/empty/keys{/key_id}", + language: null, + tags_url: "https://api.github.com/repos/triggerdotdev/empty/tags", + watchers: 0, + blobs_url: + "https://api.github.com/repos/triggerdotdev/empty/git/blobs{/sha}", + clone_url: "https://github.com/triggerdotdev/empty.git", + forks_url: "https://api.github.com/repos/triggerdotdev/empty/forks", + full_name: "triggerdotdev/empty", + has_pages: false, + hooks_url: "https://api.github.com/repos/triggerdotdev/empty/hooks", + pulls_url: + "https://api.github.com/repos/triggerdotdev/empty/pulls{/number}", + pushed_at: "2023-06-21T18:38:34Z", + teams_url: "https://api.github.com/repos/triggerdotdev/empty/teams", + trees_url: + "https://api.github.com/repos/triggerdotdev/empty/git/trees{/sha}", + created_at: "2023-06-21T14:21:07Z", + events_url: "https://api.github.com/repos/triggerdotdev/empty/events", + has_issues: true, + issues_url: + "https://api.github.com/repos/triggerdotdev/empty/issues{/number}", + labels_url: + "https://api.github.com/repos/triggerdotdev/empty/labels{/name}", + merges_url: "https://api.github.com/repos/triggerdotdev/empty/merges", + mirror_url: null, + updated_at: "2023-06-21T17:23:26Z", + visibility: "public", + archive_url: + "https://api.github.com/repos/triggerdotdev/empty/{archive_format}{/ref}", + commits_url: + "https://api.github.com/repos/triggerdotdev/empty/commits{/sha}", + compare_url: + "https://api.github.com/repos/triggerdotdev/empty/compare/{base}...{head}", + description: + "An empty repo that can be used to test the @trigger.dev/github integration", + forks_count: 0, + is_template: false, + open_issues: 5, + branches_url: + "https://api.github.com/repos/triggerdotdev/empty/branches{/branch}", + comments_url: + "https://api.github.com/repos/triggerdotdev/empty/comments{/number}", + contents_url: + "https://api.github.com/repos/triggerdotdev/empty/contents/{+path}", + git_refs_url: + "https://api.github.com/repos/triggerdotdev/empty/git/refs{/sha}", + git_tags_url: + "https://api.github.com/repos/triggerdotdev/empty/git/tags{/sha}", + has_projects: true, + releases_url: + "https://api.github.com/repos/triggerdotdev/empty/releases{/id}", + statuses_url: + "https://api.github.com/repos/triggerdotdev/empty/statuses/{sha}", + allow_forking: true, + assignees_url: + "https://api.github.com/repos/triggerdotdev/empty/assignees{/user}", + downloads_url: + "https://api.github.com/repos/triggerdotdev/empty/downloads", + has_downloads: true, + languages_url: + "https://api.github.com/repos/triggerdotdev/empty/languages", + default_branch: "main", + milestones_url: + "https://api.github.com/repos/triggerdotdev/empty/milestones{/number}", + stargazers_url: + "https://api.github.com/repos/triggerdotdev/empty/stargazers", + watchers_count: 0, + deployments_url: + "https://api.github.com/repos/triggerdotdev/empty/deployments", + git_commits_url: + "https://api.github.com/repos/triggerdotdev/empty/git/commits{/sha}", + has_discussions: false, + subscribers_url: + "https://api.github.com/repos/triggerdotdev/empty/subscribers", + contributors_url: + "https://api.github.com/repos/triggerdotdev/empty/contributors", + issue_events_url: + "https://api.github.com/repos/triggerdotdev/empty/issues/events{/number}", + stargazers_count: 0, + subscription_url: + "https://api.github.com/repos/triggerdotdev/empty/subscription", + collaborators_url: + "https://api.github.com/repos/triggerdotdev/empty/collaborators{/collaborator}", + issue_comment_url: + "https://api.github.com/repos/triggerdotdev/empty/issues/comments{/number}", + notifications_url: + "https://api.github.com/repos/triggerdotdev/empty/notifications{?since,all,participating}", + open_issues_count: 5, + 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: 1402223044, + url: "https://api.github.com/repos/triggerdotdev/empty/pulls/5", + base: { + ref: "main", + sha: "1ca6a91f4a1385e448364a5de1960a3da60d3fe2", + repo: { + id: 656732269, + url: "https://api.github.com/repos/triggerdotdev/empty", + fork: false, + name: "empty", + size: 0, + 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/empty.git", + license: null, + node_id: "R_kgDOJyTwbQ", + private: false, + ssh_url: "git@github.com:triggerdotdev/empty.git", + svn_url: "https://github.com/triggerdotdev/empty", + archived: false, + disabled: false, + has_wiki: true, + homepage: null, + html_url: "https://github.com/triggerdotdev/empty", + keys_url: + "https://api.github.com/repos/triggerdotdev/empty/keys{/key_id}", + language: null, + tags_url: "https://api.github.com/repos/triggerdotdev/empty/tags", + watchers: 0, + blobs_url: + "https://api.github.com/repos/triggerdotdev/empty/git/blobs{/sha}", + clone_url: "https://github.com/triggerdotdev/empty.git", + forks_url: "https://api.github.com/repos/triggerdotdev/empty/forks", + full_name: "triggerdotdev/empty", + has_pages: false, + hooks_url: "https://api.github.com/repos/triggerdotdev/empty/hooks", + pulls_url: + "https://api.github.com/repos/triggerdotdev/empty/pulls{/number}", + pushed_at: "2023-06-21T18:38:34Z", + teams_url: "https://api.github.com/repos/triggerdotdev/empty/teams", + trees_url: + "https://api.github.com/repos/triggerdotdev/empty/git/trees{/sha}", + created_at: "2023-06-21T14:21:07Z", + events_url: "https://api.github.com/repos/triggerdotdev/empty/events", + has_issues: true, + issues_url: + "https://api.github.com/repos/triggerdotdev/empty/issues{/number}", + labels_url: + "https://api.github.com/repos/triggerdotdev/empty/labels{/name}", + merges_url: "https://api.github.com/repos/triggerdotdev/empty/merges", + mirror_url: null, + updated_at: "2023-06-21T17:23:26Z", + visibility: "public", + archive_url: + "https://api.github.com/repos/triggerdotdev/empty/{archive_format}{/ref}", + commits_url: + "https://api.github.com/repos/triggerdotdev/empty/commits{/sha}", + compare_url: + "https://api.github.com/repos/triggerdotdev/empty/compare/{base}...{head}", + description: + "An empty repo that can be used to test the @trigger.dev/github integration", + forks_count: 0, + is_template: false, + open_issues: 5, + branches_url: + "https://api.github.com/repos/triggerdotdev/empty/branches{/branch}", + comments_url: + "https://api.github.com/repos/triggerdotdev/empty/comments{/number}", + contents_url: + "https://api.github.com/repos/triggerdotdev/empty/contents/{+path}", + git_refs_url: + "https://api.github.com/repos/triggerdotdev/empty/git/refs{/sha}", + git_tags_url: + "https://api.github.com/repos/triggerdotdev/empty/git/tags{/sha}", + has_projects: true, + releases_url: + "https://api.github.com/repos/triggerdotdev/empty/releases{/id}", + statuses_url: + "https://api.github.com/repos/triggerdotdev/empty/statuses/{sha}", + allow_forking: true, + assignees_url: + "https://api.github.com/repos/triggerdotdev/empty/assignees{/user}", + downloads_url: + "https://api.github.com/repos/triggerdotdev/empty/downloads", + has_downloads: true, + languages_url: + "https://api.github.com/repos/triggerdotdev/empty/languages", + default_branch: "main", + milestones_url: + "https://api.github.com/repos/triggerdotdev/empty/milestones{/number}", + stargazers_url: + "https://api.github.com/repos/triggerdotdev/empty/stargazers", + watchers_count: 0, + deployments_url: + "https://api.github.com/repos/triggerdotdev/empty/deployments", + git_commits_url: + "https://api.github.com/repos/triggerdotdev/empty/git/commits{/sha}", + has_discussions: false, + subscribers_url: + "https://api.github.com/repos/triggerdotdev/empty/subscribers", + allow_auto_merge: false, + contributors_url: + "https://api.github.com/repos/triggerdotdev/empty/contributors", + issue_events_url: + "https://api.github.com/repos/triggerdotdev/empty/issues/events{/number}", + stargazers_count: 0, + subscription_url: + "https://api.github.com/repos/triggerdotdev/empty/subscription", + collaborators_url: + "https://api.github.com/repos/triggerdotdev/empty/collaborators{/collaborator}", + issue_comment_url: + "https://api.github.com/repos/triggerdotdev/empty/issues/comments{/number}", + notifications_url: + "https://api.github.com/repos/triggerdotdev/empty/notifications{?since,all,participating}", + open_issues_count: 5, + 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: "A bit more added to the readme which could be useful", + head: { + ref: "test", + sha: "073aa42afebca03c4b34361564e3976da5c65d48", + repo: { + id: 656732269, + url: "https://api.github.com/repos/triggerdotdev/empty", + fork: false, + name: "empty", + size: 0, + 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/empty.git", + license: null, + node_id: "R_kgDOJyTwbQ", + private: false, + ssh_url: "git@github.com:triggerdotdev/empty.git", + svn_url: "https://github.com/triggerdotdev/empty", + archived: false, + disabled: false, + has_wiki: true, + homepage: null, + html_url: "https://github.com/triggerdotdev/empty", + keys_url: + "https://api.github.com/repos/triggerdotdev/empty/keys{/key_id}", + language: null, + tags_url: "https://api.github.com/repos/triggerdotdev/empty/tags", + watchers: 0, + blobs_url: + "https://api.github.com/repos/triggerdotdev/empty/git/blobs{/sha}", + clone_url: "https://github.com/triggerdotdev/empty.git", + forks_url: "https://api.github.com/repos/triggerdotdev/empty/forks", + full_name: "triggerdotdev/empty", + has_pages: false, + hooks_url: "https://api.github.com/repos/triggerdotdev/empty/hooks", + pulls_url: + "https://api.github.com/repos/triggerdotdev/empty/pulls{/number}", + pushed_at: "2023-06-21T18:38:34Z", + teams_url: "https://api.github.com/repos/triggerdotdev/empty/teams", + trees_url: + "https://api.github.com/repos/triggerdotdev/empty/git/trees{/sha}", + created_at: "2023-06-21T14:21:07Z", + events_url: "https://api.github.com/repos/triggerdotdev/empty/events", + has_issues: true, + issues_url: + "https://api.github.com/repos/triggerdotdev/empty/issues{/number}", + labels_url: + "https://api.github.com/repos/triggerdotdev/empty/labels{/name}", + merges_url: "https://api.github.com/repos/triggerdotdev/empty/merges", + mirror_url: null, + updated_at: "2023-06-21T17:23:26Z", + visibility: "public", + archive_url: + "https://api.github.com/repos/triggerdotdev/empty/{archive_format}{/ref}", + commits_url: + "https://api.github.com/repos/triggerdotdev/empty/commits{/sha}", + compare_url: + "https://api.github.com/repos/triggerdotdev/empty/compare/{base}...{head}", + description: + "An empty repo that can be used to test the @trigger.dev/github integration", + forks_count: 0, + is_template: false, + open_issues: 5, + branches_url: + "https://api.github.com/repos/triggerdotdev/empty/branches{/branch}", + comments_url: + "https://api.github.com/repos/triggerdotdev/empty/comments{/number}", + contents_url: + "https://api.github.com/repos/triggerdotdev/empty/contents/{+path}", + git_refs_url: + "https://api.github.com/repos/triggerdotdev/empty/git/refs{/sha}", + git_tags_url: + "https://api.github.com/repos/triggerdotdev/empty/git/tags{/sha}", + has_projects: true, + releases_url: + "https://api.github.com/repos/triggerdotdev/empty/releases{/id}", + statuses_url: + "https://api.github.com/repos/triggerdotdev/empty/statuses/{sha}", + allow_forking: true, + assignees_url: + "https://api.github.com/repos/triggerdotdev/empty/assignees{/user}", + downloads_url: + "https://api.github.com/repos/triggerdotdev/empty/downloads", + has_downloads: true, + languages_url: + "https://api.github.com/repos/triggerdotdev/empty/languages", + default_branch: "main", + milestones_url: + "https://api.github.com/repos/triggerdotdev/empty/milestones{/number}", + stargazers_url: + "https://api.github.com/repos/triggerdotdev/empty/stargazers", + watchers_count: 0, + deployments_url: + "https://api.github.com/repos/triggerdotdev/empty/deployments", + git_commits_url: + "https://api.github.com/repos/triggerdotdev/empty/git/commits{/sha}", + has_discussions: false, + subscribers_url: + "https://api.github.com/repos/triggerdotdev/empty/subscribers", + allow_auto_merge: false, + contributors_url: + "https://api.github.com/repos/triggerdotdev/empty/contributors", + issue_events_url: + "https://api.github.com/repos/triggerdotdev/empty/issues/events{/number}", + stargazers_count: 0, + subscription_url: + "https://api.github.com/repos/triggerdotdev/empty/subscription", + collaborators_url: + "https://api.github.com/repos/triggerdotdev/empty/collaborators{/collaborator}", + issue_comment_url: + "https://api.github.com/repos/triggerdotdev/empty/issues/comments{/number}", + notifications_url: + "https://api.github.com/repos/triggerdotdev/empty/notifications{?since,all,participating}", + open_issues_count: 5, + 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:test", + }, + 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", + }, + draft: false, + state: "open", + title: "Added more to the readme", + _links: { + html: { + href: "https://github.com/triggerdotdev/empty/pull/5", + }, + self: { + href: "https://api.github.com/repos/triggerdotdev/empty/pulls/5", + }, + issue: { + href: "https://api.github.com/repos/triggerdotdev/empty/issues/5", + }, + commits: { + href: "https://api.github.com/repos/triggerdotdev/empty/pulls/5/commits", + }, + comments: { + href: "https://api.github.com/repos/triggerdotdev/empty/issues/5/comments", + }, + statuses: { + href: "https://api.github.com/repos/triggerdotdev/empty/statuses/073aa42afebca03c4b34361564e3976da5c65d48", + }, + review_comment: { + href: "https://api.github.com/repos/triggerdotdev/empty/pulls/comments{/number}", + }, + review_comments: { + href: "https://api.github.com/repos/triggerdotdev/empty/pulls/5/comments", + }, + }, + labels: [], + locked: false, + merged: false, + number: 5, + commits: 1, + node_id: "PR_kwDOJyTwbc5TlDnE", + assignee: null, + comments: 0, + diff_url: "https://github.com/triggerdotdev/empty/pull/5.diff", + html_url: "https://github.com/triggerdotdev/empty/pull/5", + additions: 2, + assignees: [], + closed_at: null, + deletions: 0, + issue_url: "https://api.github.com/repos/triggerdotdev/empty/issues/5", + mergeable: null, + merged_at: null, + merged_by: null, + milestone: null, + patch_url: "https://github.com/triggerdotdev/empty/pull/5.patch", + auto_merge: null, + created_at: "2023-06-21T18:39:13Z", + rebaseable: null, + updated_at: "2023-06-21T18:39:13Z", + commits_url: + "https://api.github.com/repos/triggerdotdev/empty/pulls/5/commits", + comments_url: + "https://api.github.com/repos/triggerdotdev/empty/issues/5/comments", + statuses_url: + "https://api.github.com/repos/triggerdotdev/empty/statuses/073aa42afebca03c4b34361564e3976da5c65d48", + changed_files: 1, + 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/empty/pulls/comments{/number}", + requested_reviewers: [], + review_comments_url: + "https://api.github.com/repos/triggerdotdev/empty/pulls/5/comments", + maintainer_can_modify: false, + }, + }, +};