Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
webhooks/github: Add fixtures for commit status events.
Pritesh Shetty58da9ad055dc
diff --git a/zerver/webhooks/github/fixtures/status__error.json b/zerver/webhooks/github/fixtures/status__error.jsonnew file mode 100644index 00000000000..0c9e09c7238--- /dev/null+++ b/zerver/webhooks/github/fixtures/status__error.json@@ -0,0 +1,234 @@+{+ "id": 44451488437,+ "sha": "0d3d538167b1d22823353f5612141d18371dd42c",+ "name": "Pritesh-30/test-repo",+ "target_url": null,+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "context": "ci/test",+ "description": "Tests passed",+ "state": "error",+ "commit": {+ "sha": "0d3d538167b1d22823353f5612141d18371dd42c",+ "node_id": "C_kwDOQwktttoAKDBkM2Q1MzgxNjdiMWQyMjgyMzM1M2Y1NjEyMTQxZDE4MzcxZGQ0MmM",+ "commit": {+ "author": {+ "name": "Pritesh-30",+ "email": "[email protected]",+ "date": "2026-01-04T19:05:12Z"+ },+ "committer": {+ "name": "Pritesh-30",+ "email": "[email protected]",+ "date": "2026-01-04T19:05:12Z"+ },+ "message": "added",+ "tree": {+ "sha": "55d1dc8a3dbfcf1df17d0c6e8116b12a12868806",+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/git/trees/55d1dc8a3dbfcf1df17d0c6e8116b12a12868806"+ },+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/git/commits/0d3d538167b1d22823353f5612141d18371dd42c",+ "comment_count": 0,+ "verification": {+ "verified": false,+ "reason": "unsigned",+ "signature": null,+ "payload": null,+ "verified_at": null+ }+ },+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/0d3d538167b1d22823353f5612141d18371dd42c",+ "html_url": "https://github.com/Pritesh-30/test-repo/commit/0d3d538167b1d22823353f5612141d18371dd42c",+ "comments_url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/0d3d538167b1d22823353f5612141d18371dd42c/comments",+ "author": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ },+ "committer": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ },+ "parents": [++ ]+ },+ "branches": [+ {+ "name": "feature",+ "commit": {+ "sha": "c308eeb1271af1f4d072cf79e2b4681f2eb88fbb",+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/c308eeb1271af1f4d072cf79e2b4681f2eb88fbb"+ },+ "protected": false+ },+ {+ "name": "main",+ "commit": {+ "sha": "672efe3e13b3802a8f3369ad914b9562de363ad2",+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/672efe3e13b3802a8f3369ad914b9562de363ad2"+ },+ "protected": false+ }+ ],+ "created_at": "2026-03-09T18:01:22+00:00",+ "updated_at": "2026-03-09T18:01:22+00:00",+ "repository": {+ "id": 1124674998,+ "node_id": "R_kgDOQwkttg",+ "name": "test-repo",+ "full_name": "Pritesh-30/test-repo",+ "private": false,+ "owner": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ },+ "html_url": "https://github.com/Pritesh-30/test-repo",+ "description": null,+ "fork": false,+ "url": "https://api.github.com/repos/Pritesh-30/test-repo",+ "forks_url": "https://api.github.com/repos/Pritesh-30/test-repo/forks",+ "keys_url": "https://api.github.com/repos/Pritesh-30/test-repo/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/Pritesh-30/test-repo/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/Pritesh-30/test-repo/teams",+ "hooks_url": "https://api.github.com/repos/Pritesh-30/test-repo/hooks",+ "issue_events_url": "https://api.github.com/repos/Pritesh-30/test-repo/issues/events{/number}",+ "events_url": "https://api.github.com/repos/Pritesh-30/test-repo/events",+ "assignees_url": "https://api.github.com/repos/Pritesh-30/test-repo/assignees{/user}",+ "branches_url": "https://api.github.com/repos/Pritesh-30/test-repo/branches{/branch}",+ "tags_url": "https://api.github.com/repos/Pritesh-30/test-repo/tags",+ "blobs_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/Pritesh-30/test-repo/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/Pritesh-30/test-repo/languages",+ "stargazers_url": "https://api.github.com/repos/Pritesh-30/test-repo/stargazers",+ "contributors_url": "https://api.github.com/repos/Pritesh-30/test-repo/contributors",+ "subscribers_url": "https://api.github.com/repos/Pritesh-30/test-repo/subscribers",+ "subscription_url": "https://api.github.com/repos/Pritesh-30/test-repo/subscription",+ "commits_url": "https://api.github.com/repos/Pritesh-30/test-repo/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/Pritesh-30/test-repo/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/Pritesh-30/test-repo/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/Pritesh-30/test-repo/contents/{+path}",+ "compare_url": "https://api.github.com/repos/Pritesh-30/test-repo/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/Pritesh-30/test-repo/merges",+ "archive_url": "https://api.github.com/repos/Pritesh-30/test-repo/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/Pritesh-30/test-repo/downloads",+ "issues_url": "https://api.github.com/repos/Pritesh-30/test-repo/issues{/number}",+ "pulls_url": "https://api.github.com/repos/Pritesh-30/test-repo/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/Pritesh-30/test-repo/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/Pritesh-30/test-repo/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/Pritesh-30/test-repo/labels{/name}",+ "releases_url": "https://api.github.com/repos/Pritesh-30/test-repo/releases{/id}",+ "deployments_url": "https://api.github.com/repos/Pritesh-30/test-repo/deployments",+ "created_at": "2025-12-29T12:22:21Z",+ "updated_at": "2026-02-07T19:40:21Z",+ "pushed_at": "2026-02-07T19:40:18Z",+ "git_url": "git://github.com/Pritesh-30/test-repo.git",+ "ssh_url": "[email protected]:Pritesh-30/test-repo.git",+ "clone_url": "https://github.com/Pritesh-30/test-repo.git",+ "svn_url": "https://github.com/Pritesh-30/test-repo",+ "homepage": null,+ "size": 7,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "CSS",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "has_discussions": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 6,+ "license": null,+ "allow_forking": true,+ "is_template": false,+ "web_commit_signoff_required": false,+ "has_pull_requests": true,+ "pull_request_creation_policy": "all",+ "topics": [++ ],+ "visibility": "public",+ "forks": 0,+ "open_issues": 6,+ "watchers": 0,+ "default_branch": "feature"+ },+ "sender": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ }+}diff --git a/zerver/webhooks/github/fixtures/status__failure.json b/zerver/webhooks/github/fixtures/status__failure.jsonnew file mode 100644index 00000000000..990f526afb6--- /dev/null+++ b/zerver/webhooks/github/fixtures/status__failure.json@@ -0,0 +1,232 @@+{+ "id": 44451462635,+ "sha": "0d3d538167b1d22823353f5612141d18371dd42c",+ "name": "Pritesh-30/test-repo",+ "target_url": null,+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "context": "ci/test",+ "description": "Tests passed",+ "state": "failure",+ "commit": {+ "sha": "0d3d538167b1d22823353f5612141d18371dd42c",+ "node_id": "C_kwDOQwktttoAKDBkM2Q1MzgxNjdiMWQyMjgyMzM1M2Y1NjEyMTQxZDE4MzcxZGQ0MmM",+ "commit": {+ "author": {+ "name": "Pritesh-30",+ "email": "[email protected]",+ "date": "2026-01-04T19:05:12Z"+ },+ "committer": {+ "name": "Pritesh-30",+ "email": "[email protected]",+ "date": "2026-01-04T19:05:12Z"+ },+ "message": "added",+ "tree": {+ "sha": "55d1dc8a3dbfcf1df17d0c6e8116b12a12868806",+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/git/trees/55d1dc8a3dbfcf1df17d0c6e8116b12a12868806"+ },+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/git/commits/0d3d538167b1d22823353f5612141d18371dd42c",+ "comment_count": 0,+ "verification": {+ "verified": false,+ "reason": "unsigned",+ "signature": null,+ "payload": null,+ "verified_at": null+ }+ },+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/0d3d538167b1d22823353f5612141d18371dd42c",+ "html_url": "https://github.com/Pritesh-30/test-repo/commit/0d3d538167b1d22823353f5612141d18371dd42c",+ "comments_url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/0d3d538167b1d22823353f5612141d18371dd42c/comments",+ "author": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ },+ "committer": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ },+ "parents": []+ },+ "branches": [+ {+ "name": "feature",+ "commit": {+ "sha": "c308eeb1271af1f4d072cf79e2b4681f2eb88fbb",+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/c308eeb1271af1f4d072cf79e2b4681f2eb88fbb"+ },+ "protected": false+ },+ {+ "name": "main",+ "commit": {+ "sha": "672efe3e13b3802a8f3369ad914b9562de363ad2",+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/672efe3e13b3802a8f3369ad914b9562de363ad2"+ },+ "protected": false+ }+ ],+ "created_at": "2026-03-09T18:00:54+00:00",+ "updated_at": "2026-03-09T18:00:54+00:00",+ "repository": {+ "id": 1124674998,+ "node_id": "R_kgDOQwkttg",+ "name": "test-repo",+ "full_name": "Pritesh-30/test-repo",+ "private": false,+ "owner": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ },+ "html_url": "https://github.com/Pritesh-30/test-repo",+ "description": null,+ "fork": false,+ "url": "https://api.github.com/repos/Pritesh-30/test-repo",+ "forks_url": "https://api.github.com/repos/Pritesh-30/test-repo/forks",+ "keys_url": "https://api.github.com/repos/Pritesh-30/test-repo/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/Pritesh-30/test-repo/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/Pritesh-30/test-repo/teams",+ "hooks_url": "https://api.github.com/repos/Pritesh-30/test-repo/hooks",+ "issue_events_url": "https://api.github.com/repos/Pritesh-30/test-repo/issues/events{/number}",+ "events_url": "https://api.github.com/repos/Pritesh-30/test-repo/events",+ "assignees_url": "https://api.github.com/repos/Pritesh-30/test-repo/assignees{/user}",+ "branches_url": "https://api.github.com/repos/Pritesh-30/test-repo/branches{/branch}",+ "tags_url": "https://api.github.com/repos/Pritesh-30/test-repo/tags",+ "blobs_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/Pritesh-30/test-repo/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/Pritesh-30/test-repo/languages",+ "stargazers_url": "https://api.github.com/repos/Pritesh-30/test-repo/stargazers",+ "contributors_url": "https://api.github.com/repos/Pritesh-30/test-repo/contributors",+ "subscribers_url": "https://api.github.com/repos/Pritesh-30/test-repo/subscribers",+ "subscription_url": "https://api.github.com/repos/Pritesh-30/test-repo/subscription",+ "commits_url": "https://api.github.com/repos/Pritesh-30/test-repo/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/Pritesh-30/test-repo/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/Pritesh-30/test-repo/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/Pritesh-30/test-repo/contents/{+path}",+ "compare_url": "https://api.github.com/repos/Pritesh-30/test-repo/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/Pritesh-30/test-repo/merges",+ "archive_url": "https://api.github.com/repos/Pritesh-30/test-repo/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/Pritesh-30/test-repo/downloads",+ "issues_url": "https://api.github.com/repos/Pritesh-30/test-repo/issues{/number}",+ "pulls_url": "https://api.github.com/repos/Pritesh-30/test-repo/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/Pritesh-30/test-repo/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/Pritesh-30/test-repo/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/Pritesh-30/test-repo/labels{/name}",+ "releases_url": "https://api.github.com/repos/Pritesh-30/test-repo/releases{/id}",+ "deployments_url": "https://api.github.com/repos/Pritesh-30/test-repo/deployments",+ "created_at": "2025-12-29T12:22:21Z",+ "updated_at": "2026-02-07T19:40:21Z",+ "pushed_at": "2026-02-07T19:40:18Z",+ "git_url": "git://github.com/Pritesh-30/test-repo.git",+ "ssh_url": "[email protected]:Pritesh-30/test-repo.git",+ "clone_url": "https://github.com/Pritesh-30/test-repo.git",+ "svn_url": "https://github.com/Pritesh-30/test-repo",+ "homepage": null,+ "size": 7,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "CSS",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "has_discussions": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 6,+ "license": null,+ "allow_forking": true,+ "is_template": false,+ "web_commit_signoff_required": false,+ "has_pull_requests": true,+ "pull_request_creation_policy": "all",+ "topics": [++ ],+ "visibility": "public",+ "forks": 0,+ "open_issues": 6,+ "watchers": 0,+ "default_branch": "feature"+ },+ "sender": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ }+}diff --git a/zerver/webhooks/github/fixtures/status__pending.json b/zerver/webhooks/github/fixtures/status__pending.jsonnew file mode 100644index 00000000000..80061bfd7c0--- /dev/null+++ b/zerver/webhooks/github/fixtures/status__pending.json@@ -0,0 +1,232 @@+{+ "id": 44451473579,+ "sha": "0d3d538167b1d22823353f5612141d18371dd42c",+ "name": "Pritesh-30/test-repo",+ "target_url": null,+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "context": "ci/test",+ "description": "Tests passed",+ "state": "pending",+ "commit": {+ "sha": "0d3d538167b1d22823353f5612141d18371dd42c",+ "node_id": "C_kwDOQwktttoAKDBkM2Q1MzgxNjdiMWQyMjgyMzM1M2Y1NjEyMTQxZDE4MzcxZGQ0MmM",+ "commit": {+ "author": {+ "name": "Pritesh-30",+ "email": "[email protected]",+ "date": "2026-01-04T19:05:12Z"+ },+ "committer": {+ "name": "Pritesh-30",+ "email": "[email protected]",+ "date": "2026-01-04T19:05:12Z"+ },+ "message": "added",+ "tree": {+ "sha": "55d1dc8a3dbfcf1df17d0c6e8116b12a12868806",+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/git/trees/55d1dc8a3dbfcf1df17d0c6e8116b12a12868806"+ },+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/git/commits/0d3d538167b1d22823353f5612141d18371dd42c",+ "comment_count": 0,+ "verification": {+ "verified": false,+ "reason": "unsigned",+ "signature": null,+ "payload": null,+ "verified_at": null+ }+ },+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/0d3d538167b1d22823353f5612141d18371dd42c",+ "html_url": "https://github.com/Pritesh-30/test-repo/commit/0d3d538167b1d22823353f5612141d18371dd42c",+ "comments_url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/0d3d538167b1d22823353f5612141d18371dd42c/comments",+ "author": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ },+ "committer": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ },+ "parents": []+ },+ "branches": [+ {+ "name": "feature",+ "commit": {+ "sha": "c308eeb1271af1f4d072cf79e2b4681f2eb88fbb",+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/c308eeb1271af1f4d072cf79e2b4681f2eb88fbb"+ },+ "protected": false+ },+ {+ "name": "main",+ "commit": {+ "sha": "672efe3e13b3802a8f3369ad914b9562de363ad2",+ "url": "https://api.github.com/repos/Pritesh-30/test-repo/commits/672efe3e13b3802a8f3369ad914b9562de363ad2"+ },+ "protected": false+ }+ ],+ "created_at": "2026-03-09T18:01:06+00:00",+ "updated_at": "2026-03-09T18:01:06+00:00",+ "repository": {+ "id": 1124674998,+ "node_id": "R_kgDOQwkttg",+ "name": "test-repo",+ "full_name": "Pritesh-30/test-repo",+ "private": false,+ "owner": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ },+ "html_url": "https://github.com/Pritesh-30/test-repo",+ "description": null,+ "fork": false,+ "url": "https://api.github.com/repos/Pritesh-30/test-repo",+ "forks_url": "https://api.github.com/repos/Pritesh-30/test-repo/forks",+ "keys_url": "https://api.github.com/repos/Pritesh-30/test-repo/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/Pritesh-30/test-repo/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/Pritesh-30/test-repo/teams",+ "hooks_url": "https://api.github.com/repos/Pritesh-30/test-repo/hooks",+ "issue_events_url": "https://api.github.com/repos/Pritesh-30/test-repo/issues/events{/number}",+ "events_url": "https://api.github.com/repos/Pritesh-30/test-repo/events",+ "assignees_url": "https://api.github.com/repos/Pritesh-30/test-repo/assignees{/user}",+ "branches_url": "https://api.github.com/repos/Pritesh-30/test-repo/branches{/branch}",+ "tags_url": "https://api.github.com/repos/Pritesh-30/test-repo/tags",+ "blobs_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/Pritesh-30/test-repo/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/Pritesh-30/test-repo/languages",+ "stargazers_url": "https://api.github.com/repos/Pritesh-30/test-repo/stargazers",+ "contributors_url": "https://api.github.com/repos/Pritesh-30/test-repo/contributors",+ "subscribers_url": "https://api.github.com/repos/Pritesh-30/test-repo/subscribers",+ "subscription_url": "https://api.github.com/repos/Pritesh-30/test-repo/subscription",+ "commits_url": "https://api.github.com/repos/Pritesh-30/test-repo/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/Pritesh-30/test-repo/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/Pritesh-30/test-repo/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/Pritesh-30/test-repo/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/Pritesh-30/test-repo/contents/{+path}",+ "compare_url": "https://api.github.com/repos/Pritesh-30/test-repo/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/Pritesh-30/test-repo/merges",+ "archive_url": "https://api.github.com/repos/Pritesh-30/test-repo/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/Pritesh-30/test-repo/downloads",+ "issues_url": "https://api.github.com/repos/Pritesh-30/test-repo/issues{/number}",+ "pulls_url": "https://api.github.com/repos/Pritesh-30/test-repo/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/Pritesh-30/test-repo/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/Pritesh-30/test-repo/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/Pritesh-30/test-repo/labels{/name}",+ "releases_url": "https://api.github.com/repos/Pritesh-30/test-repo/releases{/id}",+ "deployments_url": "https://api.github.com/repos/Pritesh-30/test-repo/deployments",+ "created_at": "2025-12-29T12:22:21Z",+ "updated_at": "2026-02-07T19:40:21Z",+ "pushed_at": "2026-02-07T19:40:18Z",+ "git_url": "git://github.com/Pritesh-30/test-repo.git",+ "ssh_url": "[email protected]:Pritesh-30/test-repo.git",+ "clone_url": "https://github.com/Pritesh-30/test-repo.git",+ "svn_url": "https://github.com/Pritesh-30/test-repo",+ "homepage": null,+ "size": 7,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "CSS",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "has_discussions": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 6,+ "license": null,+ "allow_forking": true,+ "is_template": false,+ "web_commit_signoff_required": false,+ "has_pull_requests": true,+ "pull_request_creation_policy": "all",+ "topics": [++ ],+ "visibility": "public",+ "forks": 0,+ "open_issues": 6,+ "watchers": 0,+ "default_branch": "feature"+ },+ "sender": {+ "login": "Pritesh-30",+ "id": 190011583,+ "node_id": "U_kgDOC1NYvw",+ "avatar_url": "https://avatars.githubusercontent.com/u/190011583?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/Pritesh-30",+ "html_url": "https://github.com/Pritesh-30",+ "followers_url": "https://api.github.com/users/Pritesh-30/followers",+ "following_url": "https://api.github.com/users/Pritesh-30/following{/other_user}",+ "gists_url": "https://api.github.com/users/Pritesh-30/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/Pritesh-30/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/Pritesh-30/subscriptions",+ "organizations_url": "https://api.github.com/users/Pritesh-30/orgs",+ "repos_url": "https://api.github.com/users/Pritesh-30/repos",+ "events_url": "https://api.github.com/users/Pritesh-30/events{/privacy}",+ "received_events_url": "https://api.github.com/users/Pritesh-30/received_events",+ "type": "User",+ "user_view_type": "public",+ "site_admin": false+ }+}diff --git a/zerver/webhooks/github/fixtures/status.json b/zerver/webhooks/github/fixtures/status__success.jsonsimilarity index 100%rename from zerver/webhooks/github/fixtures/status.jsonrename to zerver/webhooks/github/fixtures/status__success.jsondiff --git a/zerver/webhooks/github/tests.py b/zerver/webhooks/github/tests.pyindex 66f697f5bcc..8aa67a173e3 100644--- a/zerver/webhooks/github/tests.py+++ b/zerver/webhooks/github/tests.py@@ -403,7 +403,19 @@ class GitHubWebhookTest(WebhookTestCase):def test_status_msg(self) -> None:expected_message = "[9049f1265b7](https://github.com/baxterthehacker/public-repo/commit/9049f1265b7d61be4a8904a9a27120d2064dab3b) changed its status to success."- self.check_webhook("status", TOPIC_REPO, expected_message)+ self.check_webhook("status__success", TOPIC_REPO, expected_message)++ def test_status_failure_msg(self) -> None:+ expected_message = "[0d3d538167b](https://github.com/Pritesh-30/test-repo/commit/0d3d538167b1d22823353f5612141d18371dd42c) changed its status to failure."+ self.check_webhook("status__failure", "test-repo", expected_message)++ def test_status_pending_msg(self) -> None:+ expected_message = "[0d3d538167b](https://github.com/Pritesh-30/test-repo/commit/0d3d538167b1d22823353f5612141d18371dd42c) changed its status to pending."+ self.check_webhook("status__pending", "test-repo", expected_message)++ def test_status_error_msg(self) -> None:+ expected_message = "[0d3d538167b](https://github.com/Pritesh-30/test-repo/commit/0d3d538167b1d22823353f5612141d18371dd42c) changed its status to error."+ self.check_webhook("status__error", "test-repo", expected_message)def test_status_with_target_url_msg(self) -> None:expected_message = "[9049f1265b7](https://github.com/baxterthehacker/public-repo/commit/9049f1265b7d61be4a8904a9a27120d2064dab3b) changed its status to [success](https://example.com/build/status)."