Skip to content

Commit 01faa14

Browse files
authored
feat: add support for is_alphanumeric attribute on autolinks, rule.help_uri attribute on code scanning alerts and anonymous_access_enabled attribute on repos (see PR body for more changes) (#237)
WIP
1 parent 2297876 commit 01faa14

File tree

21 files changed

+393
-154
lines changed

21 files changed

+393
-154
lines changed

cache/api.github.jpy.wang.json

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"openapi": "3.0.3",
33
"info": {
4-
"version": "7.7.0",
4+
"version": "7.8.0",
55
"title": "GitHub's official OpenAPI spec + Octokit extension",
66
"description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs",
77
"license": {
@@ -12448,17 +12448,6 @@
1244812448
}
1244912449
}
1245012450
},
12451-
"302": {
12452-
"description": "Response if requester is not an organization member",
12453-
"headers": {
12454-
"Location": {
12455-
"example": "https://api.github.com/orgs/github/public_members",
12456-
"schema": {
12457-
"type": "string"
12458-
}
12459-
}
12460-
}
12461-
},
1246212451
"422": {
1246312452
"$ref": "#/components/responses/validation_failed"
1246412453
}
@@ -23260,11 +23249,16 @@
2326023249
"properties": {
2326123250
"key_prefix": {
2326223251
"type": "string",
23263-
"description": "The prefix appended by alphanumeric characters will generate a link any time it is found in an issue, pull request, or commit."
23252+
"description": "This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit."
2326423253
},
2326523254
"url_template": {
2326623255
"type": "string",
23267-
"description": "The URL must contain `<num>` for the reference number. `<num>` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`."
23256+
"description": "The URL must contain `<num>` for the reference number. `<num>` matches different characters depending on the value of `is_alphanumeric`."
23257+
},
23258+
"is_alphanumeric": {
23259+
"type": "boolean",
23260+
"default": "true",
23261+
"description": "Whether this autolink reference matches alphanumeric characters. If true, the `<num>` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters."
2326823262
}
2326923263
},
2327023264
"required": [
@@ -23276,7 +23270,8 @@
2327623270
"default": {
2327723271
"value": {
2327823272
"key_prefix": "TICKET-",
23279-
"url_template": "https://example.com/TICKET?query=<num>"
23273+
"url_template": "https://example.com/TICKET?query=<num>",
23274+
"is_alphanumeric": true
2328023275
}
2328123276
}
2328223277
}
@@ -30219,6 +30214,9 @@
3021930214
},
3022030215
"500": {
3022130216
"$ref": "#/components/responses/internal_error"
30217+
},
30218+
"503": {
30219+
"$ref": "#/components/responses/service_unavailable"
3022230220
}
3022330221
},
3022430222
"x-github": {
@@ -30674,6 +30672,9 @@
3067430672
},
3067530673
"500": {
3067630674
"$ref": "#/components/responses/internal_error"
30675+
},
30676+
"503": {
30677+
"$ref": "#/components/responses/service_unavailable"
3067730678
}
3067830679
},
3067930680
"x-github": {
@@ -41476,6 +41477,9 @@
4147641477
},
4147741478
"500": {
4147841479
"$ref": "#/components/responses/internal_error"
41480+
},
41481+
"503": {
41482+
"$ref": "#/components/responses/service_unavailable"
4147941483
}
4148041484
},
4148141485
"x-github": {
@@ -42153,6 +42157,9 @@
4215342157
},
4215442158
"500": {
4215542159
"$ref": "#/components/responses/internal_error"
42160+
},
42161+
"503": {
42162+
"$ref": "#/components/responses/service_unavailable"
4215642163
}
4215742164
},
4215842165
"x-github": {
@@ -46495,7 +46502,7 @@
4649546502
"/repos/{template_owner}/{template_repo}/generate": {
4649646503
"post": {
4649746504
"summary": "Create a repository using a template",
46498-
"description": "Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.\n* `repo` scope to create a private repository",
46505+
"description": "Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, the authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.\n* `repo` scope to create a private repository",
4649946506
"tags": [
4650046507
"repos"
4650146508
],
@@ -61712,6 +61719,10 @@
6171261719
"starred_at": {
6171361720
"type": "string",
6171461721
"example": "\"2020-07-09T00:17:42Z\""
61722+
},
61723+
"anonymous_access_enabled": {
61724+
"type": "boolean",
61725+
"description": "Whether anonymous git access is enabled for this repository"
6171561726
}
6171661727
},
6171761728
"required": [
@@ -62932,6 +62943,11 @@
6293262943
"nullable": true,
6293362944
"type": "string",
6293462945
"description": "Detailed documentation for the rule as GitHub Flavored Markdown."
62946+
},
62947+
"help_uri": {
62948+
"nullable": true,
62949+
"type": "string",
62950+
"description": "A link to the documentation for the rule used to detect the alert."
6293562951
}
6293662952
}
6293762953
},
@@ -66656,6 +66672,10 @@
6665666672
"starred_at": {
6665766673
"type": "string",
6665866674
"example": "\"2020-07-09T00:17:42Z\""
66675+
},
66676+
"anonymous_access_enabled": {
66677+
"type": "boolean",
66678+
"description": "Whether anonymous git access is enabled for this repository"
6665966679
}
6666066680
},
6666166681
"required": [
@@ -73184,14 +73204,16 @@
7318473204
"type": "string"
7318573205
},
7318673206
"is_alphanumeric": {
73187-
"description": "Whether this autolink reference matches alphanumeric characters. If false, this autolink reference is a legacy autolink that only matches numeric characters.",
73207+
"description": "Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters.",
73208+
"example": true,
7318873209
"type": "boolean"
7318973210
}
7319073211
},
7319173212
"required": [
7319273213
"id",
7319373214
"key_prefix",
73194-
"url_template"
73215+
"url_template",
73216+
"is_alphanumeric"
7319573217
]
7319673218
},
7319773219
"protected-branch-required-status-check": {
@@ -99640,7 +99662,8 @@
9964099662
"security",
9964199663
"external/cwe/cwe-022"
9964299664
],
99643-
"help": "# Arbitrary file write during zip extraction (\"Zip Slip\")\\nExtracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ..."
99665+
"help": "# Arbitrary file write during zip extraction (\"Zip Slip\")\\nExtracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ...",
99666+
"help_uri": "https://codeql.github.com/"
9964499667
},
9964599668
"tool": {
9964699669
"name": "CodeQL",
@@ -99712,7 +99735,8 @@
9971299735
"security",
9971399736
"external/cwe/cwe-022"
9971499737
],
99715-
"help": "# Arbitrary file write during zip extraction (\"Zip Slip\")\\nExtracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ..."
99738+
"help": "# Arbitrary file write during zip extraction (\"Zip Slip\")\\nExtracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ...",
99739+
"help_uri": "https://codeql.github.com/"
9971699740
},
9971799741
"tool": {
9971899742
"name": "CodeQL",

cache/ghes-3.2.json

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"openapi": "3.0.3",
33
"info": {
4-
"version": "7.7.0",
4+
"version": "7.8.0",
55
"title": "GitHub's official OpenAPI spec + Octokit extension",
66
"description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs",
77
"license": {
@@ -12582,17 +12582,6 @@
1258212582
}
1258312583
}
1258412584
},
12585-
"302": {
12586-
"description": "Response if requester is not an organization member",
12587-
"headers": {
12588-
"Location": {
12589-
"example": "https://api.github.com/orgs/github/public_members",
12590-
"schema": {
12591-
"type": "string"
12592-
}
12593-
}
12594-
}
12595-
},
1259612585
"422": {
1259712586
"$ref": "#/components/responses/validation_failed"
1259812587
}
@@ -26756,6 +26745,9 @@
2675626745
},
2675726746
"500": {
2675826747
"$ref": "#/components/responses/internal_error"
26748+
},
26749+
"503": {
26750+
"$ref": "#/components/responses/service_unavailable"
2675926751
}
2676026752
},
2676126753
"x-github": {
@@ -27177,6 +27169,9 @@
2717727169
},
2717827170
"500": {
2717927171
"$ref": "#/components/responses/internal_error"
27172+
},
27173+
"503": {
27174+
"$ref": "#/components/responses/service_unavailable"
2718027175
}
2718127176
},
2718227177
"x-github": {
@@ -37218,6 +37213,9 @@
3721837213
},
3721937214
"500": {
3722037215
"$ref": "#/components/responses/internal_error"
37216+
},
37217+
"503": {
37218+
"$ref": "#/components/responses/service_unavailable"
3722137219
}
3722237220
},
3722337221
"x-github": {
@@ -37784,6 +37782,9 @@
3778437782
},
3778537783
"500": {
3778637784
"$ref": "#/components/responses/internal_error"
37785+
},
37786+
"503": {
37787+
"$ref": "#/components/responses/service_unavailable"
3778737788
}
3778837789
},
3778937790
"x-github": {
@@ -41518,7 +41519,7 @@
4151841519
"/repos/{template_owner}/{template_repo}/generate": {
4151941520
"post": {
4152041521
"summary": "Create a repository using a template",
41521-
"description": "Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/[email protected]/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/[email protected]/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.\n* `repo` scope to create a private repository",
41522+
"description": "Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, the authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/[email protected]/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/[email protected]/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.\n* `repo` scope to create a private repository",
4152241523
"tags": [
4152341524
"repos"
4152441525
],
@@ -53557,6 +53558,10 @@
5355753558
"starred_at": {
5355853559
"type": "string",
5355953560
"example": "\"2020-07-09T00:17:42Z\""
53561+
},
53562+
"anonymous_access_enabled": {
53563+
"type": "boolean",
53564+
"description": "Whether anonymous git access is enabled for this repository"
5356053565
}
5356153566
},
5356253567
"required": [
@@ -56941,6 +56946,10 @@
5694156946
"starred_at": {
5694256947
"type": "string",
5694356948
"example": "\"2020-07-09T00:17:42Z\""
56949+
},
56950+
"anonymous_access_enabled": {
56951+
"type": "boolean",
56952+
"description": "Whether anonymous git access is enabled for this repository"
5694456953
}
5694556954
},
5694656955
"required": [
@@ -63254,6 +63263,11 @@
6325463263
"nullable": true,
6325563264
"type": "string",
6325663265
"description": "Detailed documentation for the rule as GitHub Flavored Markdown."
63266+
},
63267+
"help_uri": {
63268+
"nullable": true,
63269+
"type": "string",
63270+
"description": "A link to the documentation for the rule used to detect the alert."
6325763271
}
6325863272
}
6325963273
},
@@ -84695,7 +84709,8 @@
8469584709
"security",
8469684710
"external/cwe/cwe-022"
8469784711
],
84698-
"help": "# Arbitrary file write during zip extraction (\"Zip Slip\")\\nExtracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ..."
84712+
"help": "# Arbitrary file write during zip extraction (\"Zip Slip\")\\nExtracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ...",
84713+
"help_uri": "https://codeql.github.com/"
8469984714
},
8470084715
"tool": {
8470184716
"name": "CodeQL",
@@ -84764,7 +84779,8 @@
8476484779
"security",
8476584780
"external/cwe/cwe-022"
8476684781
],
84767-
"help": "# Arbitrary file write during zip extraction (\"Zip Slip\")\\nExtracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ..."
84782+
"help": "# Arbitrary file write during zip extraction (\"Zip Slip\")\\nExtracting files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ...",
84783+
"help_uri": "https://codeql.github.com/"
8476884784
},
8476984785
"tool": {
8477084786
"name": "CodeQL",

0 commit comments

Comments
 (0)