Skip to content

Commit

Permalink
Update Schedule API response examples (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsan3 authored Jun 24, 2024
1 parent 9bd2a58 commit 5fc450e
Show file tree
Hide file tree
Showing 10 changed files with 516 additions and 92 deletions.
73 changes: 63 additions & 10 deletions content/reference/api/schedule/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,68 @@ curl \

```json
{
"id": 1,
"repo_id": 1,
"active": true,
"name": "hourly",
"entry": "0 * * * *",
"created_at": 1641314085,
"created_by": "octokitty",
"updated_at": 1641314085,
"updated_by": "octokitty",
"scheduled_at": 0
"id": 1,
"repo": {
"id": 1,
"owner": {
"id": 1,
"name": "octokitty",
"active": true
},
"org": "github",
"name": "octokitty",
"full_name": "github/octokitty",
"link": "https://github.com/github/octokitty",
"clone": "https://github.com/github/octokitty.git",
"branch": "main",
"topics": [],
"build_limit": 10,
"timeout": 30,
"counter": 0,
"visibility": "public",
"private": false,
"trusted": false,
"active": true,
"allow_events": {
"push": {
"branch": true,
"tag": false,
"delete_branch": false,
"delete_tag": false
},
"pull_request": {
"opened": false,
"edited": false,
"synchronize": false,
"reopened": false,
"labeled": false,
"unlabeled": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": false
}
},
"pipeline_type": "yaml",
"previous_name": "",
"approve_build": "fork-always"
},
"active": true,
"name": "hourly",
"entry": "0 * * * *",
"created_at": 1716495910,
"created_by": "octokitty",
"updated_at": 1716495910,
"updated_by": "octokitty",
"scheduled_at": 0,
"branch": "main",
"error": "",
"next_run": 1716499800
}
```
154 changes: 130 additions & 24 deletions content/reference/api/schedule/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,135 @@ curl \

```json
[
{
"id": 2,
"repo_id": 1,
"active": true,
"name": "nightly",
"entry": "0 0 * * *",
"created_at": 1641314086,
"created_by": "octokitty",
"updated_at": 1641314086,
"updated_by": "octokitty",
"scheduled_at": 0
},
{
"id": 1,
"repo_id": 1,
"active": true,
"name": "hourly",
"entry": "0 * * * *",
"created_at": 1641314085,
"created_by": "octokitty",
"updated_at": 1641314085,
"updated_by": "octokitty",
"scheduled_at": 0
}
{
"id": 1,
"repo": {
"id": 1,
"owner": {
"id": 1,
"name": "octokitty",
"active": true
},
"org": "github",
"name": "octokitty",
"full_name": "github/octokitty",
"link": "https://github.com/github/octokitty",
"clone": "https://github.com/github/octokitty.git",
"branch": "main",
"topics": [],
"build_limit": 10,
"timeout": 30,
"counter": 0,
"visibility": "public",
"private": false,
"trusted": false,
"active": true,
"allow_events": {
"push": {
"branch": true,
"tag": false,
"delete_branch": false,
"delete_tag": false
},
"pull_request": {
"opened": false,
"edited": false,
"synchronize": false,
"reopened": false,
"labeled": false,
"unlabeled": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": false
}
},
"pipeline_type": "yaml",
"previous_name": "",
"approve_build": "fork-always"
},
"active": true,
"name": "hourly",
"entry": "0 * * * *",
"created_at": 1716495910,
"created_by": "octokitty",
"updated_at": 1716495910,
"updated_by": "octokitty",
"scheduled_at": 0,
"branch": "main",
"error": "",
"next_run": 1716499800
},
{
"id": 2,
"repo": {
"id": 1,
"owner": {
"id": 1,
"name": "octokitty",
"active": true
},
"org": "github",
"name": "octokitty",
"full_name": "github/octokitty",
"link": "https://github.com/github/octokitty",
"clone": "https://github.com/github/octokitty.git",
"branch": "main",
"topics": [],
"build_limit": 10,
"timeout": 30,
"counter": 0,
"visibility": "public",
"private": false,
"trusted": false,
"active": true,
"allow_events": {
"push": {
"branch": true,
"tag": false,
"delete_branch": false,
"delete_tag": false
},
"pull_request": {
"opened": false,
"edited": false,
"synchronize": false,
"reopened": false,
"labeled": false,
"unlabeled": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": false
}
},
"pipeline_type": "yaml",
"previous_name": "",
"approve_build": "fork-always"
},
"active": true,
"name": "nightly",
"entry": "0 0 * * *",
"created_at": 1716495910,
"created_by": "octokitty",
"updated_at": 1716495910,
"updated_by": "octokitty",
"scheduled_at": 0,
"branch": "main",
"error": "",
"next_run": 1716499800
}
]
```
2 changes: 1 addition & 1 deletion content/reference/api/schedule/remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ curl \
#### Response

```sh
schedule "hourly" deleted
"schedule hourly deleted"
```
73 changes: 63 additions & 10 deletions content/reference/api/schedule/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,68 @@ curl \

```json
{
"id": 1,
"repo_id": 1,
"active": false,
"name": "hourly",
"entry": "0 * * * *",
"created_at": 1641314085,
"created_by": "octokitty",
"updated_at": 1641314086,
"updated_by": "octokitty",
"scheduled_at": 0
"id": 1,
"repo": {
"id": 1,
"owner": {
"id": 1,
"name": "octokitty",
"active": true
},
"org": "github",
"name": "octokitty",
"full_name": "github/octokitty",
"link": "https://github.com/github/octokitty",
"clone": "https://github.com/github/octokitty.git",
"branch": "main",
"topics": [],
"build_limit": 10,
"timeout": 30,
"counter": 0,
"visibility": "public",
"private": false,
"trusted": false,
"active": true,
"allow_events": {
"push": {
"branch": true,
"tag": false,
"delete_branch": false,
"delete_tag": false
},
"pull_request": {
"opened": false,
"edited": false,
"synchronize": false,
"reopened": false,
"labeled": false,
"unlabeled": false
},
"deployment": {
"created": false
},
"comment": {
"created": false,
"edited": false
},
"schedule": {
"run": false
}
},
"pipeline_type": "yaml",
"previous_name": "",
"approve_build": "fork-always"
},
"active": false,
"name": "hourly",
"entry": "0 * * * *",
"created_at": 1716495910,
"created_by": "octokitty",
"updated_at": 1716495910,
"updated_by": "octokitty",
"scheduled_at": 0,
"branch": "main",
"error": "",
"next_run": 1716499800
}
```
Loading

0 comments on commit 5fc450e

Please sign in to comment.