Skip to content

Commit a07fe60

Browse files
committed
chore: update package file
1 parent d4ccfa9 commit a07fe60

File tree

4 files changed

+245
-16
lines changed

4 files changed

+245
-16
lines changed

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "github-webhook-handler",
2+
"name": "@duxcore/github-webhook-handler",
33
"version": "1.0.0",
44
"description": "Web handler / middleware for processing GitHub Webhooks",
55
"main": "lib/index.js",
@@ -13,10 +13,9 @@
1313
"github",
1414
"webhooks"
1515
],
16-
"author": "Rod Vagg <[email protected]> (http://r.va.gg)",
1716
"repository": {
1817
"type": "git",
19-
"url": "https://github.com/rvagg/github-webhook-handler.git"
18+
"url": "git://github.com/duxcore/github-webhook-handler.git"
2019
},
2120
"license": "MIT",
2221
"dependencies": {

src/types/factories/CheckRunEntity.ts

+200
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
export interface CheckRunEntitiy {
2+
id: number;
3+
node_id: string;
4+
head_sha: string;
5+
external_id: string;
6+
url: string;
7+
html_url: string;
8+
details_url: string;
9+
status: string;
10+
conclusion?: null;
11+
started_at: string;
12+
completed_at?: null;
13+
output: Output;
14+
name: string;
15+
check_suite: CheckSuite;
16+
app: App;
17+
pull_requests?: (PullRequestsEntity)[] | null;
18+
deployment: Deployment;
19+
}
20+
export interface Output {
21+
title?: null;
22+
summary?: null;
23+
text?: null;
24+
annotations_count: number;
25+
annotations_url: string;
26+
}
27+
export interface CheckSuite {
28+
id: number;
29+
node_id: string;
30+
head_branch: string;
31+
head_sha: string;
32+
status: string;
33+
conclusion?: null;
34+
url: string;
35+
before: string;
36+
after: string;
37+
pull_requests?: (PullRequestsEntity)[] | null;
38+
app: App;
39+
created_at: string;
40+
updated_at: string;
41+
}
42+
export interface PullRequestsEntity {
43+
url: string;
44+
id: number;
45+
number: number;
46+
head: HeadOrBase;
47+
base: HeadOrBase;
48+
}
49+
export interface HeadOrBase {
50+
ref: string;
51+
sha: string;
52+
repo: Repo;
53+
}
54+
export interface Repo {
55+
id: number;
56+
url: string;
57+
name: string;
58+
}
59+
export interface App {
60+
id: number;
61+
node_id: string;
62+
owner: OwnerOrSender;
63+
name: string;
64+
description: string;
65+
external_url: string;
66+
html_url: string;
67+
created_at: string;
68+
updated_at: string;
69+
permissions: Permissions;
70+
events?: (null)[] | null;
71+
}
72+
export interface OwnerOrSender {
73+
login: string;
74+
id: number;
75+
node_id: string;
76+
avatar_url: string;
77+
gravatar_id: string;
78+
url: string;
79+
html_url: string;
80+
followers_url: string;
81+
following_url: string;
82+
gists_url: string;
83+
starred_url: string;
84+
subscriptions_url: string;
85+
organizations_url: string;
86+
repos_url: string;
87+
events_url: string;
88+
received_events_url: string;
89+
type: string;
90+
site_admin: boolean;
91+
}
92+
export interface Permissions {
93+
administration: string;
94+
checks: string;
95+
contents: string;
96+
deployments: string;
97+
issues: string;
98+
members: string;
99+
metadata: string;
100+
organization_administration: string;
101+
organization_hooks: string;
102+
organization_plan: string;
103+
organization_projects: string;
104+
organization_user_blocking: string;
105+
pages: string;
106+
pull_requests: string;
107+
repository_hooks: string;
108+
repository_projects: string;
109+
statuses: string;
110+
team_discussions: string;
111+
vulnerability_alerts: string;
112+
}
113+
export interface Deployment {
114+
url: string;
115+
id: number;
116+
node_id: string;
117+
task: string;
118+
original_environment: string;
119+
environment: string;
120+
description?: null;
121+
created_at: string;
122+
updated_at: string;
123+
statuses_url: string;
124+
repository_url: string;
125+
}
126+
export interface Repository {
127+
id: number;
128+
node_id: string;
129+
name: string;
130+
full_name: string;
131+
private: boolean;
132+
owner: OwnerOrSender;
133+
html_url: string;
134+
description?: null;
135+
fork: boolean;
136+
url: string;
137+
forks_url: string;
138+
keys_url: string;
139+
collaborators_url: string;
140+
teams_url: string;
141+
hooks_url: string;
142+
issue_events_url: string;
143+
events_url: string;
144+
assignees_url: string;
145+
branches_url: string;
146+
tags_url: string;
147+
blobs_url: string;
148+
git_tags_url: string;
149+
git_refs_url: string;
150+
trees_url: string;
151+
statuses_url: string;
152+
languages_url: string;
153+
stargazers_url: string;
154+
contributors_url: string;
155+
subscribers_url: string;
156+
subscription_url: string;
157+
commits_url: string;
158+
git_commits_url: string;
159+
comments_url: string;
160+
issue_comment_url: string;
161+
contents_url: string;
162+
compare_url: string;
163+
merges_url: string;
164+
archive_url: string;
165+
downloads_url: string;
166+
issues_url: string;
167+
pulls_url: string;
168+
milestones_url: string;
169+
notifications_url: string;
170+
labels_url: string;
171+
releases_url: string;
172+
deployments_url: string;
173+
created_at: string;
174+
updated_at: string;
175+
pushed_at: string;
176+
git_url: string;
177+
ssh_url: string;
178+
clone_url: string;
179+
svn_url: string;
180+
homepage?: null;
181+
size: number;
182+
stargazers_count: number;
183+
watchers_count: number;
184+
language: string;
185+
has_issues: boolean;
186+
has_projects: boolean;
187+
has_downloads: boolean;
188+
has_wiki: boolean;
189+
has_pages: boolean;
190+
forks_count: number;
191+
mirror_url?: null;
192+
archived: boolean;
193+
disabled: boolean;
194+
open_issues_count: number;
195+
license?: null;
196+
forks: number;
197+
open_issues: number;
198+
watchers: number;
199+
default_branch: string;
200+
}
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { App, PullRequestsEntity } from "./CheckRunEntity";
2+
3+
export interface CheckSuite {
4+
id: number;
5+
node_id: string;
6+
head_branch: string;
7+
head_sha: string;
8+
status: string;
9+
conclusion?: null;
10+
url: string;
11+
before: string;
12+
after: string;
13+
pull_requests?: (PullRequestsEntity)[] | null;
14+
app: App;
15+
created_at: string;
16+
updated_at: string;
17+
}

src/types/rawGitHubPayloads.ts

+26-13
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ export interface RawGitHubRepositoryForked extends ActionlessPayloadBase {
7070
type RGT<E extends keyof RawGitHubTypes, A extends keyof RawGitHubTypes[E]> = RawGitHubTypes[E][A]
7171

7272
export type RawGitHubTypes = PayloadInjector<{
73+
/**
74+
* Branch Protection Rules
75+
*/
7376
branch_protection_rule: CommonTypeInjector<{
7477
created: {},
7578
edit: {
@@ -83,7 +86,17 @@ export type RawGitHubTypes = PayloadInjector<{
8386
}, { rule: BranchProtectionRuleEntity }>
8487

8588
/**
86-
* ISSUES
89+
* Check Runs
90+
*/
91+
check_run: {
92+
created: {}
93+
completed: {}
94+
rerequested: {}
95+
requested_action: {}
96+
}
97+
98+
/**
99+
* Issues
87100
*/
88101
issues: CommonTypeInjector<{
89102
opened: {};
@@ -120,7 +133,7 @@ export type RawGitHubTypes = PayloadInjector<{
120133
}, { issue: IssueEntity }>;
121134

122135
/**
123-
* ISSUE COMMENTS
136+
* Issue Comments
124137
*/
125138
issue_comment: CommonTypeInjector<{
126139
created: {
@@ -141,7 +154,7 @@ export type RawGitHubTypes = PayloadInjector<{
141154
}>;
142155

143156
/**
144-
* LABELS
157+
* Labels
145158
*/
146159
label: CommonTypeInjector<{
147160
created: {};
@@ -162,7 +175,7 @@ export type RawGitHubTypes = PayloadInjector<{
162175
}, { label: LabelEntity; }>;
163176

164177
/**
165-
* MILESTONES
178+
* Milestones
166179
*/
167180
milestone: CommonTypeInjector<{
168181
created: {},
@@ -182,7 +195,7 @@ export type RawGitHubTypes = PayloadInjector<{
182195
}>;
183196

184197
/**
185-
* PROJECTS
198+
* Projects
186199
*/
187200
project: CommonTypeInjector<{
188201
created: {}
@@ -204,7 +217,7 @@ export type RawGitHubTypes = PayloadInjector<{
204217
}>;
205218

206219
/**
207-
* PROJECT CARDS
220+
* Project Cards
208221
*/
209222
project_card: {
210223
created: {
@@ -230,7 +243,7 @@ export type RawGitHubTypes = PayloadInjector<{
230243
};
231244

232245
/**
233-
* PROJECT COLUMNS
246+
* Project Columns
234247
*/
235248
project_column: CommonTypeInjector<{
236249
created: {};
@@ -249,7 +262,7 @@ export type RawGitHubTypes = PayloadInjector<{
249262
}>
250263

251264
/**
252-
* REPOSITORY STARS
265+
* Repository Stars
253266
*/
254267
star: {
255268
created: {
@@ -261,7 +274,7 @@ export type RawGitHubTypes = PayloadInjector<{
261274
};
262275

263276
/**
264-
* REPOSITORY
277+
* Repository
265278
*/
266279
repository:{
267280
created: {}
@@ -276,7 +289,7 @@ export type RawGitHubTypes = PayloadInjector<{
276289
}
277290

278291
/**
279-
* PULL REQUESTS
292+
* Pull Requests
280293
*/
281294
pull_request: CommonTypeInjector<{
282295
opened: {};
@@ -317,7 +330,7 @@ export type RawGitHubTypes = PayloadInjector<{
317330
}>;
318331

319332
/**
320-
* PULL REQUEST REVIEWS
333+
* Pull Request Reviews
321334
*/
322335
pull_request_review: CommonTypeInjector<{
323336
submitted: {};
@@ -335,7 +348,7 @@ export type RawGitHubTypes = PayloadInjector<{
335348
}>;
336349

337350
/**
338-
* PULL REQUEST REVIEW COMMENTS
351+
* Pull Request Review Commentse
339352
*/
340353
pull_request_review_comment: CommonTypeInjector<{
341354
created: {}
@@ -352,7 +365,7 @@ export type RawGitHubTypes = PayloadInjector<{
352365
}>;
353366

354367
/**
355-
* PULL REQUEST REVIEW THREAD
368+
* Pull Request Review Thread
356369
*/
357370
pull_request_review_thread: {
358371
resolved: {

0 commit comments

Comments
 (0)