Skip to content

Commit 881023e

Browse files
authored
Split webhook data into per-category JSON files for lazy loading (#60806)
1 parent 0359655 commit 881023e

687 files changed

Lines changed: 2324799 additions & 2327206 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,6 @@ tmp/
106106

107107
# Localized content from translation repositories
108108
translations/
109+
110+
# Shared local volume (bufo)
111+
.local
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"completed": {
3+
"descriptionHtml": "<p>Check run is <strong>completed</strong>.</p>",
4+
"summaryHtml": "",
5+
"bodyParameters": [
6+
{
7+
"name": "action",
8+
"description": "The action performed. Value: <code>completed</code>",
9+
"isRequired": true,
10+
"type": "string"
11+
},
12+
{
13+
"name": "check_run",
14+
"description": "The check run object",
15+
"isRequired": true,
16+
"type": "object"
17+
}
18+
],
19+
"availability": ["Repository", "Organization", "GitHub App"],
20+
"action": "completed",
21+
"category": "check_run",
22+
"payloadExample": {
23+
"action": "completed",
24+
"check_run": {
25+
"id": 4,
26+
"status": "completed",
27+
"conclusion": "neutral"
28+
}
29+
}
30+
}
31+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"opened": {
3+
"descriptionHtml": "<p>Issue is <em>opened</em>.</p>",
4+
"summaryHtml": "",
5+
"bodyParameters": [
6+
{
7+
"name": "action",
8+
"description": "The action performed",
9+
"isRequired": true,
10+
"type": "string"
11+
},
12+
{
13+
"name": "issue",
14+
"description": "The issue object",
15+
"isRequired": false,
16+
"type": "object"
17+
}
18+
],
19+
"availability": ["Repository", "Organization"],
20+
"action": "opened",
21+
"category": "issues"
22+
}
23+
}

src/fixtures/fixtures/src/webhooks/data/fpt/schema.json

Lines changed: 0 additions & 56 deletions
This file was deleted.

src/webhooks/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ To run the webhooks pipeline locally:
3232
1. Set a `GITHUB_TOKEN` in your `.env` with (classic) `repo` scopes & enable SSO for the github org.
3333
1. Run `npm run sync-rest -- -s rest-api-description -o webhooks`.
3434

35+
> [!NOTE]
36+
> The `npm run sync-webhooks` shortcut in `package.json` does **not** pass `-s`, so it defaults to sourcing from the private `github/github` monorepo and will fail unless you are in a Codespace with that repo checked out as a sibling directory. Use the `sync-rest` command above for local development.
37+
3538
## About this directory
3639

