Skip to content

Commit cb05d6e

Browse files
octokitbotOctokit Bot
andauthored
fix: update docs for the "Update a secret scanning alert" API (PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}) to clarify that a resolution must be provided when setting state to resolved and replace some strings with enums (#292)
WIP: schema updates Co-authored-by: Octokit Bot <[email protected]>
1 parent 58951a7 commit cb05d6e

38 files changed

+1212
-735
lines changed

cache/api.github.com.deref.json

Lines changed: 54 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20541,7 +20541,7 @@
2054120541
"description": "The REST API URL of the code locations for this alert."
2054220542
},
2054320543
"state": {
20544-
"description": "Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`.",
20544+
"description": "Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.",
2054520545
"type": "string",
2054620546
"enum": [
2054720547
"open",
@@ -37094,7 +37094,7 @@
3709437094
},
3709537095
{
3709637096
"name": "state",
37097-
"description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.",
37097+
"description": "Indicates the state of the issues to return.",
3709837098
"in": "query",
3709937099
"required": false,
3710037100
"schema": {
@@ -37118,7 +37118,7 @@
3711837118
},
3711937119
{
3712037120
"name": "sort",
37121-
"description": "What to sort results by. Can be either `created`, `updated`, `comments`.",
37121+
"description": "What to sort results by.",
3712237122
"in": "query",
3712337123
"required": false,
3712437124
"schema": {
@@ -40423,7 +40423,7 @@
4042340423
"type": "string"
4042440424
},
4042540425
"mode": {
40426-
"description": "The rendering mode. Can be either `markdown` or `gfm`.",
40426+
"description": "The rendering mode.",
4042740427
"enum": [
4042840428
"markdown",
4042940429
"gfm"
@@ -82808,7 +82808,7 @@
8280882808
},
8280982809
{
8281082810
"name": "state",
82811-
"description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.",
82811+
"description": "Indicates the state of the issues to return.",
8281282812
"in": "query",
8281382813
"required": false,
8281482814
"schema": {
@@ -82832,7 +82832,7 @@
8283282832
},
8283382833
{
8283482834
"name": "sort",
82835-
"description": "What to sort results by. Can be either `created`, `updated`, `comments`.",
82835+
"description": "What to sort results by.",
8283682836
"in": "query",
8283782837
"required": false,
8283882838
"schema": {
@@ -102848,7 +102848,7 @@
102848102848
},
102849102849
{
102850102850
"name": "state",
102851-
"description": "Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`.",
102851+
"description": "Indicates the state of the projects to return.",
102852102852
"in": "query",
102853102853
"required": false,
102854102854
"schema": {
@@ -107797,7 +107797,7 @@
107797107797
"description": "The REST API URL of the code locations for this alert."
107798107798
},
107799107799
"state": {
107800-
"description": "Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`.",
107800+
"description": "Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.",
107801107801
"type": "string",
107802107802
"enum": [
107803107803
"open",
@@ -141580,7 +141580,16 @@
141580141580
"description": "The outcome of the job.",
141581141581
"example": "success",
141582141582
"type": "string",
141583-
"nullable": true
141583+
"nullable": true,
141584+
"enum": [
141585+
"success",
141586+
"failure",
141587+
"neutral",
141588+
"cancelled",
141589+
"skipped",
141590+
"timed_out",
141591+
"action_required"
141592+
]
141584141593
},
141585141594
"started_at": {
141586141595
"description": "The time that the job started, in ISO 8601 format.",
@@ -161315,7 +161324,16 @@
161315161324
"description": "The outcome of the job.",
161316161325
"example": "success",
161317161326
"type": "string",
161318-
"nullable": true
161327+
"nullable": true,
161328+
"enum": [
161329+
"success",
161330+
"failure",
161331+
"neutral",
161332+
"cancelled",
161333+
"skipped",
161334+
"timed_out",
161335+
"action_required"
161336+
]
161319161337
},
161320161338
"started_at": {
161321161339
"description": "The time that the job started, in ISO 8601 format.",
@@ -161928,7 +161946,16 @@
161928161946
"description": "The outcome of the job.",
161929161947
"example": "success",
161930161948
"type": "string",
161931-
"nullable": true
161949+
"nullable": true,
161950+
"enum": [
161951+
"success",
161952+
"failure",
161953+
"neutral",
161954+
"cancelled",
161955+
"skipped",
161956+
"timed_out",
161957+
"action_required"
161958+
]
161932161959
},
161933161960
"started_at": {
161934161961
"description": "The time that the job started, in ISO 8601 format.",
@@ -252395,7 +252422,7 @@
252395252422
},
252396252423
{
252397252424
"name": "sort",
252398-
"description": "The sort order. Can be either `newest`, `oldest`, or `stargazers`.",
252425+
"description": "The sort order. `stargazers` will sort by star count.",
252399252426
"in": "query",
252400252427
"required": false,
252401252428
"schema": {
@@ -273229,7 +273256,7 @@
273229273256
},
273230273257
{
273231273258
"name": "state",
273232-
"description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.",
273259+
"description": "Indicates the state of the issues to return.",
273233273260
"in": "query",
273234273261
"required": false,
273235273262
"schema": {
@@ -273280,7 +273307,7 @@
273280273307
},
273281273308
{
273282273309
"name": "sort",
273283-
"description": "What to sort results by. Can be either `created`, `updated`, `comments`.",
273310+
"description": "What to sort results by.",
273284273311
"in": "query",
273285273312
"required": false,
273286273313
"schema": {
@@ -333999,7 +334026,7 @@
333999334026
},
334000334027
{
334001334028
"name": "state",
334002-
"description": "Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`.",
334029+
"description": "Indicates the state of the projects to return.",
334003334030
"in": "query",
334004334031
"required": false,
334005334032
"schema": {
@@ -334977,7 +335004,7 @@
334977335004
},
334978335005
{
334979335006
"name": "sort",
334980-
"description": "What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month).",
335007+
"description": "What to sort results by. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month.",
334981335008
"in": "query",
334982335009
"required": false,
334983335010
"schema": {
@@ -334993,7 +335020,7 @@
334993335020
},
334994335021
{
334995335022
"name": "direction",
334996-
"description": "The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`.",
335023+
"description": "The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`.",
334997335024
"in": "query",
334998335025
"required": false,
334999335026
"schema": {
@@ -343141,7 +343168,7 @@
343141343168
},
343142343169
{
343143343170
"name": "direction",
343144-
"description": "Can be either `asc` or `desc`. Ignored without `sort` parameter.",
343171+
"description": "The direction to sort results. Ignored without `sort` parameter.",
343145343172
"in": "query",
343146343173
"required": false,
343147343174
"schema": {
@@ -357665,7 +357692,7 @@
357665357692
},
357666357693
{
357667357694
"name": "direction",
357668-
"description": "Can be either `asc` or `desc`. Ignored without `sort` parameter.",
357695+
"description": "The direction to sort results. Ignored without `sort` parameter.",
357669357696
"in": "query",
357670357697
"required": false,
357671357698
"schema": {
@@ -381395,7 +381422,7 @@
381395381422
"description": "The REST API URL of the code locations for this alert."
381396381423
},
381397381424
"state": {
381398-
"description": "Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`.",
381425+
"description": "Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.",
381399381426
"type": "string",
381400381427
"enum": [
381401381428
"open",
@@ -381886,7 +381913,7 @@
381886381913
"description": "The REST API URL of the code locations for this alert."
381887381914
},
381888381915
"state": {
381889-
"description": "Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`.",
381916+
"description": "Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.",
381890381917
"type": "string",
381891381918
"enum": [
381892381919
"open",
@@ -382285,7 +382312,7 @@
382285382312
"type": "object",
382286382313
"properties": {
382287382314
"state": {
382288-
"description": "Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`.",
382315+
"description": "Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.",
382289382316
"type": "string",
382290382317
"enum": [
382291382318
"open",
@@ -382363,7 +382390,7 @@
382363382390
"description": "The REST API URL of the code locations for this alert."
382364382391
},
382365382392
"state": {
382366-
"description": "Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`.",
382393+
"description": "Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.",
382367382394
"type": "string",
382368382395
"enum": [
382369382396
"open",
@@ -451534,7 +451561,7 @@
451534451561
},
451535451562
{
451536451563
"name": "state",
451537-
"description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.",
451564+
"description": "Indicates the state of the issues to return.",
451538451565
"in": "query",
451539451566
"required": false,
451540451567
"schema": {
@@ -451558,7 +451585,7 @@
451558451585
},
451559451586
{
451560451587
"name": "sort",
451561-
"description": "What to sort results by. Can be either `created`, `updated`, `comments`.",
451588+
"description": "What to sort results by.",
451562451589
"in": "query",
451563451590
"required": false,
451564451591
"schema": {
@@ -455738,7 +455765,7 @@
455738455765
"parameters": [
455739455766
{
455740455767
"name": "state",
455741-
"description": "Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships.",
455768+
"description": "Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships.",
455742455769
"in": "query",
455743455770
"required": false,
455744455771
"schema": {
@@ -501389,7 +501416,7 @@
501389501416
},
501390501417
{
501391501418
"name": "state",
501392-
"description": "Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`.",
501419+
"description": "Indicates the state of the projects to return.",
501393501420
"in": "query",
501394501421
"required": false,
501395501422
"schema": {

0 commit comments

Comments
 (0)