2024-07-07 21:08:41 +02:00
|
|
|
package common
|
|
|
|
|
|
|
|
const examplePushJSON = `{
|
|
|
|
"ref": "refs/heads/main",
|
|
|
|
"before": "9fe6b18fee74f49786c39e062ef02bcfb560a0be6eb7851b81954123e2d55629",
|
|
|
|
"after": "7d0be2432c179873081b715b8d38a563b8469608e110205821ba6a894e63c616",
|
|
|
|
"compare_url": "https://src.opensuse.org/autogits/_ObsPrj/compare/9fe6b18fee74f49786c39e062ef02bcfb560a0be6eb7851b81954123e2d55629...7d0be2432c179873081b715b8d38a563b8469608e110205821ba6a894e63c616",
|
|
|
|
"commits": [
|
|
|
|
{
|
|
|
|
"id": "7d0be2432c179873081b715b8d38a563b8469608e110205821ba6a894e63c616",
|
|
|
|
"message": "Automatic project inclusion\n",
|
|
|
|
"url": "https://src.opensuse.org/autogits/_ObsPrj/commit/7d0be2432c179873081b715b8d38a563b8469608e110205821ba6a894e63c616",
|
|
|
|
"author": {
|
|
|
|
"name": "GiteaBot - AutoDevel",
|
|
|
|
"email": "not-exist@src.opensuse.org",
|
|
|
|
"username": ""
|
|
|
|
},
|
|
|
|
"committer": {
|
|
|
|
"name": "root",
|
|
|
|
"email": "not-exist@src.opensuse.org",
|
|
|
|
"username": ""
|
|
|
|
},
|
|
|
|
"verification": null,
|
|
|
|
"timestamp": "2024-06-25T14:38:31Z",
|
|
|
|
"added": [
|
|
|
|
".gitmodules",
|
|
|
|
"nodejs22"
|
|
|
|
],
|
|
|
|
"removed": [],
|
|
|
|
"modified": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"total_commits": 1,
|
|
|
|
"head_commit": {
|
|
|
|
"id": "7d0be2432c179873081b715b8d38a563b8469608e110205821ba6a894e63c616",
|
|
|
|
"message": "Automatic project inclusion\n",
|
|
|
|
"url": "https://src.opensuse.org/autogits/_ObsPrj/commit/7d0be2432c179873081b715b8d38a563b8469608e110205821ba6a894e63c616",
|
|
|
|
"author": {
|
|
|
|
"name": "GiteaBot - AutoDevel",
|
|
|
|
"email": "not-exist@src.opensuse.org",
|
|
|
|
"username": ""
|
|
|
|
},
|
|
|
|
"committer": {
|
|
|
|
"name": "root",
|
|
|
|
"email": "not-exist@src.opensuse.org",
|
|
|
|
"username": ""
|
|
|
|
},
|
|
|
|
"verification": null,
|
|
|
|
"timestamp": "2024-06-25T14:38:31Z",
|
|
|
|
"added": [
|
|
|
|
".gitmodules",
|
|
|
|
"nodejs22"
|
|
|
|
],
|
|
|
|
"removed": [],
|
|
|
|
"modified": []
|
|
|
|
},
|
|
|
|
"repository": {
|
|
|
|
"id": 90487,
|
|
|
|
"owner": {
|
|
|
|
"id": 983,
|
|
|
|
"login": "autogits",
|
|
|
|
"login_name": "",
|
|
|
|
"source_id": 0,
|
|
|
|
"full_name": "",
|
|
|
|
"email": "",
|
|
|
|
"avatar_url": "https://src.opensuse.org/avatars/80a61ef3a14c3c22f0b8b1885d1a75d4",
|
|
|
|
"html_url": "https://src.opensuse.org/autogits",
|
|
|
|
"language": "",
|
|
|
|
"is_admin": false,
|
|
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
|
|
"created": "2024-06-20T09:46:37+02:00",
|
|
|
|
"restricted": false,
|
|
|
|
"active": false,
|
|
|
|
"prohibit_login": false,
|
|
|
|
"location": "",
|
|
|
|
"website": "",
|
|
|
|
"description": "",
|
|
|
|
"visibility": "public",
|
|
|
|
"followers_count": 0,
|
|
|
|
"following_count": 0,
|
|
|
|
"starred_repos_count": 0,
|
|
|
|
"username": "autogits"
|
|
|
|
},
|
|
|
|
"name": "_ObsPrj",
|
|
|
|
"full_name": "autogits/_ObsPrj",
|
|
|
|
"description": "",
|
|
|
|
"empty": false,
|
|
|
|
"private": false,
|
|
|
|
"fork": false,
|
|
|
|
"template": false,
|
|
|
|
"parent": null,
|
|
|
|
"mirror": false,
|
|
|
|
"size": 27,
|
|
|
|
"language": "",
|
|
|
|
"languages_url": "https://src.opensuse.org/api/v1/repos/autogits/_ObsPrj/languages",
|
|
|
|
"html_url": "https://src.opensuse.org/autogits/_ObsPrj",
|
|
|
|
"url": "https://src.opensuse.org/api/v1/repos/autogits/_ObsPrj",
|
|
|
|
"link": "",
|
|
|
|
"ssh_url": "gitea@src.opensuse.org:autogits/_ObsPrj.git",
|
|
|
|
"clone_url": "https://src.opensuse.org/autogits/_ObsPrj.git",
|
|
|
|
"original_url": "",
|
|
|
|
"website": "",
|
|
|
|
"stars_count": 0,
|
|
|
|
"forks_count": 0,
|
|
|
|
"watchers_count": 1,
|
|
|
|
"open_issues_count": 0,
|
|
|
|
"open_pr_counter": 0,
|
|
|
|
"release_counter": 0,
|
|
|
|
"default_branch": "main",
|
|
|
|
"archived": false,
|
|
|
|
"created_at": "2024-06-25T13:52:03+02:00",
|
|
|
|
"updated_at": "2024-06-25T16:20:44+02:00",
|
|
|
|
"archived_at": "1970-01-01T01:00:00+01:00",
|
|
|
|
"permissions": {
|
|
|
|
"admin": true,
|
|
|
|
"push": true,
|
|
|
|
"pull": true
|
|
|
|
},
|
|
|
|
"has_issues": true,
|
|
|
|
"internal_tracker": {
|
|
|
|
"enable_time_tracker": false,
|
|
|
|
"allow_only_contributors_to_track_time": true,
|
|
|
|
"enable_issue_dependencies": true
|
|
|
|
},
|
|
|
|
"has_wiki": true,
|
|
|
|
"has_pull_requests": true,
|
|
|
|
"has_projects": true,
|
|
|
|
"projects_mode": "all",
|
|
|
|
"has_releases": true,
|
|
|
|
"has_packages": true,
|
|
|
|
"has_actions": true,
|
|
|
|
"ignore_whitespace_conflicts": false,
|
|
|
|
"allow_merge_commits": true,
|
|
|
|
"allow_rebase": true,
|
|
|
|
"allow_rebase_explicit": true,
|
|
|
|
"allow_squash_merge": true,
|
|
|
|
"allow_fast_forward_only_merge": true,
|
|
|
|
"allow_rebase_update": true,
|
|
|
|
"default_delete_branch_after_merge": false,
|
|
|
|
"default_merge_style": "merge",
|
|
|
|
"default_allow_maintainer_edit": false,
|
|
|
|
"avatar_url": "https://src.opensuse.org/",
|
|
|
|
"internal": false,
|
|
|
|
"mirror_interval": "",
|
|
|
|
"object_format_name": "sha256",
|
|
|
|
"mirror_updated": "0001-01-01T00:00:00Z",
|
|
|
|
"repo_transfer": null
|
|
|
|
},
|
|
|
|
"pusher": {
|
|
|
|
"id": 129,
|
|
|
|
"login": "adamm",
|
|
|
|
"login_name": "",
|
|
|
|
"source_id": 0,
|
|
|
|
"full_name": "Adam Majer",
|
|
|
|
"email": "adamm@noreply@src.opensuse.org",
|
|
|
|
"avatar_url": "https://src.opensuse.org/avatar/babb6ae054a709c238a4e9b0f2b53d53",
|
|
|
|
"html_url": "https://src.opensuse.org/adamm",
|
|
|
|
"language": "",
|
|
|
|
"is_admin": false,
|
|
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
|
|
"created": "2023-07-21T16:43:48+02:00",
|
|
|
|
"restricted": false,
|
|
|
|
"active": false,
|
|
|
|
"prohibit_login": false,
|
|
|
|
"location": "",
|
|
|
|
"website": "",
|
|
|
|
"description": "",
|
|
|
|
"visibility": "public",
|
|
|
|
"followers_count": 0,
|
|
|
|
"following_count": 0,
|
|
|
|
"starred_repos_count": 0,
|
|
|
|
"username": "adamm"
|
|
|
|
},
|
|
|
|
"sender": {
|
|
|
|
"id": 129,
|
|
|
|
"login": "adamm",
|
|
|
|
"login_name": "",
|
|
|
|
"source_id": 0,
|
|
|
|
"full_name": "Adam Majer",
|
|
|
|
"email": "adamm@noreply@src.opensuse.org",
|
|
|
|
"avatar_url": "https://src.opensuse.org/avatar/babb6ae054a709c238a4e9b0f2b53d53",
|
|
|
|
"html_url": "https://src.opensuse.org/adamm",
|
|
|
|
"language": "",
|
|
|
|
"is_admin": false,
|
|
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
|
|
"created": "2023-07-21T16:43:48+02:00",
|
|
|
|
"restricted": false,
|
|
|
|
"active": false,
|
|
|
|
"prohibit_login": false,
|
|
|
|
"location": "",
|
|
|
|
"website": "",
|
|
|
|
"description": "",
|
|
|
|
"visibility": "public",
|
|
|
|
"followers_count": 0,
|
|
|
|
"following_count": 0,
|
|
|
|
"starred_repos_count": 0,
|
|
|
|
"username": "adamm"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`
|
|
|
|
|
|
|
|
const repoCreateJSON = `{
|
|
|
|
"action": "created",
|
|
|
|
"repository": {
|
|
|
|
"id": 87483,
|
|
|
|
"owner": {
|
|
|
|
"id": 983,
|
|
|
|
"login": "autogits",
|
|
|
|
"login_name": "",
|
|
|
|
"source_id": 0,
|
|
|
|
"full_name": "",
|
|
|
|
"email": "",
|
|
|
|
"avatar_url": "https://src.opensuse.org/avatars/80a61ef3a14c3c22f0b8b1885d1a75d4",
|
|
|
|
"html_url": "https://src.opensuse.org/autogits",
|
|
|
|
"language": "",
|
|
|
|
"is_admin": false,
|
|
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
|
|
"created": "2024-06-20T09:46:37+02:00",
|
|
|
|
"restricted": false,
|
|
|
|
"active": false,
|
|
|
|
"prohibit_login": false,
|
|
|
|
"location": "",
|
|
|
|
"website": "",
|
|
|
|
"description": "",
|
|
|
|
"visibility": "public",
|
|
|
|
"followers_count": 0,
|
|
|
|
"following_count": 0,
|
|
|
|
"starred_repos_count": 0,
|
|
|
|
"username": "autogits"
|
|
|
|
},
|
|
|
|
"name": "nodejs22",
|
|
|
|
"full_name": "autogits/nodejs22",
|
|
|
|
"description": "",
|
|
|
|
"empty": false,
|
|
|
|
"private": false,
|
|
|
|
"fork": true,
|
|
|
|
"template": false,
|
|
|
|
"parent": {
|
|
|
|
"id": 54598,
|
|
|
|
"owner": {
|
|
|
|
"id": 64,
|
|
|
|
"login": "pool",
|
|
|
|
"login_name": "",
|
|
|
|
"source_id": 0,
|
|
|
|
"full_name": "",
|
|
|
|
"email": "",
|
|
|
|
"avatar_url": "https://src.opensuse.org/avatars/b10a8c0bede9eb4ea771b04db3149f28",
|
|
|
|
"html_url": "https://src.opensuse.org/pool",
|
|
|
|
"language": "",
|
|
|
|
"is_admin": false,
|
|
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
|
|
"created": "2023-03-01T14:41:17+01:00",
|
|
|
|
"restricted": false,
|
|
|
|
"active": false,
|
|
|
|
"prohibit_login": false,
|
|
|
|
"location": "",
|
|
|
|
"website": "",
|
|
|
|
"description": "",
|
|
|
|
"visibility": "public",
|
|
|
|
"followers_count": 0,
|
|
|
|
"following_count": 0,
|
|
|
|
"starred_repos_count": 0,
|
|
|
|
"username": "pool"
|
|
|
|
},
|
|
|
|
"name": "nodejs22",
|
|
|
|
"full_name": "pool/nodejs22",
|
|
|
|
"description": "",
|
|
|
|
"empty": false,
|
|
|
|
"private": false,
|
|
|
|
"fork": false,
|
|
|
|
"template": false,
|
|
|
|
"parent": null,
|
|
|
|
"mirror": false,
|
|
|
|
"size": 190,
|
|
|
|
"language": "",
|
|
|
|
"languages_url": "https://src.opensuse.org/api/v1/repos/pool/nodejs22/languages",
|
|
|
|
"html_url": "https://src.opensuse.org/pool/nodejs22",
|
|
|
|
"url": "https://src.opensuse.org/api/v1/repos/pool/nodejs22",
|
|
|
|
"link": "",
|
|
|
|
"ssh_url": "gitea@src.opensuse.org:pool/nodejs22.git",
|
|
|
|
"clone_url": "https://src.opensuse.org/pool/nodejs22.git",
|
|
|
|
"original_url": "",
|
|
|
|
"website": "",
|
|
|
|
"stars_count": 0,
|
|
|
|
"forks_count": 3,
|
|
|
|
"watchers_count": 4,
|
|
|
|
"open_issues_count": 0,
|
|
|
|
"open_pr_counter": 1,
|
|
|
|
"release_counter": 0,
|
|
|
|
"default_branch": "factory",
|
|
|
|
"archived": false,
|
|
|
|
"created_at": "2024-05-28T12:47:21+02:00",
|
|
|
|
"updated_at": "2024-06-12T14:54:03+02:00",
|
|
|
|
"archived_at": "1970-01-01T01:00:00+01:00",
|
|
|
|
"permissions": {
|
|
|
|
"admin": true,
|
|
|
|
"push": true,
|
|
|
|
"pull": true
|
|
|
|
},
|
|
|
|
"has_issues": true,
|
|
|
|
"internal_tracker": {
|
|
|
|
"enable_time_tracker": false,
|
|
|
|
"allow_only_contributors_to_track_time": true,
|
|
|
|
"enable_issue_dependencies": true
|
|
|
|
},
|
|
|
|
"has_wiki": true,
|
|
|
|
"has_pull_requests": true,
|
|
|
|
"has_projects": true,
|
|
|
|
"projects_mode": "",
|
|
|
|
"has_releases": true,
|
|
|
|
"has_packages": true,
|
|
|
|
"has_actions": false,
|
|
|
|
"ignore_whitespace_conflicts": false,
|
|
|
|
"allow_merge_commits": true,
|
|
|
|
"allow_rebase": true,
|
|
|
|
"allow_rebase_explicit": true,
|
|
|
|
"allow_squash_merge": true,
|
|
|
|
"allow_fast_forward_only_merge": false,
|
|
|
|
"allow_rebase_update": true,
|
|
|
|
"default_delete_branch_after_merge": false,
|
|
|
|
"default_merge_style": "merge",
|
|
|
|
"default_allow_maintainer_edit": false,
|
|
|
|
"avatar_url": "https://src.opensuse.org/",
|
|
|
|
"internal": false,
|
|
|
|
"mirror_interval": "",
|
|
|
|
"object_format_name": "sha256",
|
|
|
|
"mirror_updated": "0001-01-01T00:00:00Z",
|
|
|
|
"repo_transfer": null
|
|
|
|
},
|
|
|
|
"mirror": false,
|
|
|
|
"size": 0,
|
|
|
|
"language": "",
|
|
|
|
"languages_url": "https://src.opensuse.org/api/v1/repos/autogits/nodejs22/languages",
|
|
|
|
"html_url": "https://src.opensuse.org/autogits/nodejs22",
|
|
|
|
"url": "https://src.opensuse.org/api/v1/repos/autogits/nodejs22",
|
|
|
|
"link": "",
|
|
|
|
"ssh_url": "gitea@src.opensuse.org:autogits/nodejs22.git",
|
|
|
|
"clone_url": "https://src.opensuse.org/autogits/nodejs22.git",
|
|
|
|
"original_url": "",
|
|
|
|
"website": "",
|
|
|
|
"stars_count": 0,
|
|
|
|
"forks_count": 0,
|
|
|
|
"watchers_count": 0,
|
|
|
|
"open_issues_count": 0,
|
|
|
|
"open_pr_counter": 0,
|
|
|
|
"release_counter": 0,
|
|
|
|
"default_branch": "factory",
|
|
|
|
"archived": false,
|
|
|
|
"created_at": "2024-06-20T10:09:12+02:00",
|
|
|
|
"updated_at": "2024-06-20T10:09:12+02:00",
|
|
|
|
"archived_at": "1970-01-01T01:00:00+01:00",
|
|
|
|
"permissions": {
|
|
|
|
"admin": true,
|
|
|
|
"push": true,
|
|
|
|
"pull": true
|
|
|
|
},
|
|
|
|
"has_issues": false,
|
|
|
|
"has_wiki": false,
|
|
|
|
"has_pull_requests": true,
|
|
|
|
"has_projects": false,
|
|
|
|
"projects_mode": "all",
|
|
|
|
"has_releases": false,
|
|
|
|
"has_packages": false,
|
|
|
|
"has_actions": false,
|
|
|
|
"ignore_whitespace_conflicts": false,
|
|
|
|
"allow_merge_commits": true,
|
|
|
|
"allow_rebase": true,
|
|
|
|
"allow_rebase_explicit": true,
|
|
|
|
"allow_squash_merge": true,
|
|
|
|
"allow_fast_forward_only_merge": true,
|
|
|
|
"allow_rebase_update": true,
|
|
|
|
"default_delete_branch_after_merge": false,
|
|
|
|
"default_merge_style": "merge",
|
|
|
|
"default_allow_maintainer_edit": false,
|
|
|
|
"avatar_url": "https://src.opensuse.org/",
|
|
|
|
"internal": false,
|
|
|
|
"mirror_interval": "",
|
|
|
|
"object_format_name": "sha256",
|
|
|
|
"mirror_updated": "0001-01-01T00:00:00Z",
|
|
|
|
"repo_transfer": null
|
|
|
|
},
|
|
|
|
"organization": {
|
|
|
|
"id": 983,
|
|
|
|
"login": "autogits",
|
|
|
|
"login_name": "",
|
|
|
|
"source_id": 0,
|
|
|
|
"full_name": "",
|
|
|
|
"email": "autogits@noreply@src.opensuse.org",
|
|
|
|
"avatar_url": "https://src.opensuse.org/avatars/80a61ef3a14c3c22f0b8b1885d1a75d4",
|
|
|
|
"html_url": "https://src.opensuse.org/autogits",
|
|
|
|
"language": "",
|
|
|
|
"is_admin": false,
|
|
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
|
|
"created": "2024-06-20T09:46:37+02:00",
|
|
|
|
"restricted": false,
|
|
|
|
"active": false,
|
|
|
|
"prohibit_login": false,
|
|
|
|
"location": "",
|
|
|
|
"website": "",
|
|
|
|
"description": "",
|
|
|
|
"visibility": "public",
|
|
|
|
"followers_count": 0,
|
|
|
|
"following_count": 0,
|
|
|
|
"starred_repos_count": 0,
|
|
|
|
"username": "autogits"
|
|
|
|
},
|
|
|
|
"sender": {
|
|
|
|
"id": 129,
|
|
|
|
"login": "adamm",
|
|
|
|
"login_name": "",
|
|
|
|
"source_id": 0,
|
|
|
|
"full_name": "Adam Majer",
|
|
|
|
"email": "adamm@noreply@src.opensuse.org",
|
|
|
|
"avatar_url": "https://src.opensuse.org/avatar/babb6ae054a709c238a4e9b0f2b53d53",
|
|
|
|
"html_url": "https://src.opensuse.org/adamm",
|
|
|
|
"language": "",
|
|
|
|
"is_admin": false,
|
|
|
|
"last_login": "0001-01-01T00:00:00Z",
|
|
|
|
"created": "2023-07-21T16:43:48+02:00",
|
|
|
|
"restricted": false,
|
|
|
|
"active": false,
|
|
|
|
"prohibit_login": false,
|
|
|
|
"location": "",
|
|
|
|
"website": "",
|
|
|
|
"description": "",
|
|
|
|
"visibility": "public",
|
|
|
|
"followers_count": 0,
|
|
|
|
"following_count": 0,
|
|
|
|
"starred_repos_count": 0,
|
|
|
|
"username": "adamm"
|
|
|
|
}
|
|
|
|
}`
|
2024-07-10 10:14:56 +02:00
|
|
|
|