3740
- `src/webhooks/data` - The automatically generated data files created by running this pipeline.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"disabled": {
3+
"descriptionHtml": "<p>All branch protections were disabled for a repository.</p>",
4+
"summaryHtml": "<p>This event occurs when there is a change to branch protection configurations for a repository.\nFor more information, see \"<a href=\"https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches\">About protected branches</a>.\"\nFor information about using the APIs to manage branch protection rules, see \"<a href=\"https://docs.github.com/graphql/reference/objects#branchprotectionrule\">Branch protection rule</a>\" in the GraphQL documentation or \"<a href=\"https://docs.github.com/rest/branches/branch-protection\">Branch protection</a>\" in the REST API documentation.</p>\n<p>To subscribe to this event, a GitHub App must have at least read-level access for the \"Administration\" repository permission.</p>",
5+
"bodyParameters": [
6+
{
7+
"type": "string",
8+
"name": "action",
9+
"description": "",
10+
"isRequired": true,
11+
"enum": [
12+
"disabled"
13+
],
14+
"childParamsGroups": []
15+
},
16+
{
17+
"type": "object",
18+
"name": "enterprise",
19+
"description": "<p>An enterprise on GitHub. Webhook payloads contain the <code>enterprise</code> property when the webhook is configured\non an enterprise account or an organization that's part of an enterprise account. For more information,\nsee \"<a href=\"https://docs.github.com/admin/overview/about-enterprise-accounts\">About enterprise accounts</a>.\"</p>",
20+
"childParamsGroups": []
21+
},
22+
{
23+
"type": "object",
24+
"name": "installation",
25+
"description": "<p>The GitHub App installation. Webhook payloads contain the <code>installation</code> property when the event is configured\nfor and sent to a GitHub App. For more information,\nsee \"<a href=\"https://docs.github.com/apps/creating-github-apps/registering-a-github-app/using-webhooks-with-github-apps\">Using webhooks with GitHub Apps</a>.\"</p>",
26+
"childParamsGroups": []
27+
},
28+
{
29+
"type": "object",
30+
"name": "organization",
31+
"description": "<p>A GitHub organization. Webhook payloads contain the <code>organization</code> property when the webhook is configured for an\norganization, or when the event occurs from activity in a repository owned by an organization.</p>",
32+
"childParamsGroups": []
33+
},
34+
{
35+
"type": "object",
36+
"name": "repository",
37+
"description": "<p>The repository on GitHub where the event occurred. Webhook payloads contain the <code>repository</code> property\nwhen the event occurs from activity in a repository.</p>",
38+
"isRequired": true,
39+
"childParamsGroups": []
40+
},
41+
{
42+
"type": "object",
43+
"name": "sender",
44+
"description": "<p>A GitHub user.</p>",
45+
"isRequired": true,
46+
"childParamsGroups": []
47+
}
48+
],
49+
"availability": [
50+
"repository",
51+
"organization",
52+
"app"
53+
],
54+
"action": "disabled",
55+
"category": "branch_protection_configuration"
56+
},
57+
"enabled": {
58+
"descriptionHtml": "<p>All branch protections were enabled for a repository.</p>",
59+
"summaryHtml": "<p>This event occurs when there is a change to branch protection configurations for a repository.\nFor more information, see \"<a href=\"https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches\">About protected branches</a>.\"\nFor information about using the APIs to manage branch protection rules, see \"<a href=\"https://docs.github.com/graphql/reference/objects#branchprotectionrule\">Branch protection rule</a>\" in the GraphQL documentation or \"<a href=\"https://docs.github.com/rest/branches/branch-protection\">Branch protection</a>\" in the REST API documentation.</p>\n<p>To subscribe to this event, a GitHub App must have at least read-level access for the \"Administration\" repository permission.</p>",
60+
"bodyParameters": [
61+
{
62+
"type": "string",
63+
"name": "action",
64+
"description": "",
65+
"isRequired": true,
66+
"enum": [
67+
"enabled"
68+
],
69+
"childParamsGroups": []
70+
},
71+
{
72+
"type": "object",
73+
"name": "enterprise",
74+
"description": "<p>An enterprise on GitHub. Webhook payloads contain the <code>enterprise</code> property when the webhook is configured\non an enterprise account or an organization that's part of an enterprise account. For more information,\nsee \"<a href=\"https://docs.github.com/admin/overview/about-enterprise-accounts\">About enterprise accounts</a>.\"</p>",
75+
"childParamsGroups": []
76+
},
77+
{
78+
"type": "object",
79+
"name": "installation",
80+
"description": "<p>The GitHub App installation. Webhook payloads contain the <code>installation</code> property when the event is configured\nfor and sent to a GitHub App. For more information,\nsee \"<a href=\"https://docs.github.com/apps/creating-github-apps/registering-a-github-app/using-webhooks-with-github-apps\">Using webhooks with GitHub Apps</a>.\"</p>",
81+
"childParamsGroups": []
82+
},
83+
{
84+
"type": "object",
85+
"name": "organization",
86+
"description": "<p>A GitHub organization. Webhook payloads contain the <code>organization</code> property when the webhook is configured for an\norganization, or when the event occurs from activity in a repository owned by an organization.</p>",
87+
"childParamsGroups": []
88+
},
89+
{
90+
"type": "object",
91+
"name": "repository",
92+
"description": "<p>The repository on GitHub where the event occurred. Webhook payloads contain the <code>repository</code> property\nwhen the event occurs from activity in a repository.</p>",
93+
"isRequired": true,
94+
"childParamsGroups": []
95+
},
96+
{
97+
"type": "object",
98+
"name": "sender",
99+
"description": "<p>A GitHub user.</p>",
100+
"isRequired": true,
101+
"childParamsGroups": []
102+
}
103+
],
104+
"availability": [
105+
"repository",
106+
"organization",
107+
"app"
108+
],
109+
"action": "enabled",
110+
"category": "branch_protection_configuration"
111+
}
112+
}

0 commit comments

Comments
 (0)