mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-07-13 16:00:03 +02:00

## Summary Inspired by https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository and https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#get-a-workflow-run ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] I do not want this change to show in the release notes. - [x] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - Features - [PR](https://codeberg.org/forgejo/forgejo/pulls/7699): <!--number 7699 --><!--line 0 --><!--description bWFrZSBhY3Rpb24gcnVucyBhdmFpbGFibGUgaW4gYXBp-->make action runs available in api<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7699 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: klausfyhn <klausfyhn@gmail.com> Co-committed-by: klausfyhn <klausfyhn@gmail.com>
534 lines
15 KiB
YAML
534 lines
15 KiB
YAML
-
|
|
id: 791
|
|
title: "update actions"
|
|
repo_id: 4
|
|
owner_id: 1
|
|
workflow_id: "artifact.yaml"
|
|
index: 187
|
|
trigger_user_id: 1
|
|
ref: "refs/heads/master"
|
|
commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0"
|
|
event: "push"
|
|
is_fork_pull_request: 0
|
|
status: 1
|
|
started: 1683636528
|
|
stopped: 1683636626
|
|
created: 1683636108
|
|
updated: 1683636626
|
|
need_approval: 0
|
|
approved_by: 0
|
|
event_payload: |
|
|
{
|
|
"after": "7a3858dc7f059543a8807a8b551304b7e362a7ef",
|
|
"before": "0000000000000000000000000000000000000000",
|
|
"commits": [
|
|
{
|
|
"added": [
|
|
".forgejo/workflows/test.yml"
|
|
],
|
|
"author": {
|
|
"email": "root@example.com",
|
|
"name": "username",
|
|
"username": "root"
|
|
},
|
|
"committer": {
|
|
"email": "root@example.com",
|
|
"name": "username",
|
|
"username": "root"
|
|
},
|
|
"id": "7a3858dc7f059543a8807a8b551304b7e362a7ef",
|
|
"message": "initial commit\n",
|
|
"modified": [],
|
|
"removed": [],
|
|
"timestamp": "2024-01-24T18:59:25Z",
|
|
"url": "http://10.201.14.40:3000/root/example-push/commit/7a3858dc7f059543a8807a8b551304b7e362a7ef",
|
|
"verification": null
|
|
}
|
|
],
|
|
"compare_url": "http://10.201.14.40:3000/",
|
|
"head_commit": {
|
|
"added": [
|
|
".forgejo/workflows/test.yml"
|
|
],
|
|
"author": {
|
|
"email": "root@example.com",
|
|
"name": "username",
|
|
"username": "root"
|
|
},
|
|
"committer": {
|
|
"email": "root@example.com",
|
|
"name": "username",
|
|
"username": "root"
|
|
},
|
|
"id": "7a3858dc7f059543a8807a8b551304b7e362a7ef",
|
|
"message": "initial commit\n",
|
|
"modified": [],
|
|
"removed": [],
|
|
"timestamp": "2024-01-24T18:59:25Z",
|
|
"url": "http://10.201.14.40:3000/root/example-push/commit/7a3858dc7f059543a8807a8b551304b7e362a7ef",
|
|
"verification": null
|
|
},
|
|
"pusher": {
|
|
"active": false,
|
|
"avatar_url": "http://10.201.14.40:3000/avatars/04edfc0ef6c6cf6d6b88fbc69f9f9071",
|
|
"created": "2024-01-24T18:57:32Z",
|
|
"description": "",
|
|
"email": "root@noreply.10.201.14.40",
|
|
"followers_count": 0,
|
|
"following_count": 0,
|
|
"full_name": "",
|
|
"id": 1,
|
|
"is_admin": false,
|
|
"language": "",
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
"location": "",
|
|
"login": "root",
|
|
"login_name": "",
|
|
"prohibit_login": false,
|
|
"restricted": false,
|
|
"starred_repos_count": 0,
|
|
"username": "root",
|
|
"visibility": "public",
|
|
"website": ""
|
|
},
|
|
"ref": "refs/heads/main",
|
|
"repository": {
|
|
"allow_merge_commits": true,
|
|
"allow_rebase": true,
|
|
"allow_rebase_explicit": true,
|
|
"allow_rebase_update": true,
|
|
"allow_squash_merge": true,
|
|
"archived": false,
|
|
"archived_at": "1970-01-01T00:00:00Z",
|
|
"avatar_url": "",
|
|
"clone_url": "http://10.201.14.40:3000/root/example-push.git",
|
|
"created_at": "2024-01-24T18:59:25Z",
|
|
"default_allow_maintainer_edit": false,
|
|
"default_branch": "main",
|
|
"default_delete_branch_after_merge": false,
|
|
"default_merge_style": "merge",
|
|
"description": "",
|
|
"empty": false,
|
|
"fork": false,
|
|
"forks_count": 0,
|
|
"full_name": "root/example-push",
|
|
"has_actions": true,
|
|
"has_issues": true,
|
|
"has_packages": true,
|
|
"has_projects": true,
|
|
"has_pull_requests": true,
|
|
"has_releases": true,
|
|
"has_wiki": true,
|
|
"html_url": "http://10.201.14.40:3000/root/example-push",
|
|
"id": 2,
|
|
"ignore_whitespace_conflicts": false,
|
|
"internal": false,
|
|
"internal_tracker": {
|
|
"allow_only_contributors_to_track_time": true,
|
|
"enable_issue_dependencies": true,
|
|
"enable_time_tracker": true
|
|
},
|
|
"language": "",
|
|
"languages_url": "http://10.201.14.40:3000/api/v1/repos/root/example-push/languages",
|
|
"link": "",
|
|
"mirror": false,
|
|
"mirror_interval": "",
|
|
"mirror_updated": "0001-01-01T00:00:00Z",
|
|
"name": "example-push",
|
|
"object_format_name": "",
|
|
"open_issues_count": 0,
|
|
"open_pr_counter": 0,
|
|
"original_url": "",
|
|
"owner": {
|
|
"active": false,
|
|
"avatar_url": "http://10.201.14.40:3000/avatars/04edfc0ef6c6cf6d6b88fbc69f9f9071",
|
|
"created": "2024-01-24T18:57:32Z",
|
|
"description": "",
|
|
"email": "root@example.com",
|
|
"followers_count": 0,
|
|
"following_count": 0,
|
|
"full_name": "",
|
|
"id": 1,
|
|
"is_admin": false,
|
|
"language": "",
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
"location": "",
|
|
"login": "root",
|
|
"login_name": "",
|
|
"prohibit_login": false,
|
|
"restricted": false,
|
|
"starred_repos_count": 0,
|
|
"username": "root",
|
|
"visibility": "public",
|
|
"website": ""
|
|
},
|
|
"parent": null,
|
|
"permissions": {
|
|
"admin": true,
|
|
"pull": true,
|
|
"push": true
|
|
},
|
|
"private": false,
|
|
"release_counter": 0,
|
|
"repo_transfer": null,
|
|
"size": 25,
|
|
"ssh_url": "forgejo@10.201.14.40:root/example-push.git",
|
|
"stars_count": 0,
|
|
"template": false,
|
|
"updated_at": "2024-01-24T18:59:25Z",
|
|
"url": "http://10.201.14.40:3000/api/v1/repos/root/example-push",
|
|
"watchers_count": 1,
|
|
"website": ""
|
|
},
|
|
"sender": {
|
|
"active": false,
|
|
"avatar_url": "http://10.201.14.40:3000/avatars/04edfc0ef6c6cf6d6b88fbc69f9f9071",
|
|
"created": "2024-01-24T18:57:32Z",
|
|
"description": "",
|
|
"email": "root@noreply.10.201.14.40",
|
|
"followers_count": 0,
|
|
"following_count": 0,
|
|
"full_name": "",
|
|
"id": 1,
|
|
"is_admin": false,
|
|
"language": "",
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
"location": "",
|
|
"login": "root",
|
|
"login_name": "",
|
|
"prohibit_login": false,
|
|
"restricted": false,
|
|
"starred_repos_count": 0,
|
|
"username": "root",
|
|
"visibility": "public",
|
|
"website": ""
|
|
},
|
|
"total_commits": 0
|
|
}
|
|
|
|
-
|
|
id: 792
|
|
title: "update actions"
|
|
repo_id: 4
|
|
owner_id: 1
|
|
workflow_id: "artifact.yaml"
|
|
index: 188
|
|
trigger_user_id: 1
|
|
ref: "refs/heads/master"
|
|
commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0"
|
|
event: "push"
|
|
is_fork_pull_request: 0
|
|
status: 1
|
|
started: 1683636528
|
|
stopped: 1683636626
|
|
created: 1683636108
|
|
updated: 1683636626
|
|
need_approval: 0
|
|
approved_by: 0
|
|
event_payload: |
|
|
{
|
|
"after": "7a3858dc7f059543a8807a8b551304b7e362a7ef",
|
|
"before": "0000000000000000000000000000000000000000",
|
|
"commits": [
|
|
{
|
|
"added": [
|
|
".forgejo/workflows/test.yml"
|
|
],
|
|
"author": {
|
|
"email": "root@example.com",
|
|
"name": "username",
|
|
"username": "root"
|
|
},
|
|
"committer": {
|
|
"email": "root@example.com",
|
|
"name": "username",
|
|
"username": "root"
|
|
},
|
|
"id": "7a3858dc7f059543a8807a8b551304b7e362a7ef",
|
|
"message": "initial commit\n",
|
|
"modified": [],
|
|
"removed": [],
|
|
"timestamp": "2024-01-24T18:59:25Z",
|
|
"url": "http://10.201.14.40:3000/root/example-push/commit/7a3858dc7f059543a8807a8b551304b7e362a7ef",
|
|
"verification": null
|
|
}
|
|
],
|
|
"compare_url": "http://10.201.14.40:3000/",
|
|
"head_commit": {
|
|
"added": [
|
|
".forgejo/workflows/test.yml"
|
|
],
|
|
"author": {
|
|
"email": "root@example.com",
|
|
"name": "username",
|
|
"username": "root"
|
|
},
|
|
"committer": {
|
|
"email": "root@example.com",
|
|
"name": "username",
|
|
"username": "root"
|
|
},
|
|
"id": "7a3858dc7f059543a8807a8b551304b7e362a7ef",
|
|
"message": "initial commit\n",
|
|
"modified": [],
|
|
"removed": [],
|
|
"timestamp": "2024-01-24T18:59:25Z",
|
|
"url": "http://10.201.14.40:3000/root/example-push/commit/7a3858dc7f059543a8807a8b551304b7e362a7ef",
|
|
"verification": null
|
|
},
|
|
"pusher": {
|
|
"active": false,
|
|
"avatar_url": "http://10.201.14.40:3000/avatars/04edfc0ef6c6cf6d6b88fbc69f9f9071",
|
|
"created": "2024-01-24T18:57:32Z",
|
|
"description": "",
|
|
"email": "root@noreply.10.201.14.40",
|
|
"followers_count": 0,
|
|
"following_count": 0,
|
|
"full_name": "",
|
|
"id": 1,
|
|
"is_admin": false,
|
|
"language": "",
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
"location": "",
|
|
"login": "root",
|
|
"login_name": "",
|
|
"prohibit_login": false,
|
|
"restricted": false,
|
|
"starred_repos_count": 0,
|
|
"username": "root",
|
|
"visibility": "public",
|
|
"website": ""
|
|
},
|
|
"ref": "refs/heads/main",
|
|
"repository": {
|
|
"allow_merge_commits": true,
|
|
"allow_rebase": true,
|
|
"allow_rebase_explicit": true,
|
|
"allow_rebase_update": true,
|
|
"allow_squash_merge": true,
|
|
"archived": false,
|
|
"archived_at": "1970-01-01T00:00:00Z",
|
|
"avatar_url": "",
|
|
"clone_url": "http://10.201.14.40:3000/root/example-push.git",
|
|
"created_at": "2024-01-24T18:59:25Z",
|
|
"default_allow_maintainer_edit": false,
|
|
"default_branch": "main",
|
|
"default_delete_branch_after_merge": false,
|
|
"default_merge_style": "merge",
|
|
"description": "",
|
|
"empty": false,
|
|
"fork": false,
|
|
"forks_count": 0,
|
|
"full_name": "root/example-push",
|
|
"has_actions": true,
|
|
"has_issues": true,
|
|
"has_packages": true,
|
|
"has_projects": true,
|
|
"has_pull_requests": true,
|
|
"has_releases": true,
|
|
"has_wiki": true,
|
|
"html_url": "http://10.201.14.40:3000/root/example-push",
|
|
"id": 2,
|
|
"ignore_whitespace_conflicts": false,
|
|
"internal": false,
|
|
"internal_tracker": {
|
|
"allow_only_contributors_to_track_time": true,
|
|
"enable_issue_dependencies": true,
|
|
"enable_time_tracker": true
|
|
},
|
|
"language": "",
|
|
"languages_url": "http://10.201.14.40:3000/api/v1/repos/root/example-push/languages",
|
|
"link": "",
|
|
"mirror": false,
|
|
"mirror_interval": "",
|
|
"mirror_updated": "0001-01-01T00:00:00Z",
|
|
"name": "example-push",
|
|
"object_format_name": "",
|
|
"open_issues_count": 0,
|
|
"open_pr_counter": 0,
|
|
"original_url": "",
|
|
"owner": {
|
|
"active": false,
|
|
"avatar_url": "http://10.201.14.40:3000/avatars/04edfc0ef6c6cf6d6b88fbc69f9f9071",
|
|
"created": "2024-01-24T18:57:32Z",
|
|
"description": "",
|
|
"email": "root@example.com",
|
|
"followers_count": 0,
|
|
"following_count": 0,
|
|
"full_name": "",
|
|
"id": 1,
|
|
"is_admin": false,
|
|
"language": "",
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
"location": "",
|
|
"login": "root",
|
|
"login_name": "",
|
|
"prohibit_login": false,
|
|
"restricted": false,
|
|
"starred_repos_count": 0,
|
|
"username": "root",
|
|
"visibility": "public",
|
|
"website": ""
|
|
},
|
|
"parent": null,
|
|
"permissions": {
|
|
"admin": true,
|
|
"pull": true,
|
|
"push": true
|
|
},
|
|
"private": false,
|
|
"release_counter": 0,
|
|
"repo_transfer": null,
|
|
"size": 25,
|
|
"ssh_url": "forgejo@10.201.14.40:root/example-push.git",
|
|
"stars_count": 0,
|
|
"template": false,
|
|
"updated_at": "2024-01-24T18:59:25Z",
|
|
"url": "http://10.201.14.40:3000/api/v1/repos/root/example-push",
|
|
"watchers_count": 1,
|
|
"website": ""
|
|
},
|
|
"sender": {
|
|
"active": false,
|
|
"avatar_url": "http://10.201.14.40:3000/avatars/04edfc0ef6c6cf6d6b88fbc69f9f9071",
|
|
"created": "2024-01-24T18:57:32Z",
|
|
"description": "",
|
|
"email": "root@noreply.10.201.14.40",
|
|
"followers_count": 0,
|
|
"following_count": 0,
|
|
"full_name": "",
|
|
"id": 1,
|
|
"is_admin": false,
|
|
"language": "",
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
"location": "",
|
|
"login": "root",
|
|
"login_name": "",
|
|
"prohibit_login": false,
|
|
"restricted": false,
|
|
"starred_repos_count": 0,
|
|
"username": "root",
|
|
"visibility": "public",
|
|
"website": ""
|
|
},
|
|
"total_commits": 0
|
|
}
|
|
-
|
|
id: 793
|
|
title: "job output"
|
|
repo_id: 4
|
|
owner_id: 1
|
|
workflow_id: "test.yaml"
|
|
index: 189
|
|
trigger_user_id: 1
|
|
ref: "refs/heads/master"
|
|
commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0"
|
|
event: "push"
|
|
is_fork_pull_request: 0
|
|
status: 1
|
|
started: 1683636528
|
|
stopped: 1683636626
|
|
created: 1683636108
|
|
updated: 1683636626
|
|
need_approval: 0
|
|
approved_by: 0
|
|
-
|
|
id: 794
|
|
title: "job output"
|
|
repo_id: 4
|
|
owner_id: 1
|
|
workflow_id: "test.yaml"
|
|
index: 190
|
|
trigger_user_id: 1
|
|
ref: "refs/heads/test"
|
|
commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0"
|
|
event: "push"
|
|
is_fork_pull_request: 0
|
|
status: 1
|
|
started: 1683636528
|
|
stopped: 1683636626
|
|
created: 1683636108
|
|
updated: 1683636626
|
|
need_approval: 0
|
|
approved_by: 0
|
|
-
|
|
id: 891
|
|
title: "update actions"
|
|
repo_id: 1
|
|
owner_id: 1
|
|
workflow_id: "artifact.yaml"
|
|
index: 187
|
|
trigger_user_id: 1
|
|
ref: "refs/heads/branch2"
|
|
commit_sha: "985f0301dba5e7b34be866819cd15ad3d8f508ee"
|
|
event: "push"
|
|
is_fork_pull_request: 0
|
|
status: 1 # success
|
|
started: 1683636528
|
|
stopped: 1683636626
|
|
created: 1683636108
|
|
updated: 1683636626
|
|
need_approval: 0
|
|
approved_by: 0
|
|
event_payload: '{"head_commit":{"id":"5f22f7d0d95d614d25a5b68592adb345a4b5c7fd"}}'
|
|
|
|
|
|
# GET action run(s) test
|
|
-
|
|
id: 892
|
|
title: "successful push run"
|
|
repo_id: 63
|
|
owner_id: 2
|
|
workflow_id: "success.yaml"
|
|
index: 1
|
|
trigger_user_id: 2
|
|
ref: "refs/heads/main"
|
|
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
|
|
event: "push"
|
|
is_fork_pull_request: 0
|
|
status: 1 # success
|
|
started: 1683636528
|
|
stopped: 1683636626
|
|
created: 1683636108
|
|
updated: 1683636626
|
|
need_approval: 0
|
|
approved_by: 0
|
|
|
|
-
|
|
id: 893
|
|
title: "failed pull_request run"
|
|
repo_id: 63
|
|
owner_id: 2
|
|
workflow_id: "failed.yaml"
|
|
index: 2
|
|
trigger_user_id: 2
|
|
ref: "refs/heads/bugfix-1"
|
|
commit_sha: "35c5cddfc19397501ec8f4f7bb808a7c8f04445f"
|
|
event: "pull_request"
|
|
is_fork_pull_request: 0
|
|
status: 2 # failure
|
|
started: 1683636528
|
|
stopped: 1683636626
|
|
created: 1683636108
|
|
updated: 1683636626
|
|
need_approval: 0
|
|
approved_by: 0
|
|
|
|
-
|
|
id: 894
|
|
title: "running workflow_dispatch run"
|
|
repo_id: 63
|
|
owner_id: 2
|
|
workflow_id: "running.yaml"
|
|
index: 3
|
|
trigger_user_id: 2
|
|
ref: "refs/heads/main"
|
|
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
|
|
event: "workflow_dispatch"
|
|
is_fork_pull_request: 0
|
|
status: 6 # running
|
|
started: 1683636528
|
|
created: 1683636108
|
|
updated: 1683636626
|
|
need_approval: 0
|
|
approved_by: 0
|