Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
webhooks: Add support for more GitHub pull_request events.
Tushar Upadhyay6250902edc86
diff --git a/zerver/webhooks/github/fixtures/pull_request__auto_merge_disabled.json b/zerver/webhooks/github/fixtures/pull_request__auto_merge_disabled.jsonnew file mode 100644index 00000000000..a619793b7de--- /dev/null+++ b/zerver/webhooks/github/fixtures/pull_request__auto_merge_disabled.json@@ -0,0 +1,465 @@+{+ "action":"auto_merge_disabled",+ "number":1,+ "pull_request":{+ "url":"https://api.github.com/repos/tushar912/public-repo/pulls/1",+ "id":579107344,+ "node_id":"MDExOlB1bGxSZXF1ZXN0NTc5MTA3MzQ0",+ "html_url":"https://github.com/tushar912/public-repo/pull/1",+ "diff_url":"https://github.com/tushar912/public-repo/pull/1.diff",+ "patch_url":"https://github.com/tushar912/public-repo/pull/1.patch",+ "issue_url":"https://api.github.com/repos/tushar912/public-repo/issues/1",+ "number":1,+ "state":"open",+ "locked":false,+ "title":"Update the README with new information",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "body":"",+ "created_at":"2021-02-24T08:29:15Z",+ "updated_at":"2021-02-24T09:18:58Z",+ "closed_at":null,+ "merged_at":null,+ "merge_commit_sha":"d0e9bd15cbab3928acd9cf275b2a5d577038b0df",+ "assignee":null,+ "assignees":[++ ],+ "requested_reviewers":[++ ],+ "requested_teams":[++ ],+ "labels":[++ ],+ "milestone":null,+ "draft":false,+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/pulls/1/commits",+ "review_comments_url":"https://api.github.com/repos/tushar912/public-repo/pulls/1/comments",+ "review_comment_url":"https://api.github.com/repos/tushar912/public-repo/pulls/comments{/number}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/issues/1/comments",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f",+ "head":{+ "label":"tushar912:test",+ "ref":"test",+ "sha":"97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "repo":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main",+ "allow_squash_merge":true,+ "allow_merge_commit":true,+ "allow_rebase_merge":true,+ "delete_branch_on_merge":false+ }+ },+ "base":{+ "label":"tushar912:main",+ "ref":"main",+ "sha":"039310a8db95a3486c3787e4bf20dbe5ce6c9877",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "repo":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main",+ "allow_squash_merge":true,+ "allow_merge_commit":true,+ "allow_rebase_merge":true,+ "delete_branch_on_merge":false+ }+ },+ "_links":{+ "self":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1"+ },+ "html":{+ "href":"https://github.com/tushar912/public-repo/pull/1"+ },+ "issue":{+ "href":"https://api.github.com/repos/tushar912/public-repo/issues/1"+ },+ "comments":{+ "href":"https://api.github.com/repos/tushar912/public-repo/issues/1/comments"+ },+ "review_comments":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1/comments"+ },+ "review_comment":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/comments{/number}"+ },+ "commits":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1/commits"+ },+ "statuses":{+ "href":"https://api.github.com/repos/tushar912/public-repo/statuses/97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f"+ }+ },+ "author_association":"OWNER",+ "auto_merge":null,+ "active_lock_reason":null,+ "merged":false,+ "mergeable":true,+ "rebaseable":true,+ "mergeable_state":"clean",+ "merged_by":null,+ "comments":0,+ "review_comments":0,+ "maintainer_can_modify":false,+ "commits":1,+ "additions":1,+ "deletions":1,+ "changed_files":1+ },+ "reason":"Manually disabled by user",+ "repository":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main"+ },+ "sender":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ }+ }diff --git a/zerver/webhooks/github/fixtures/pull_request__auto_merge_enabled.json b/zerver/webhooks/github/fixtures/pull_request__auto_merge_enabled.jsonnew file mode 100644index 00000000000..8812f70cd5e--- /dev/null+++ b/zerver/webhooks/github/fixtures/pull_request__auto_merge_enabled.json@@ -0,0 +1,488 @@+{+ "action":"auto_merge_enabled",+ "number":1,+ "pull_request":{+ "url":"https://api.github.com/repos/tushar912/public-repo/pulls/1",+ "id":579107344,+ "node_id":"MDExOlB1bGxSZXF1ZXN0NTc5MTA3MzQ0",+ "html_url":"https://github.com/tushar912/public-repo/pull/1",+ "diff_url":"https://github.com/tushar912/public-repo/pull/1.diff",+ "patch_url":"https://github.com/tushar912/public-repo/pull/1.patch",+ "issue_url":"https://api.github.com/repos/tushar912/public-repo/issues/1",+ "number":1,+ "state":"open",+ "locked":false,+ "title":"Update the README with new information",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "body":"",+ "created_at":"2021-02-24T08:29:15Z",+ "updated_at":"2021-02-24T09:18:58Z",+ "closed_at":null,+ "merged_at":null,+ "merge_commit_sha":"d0e9bd15cbab3928acd9cf275b2a5d577038b0df",+ "assignee":null,+ "assignees":[++ ],+ "requested_reviewers":[++ ],+ "requested_teams":[++ ],+ "labels":[++ ],+ "milestone":null,+ "draft":false,+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/pulls/1/commits",+ "review_comments_url":"https://api.github.com/repos/tushar912/public-repo/pulls/1/comments",+ "review_comment_url":"https://api.github.com/repos/tushar912/public-repo/pulls/comments{/number}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/issues/1/comments",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f",+ "head":{+ "label":"tushar912:test",+ "ref":"test",+ "sha":"97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "repo":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main",+ "allow_squash_merge":true,+ "allow_merge_commit":true,+ "allow_rebase_merge":true,+ "delete_branch_on_merge":false+ }+ },+ "base":{+ "label":"tushar912:main",+ "ref":"main",+ "sha":"039310a8db95a3486c3787e4bf20dbe5ce6c9877",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "repo":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main",+ "allow_squash_merge":true,+ "allow_merge_commit":true,+ "allow_rebase_merge":true,+ "delete_branch_on_merge":false+ }+ },+ "_links":{+ "self":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1"+ },+ "html":{+ "href":"https://github.com/tushar912/public-repo/pull/1"+ },+ "issue":{+ "href":"https://api.github.com/repos/tushar912/public-repo/issues/1"+ },+ "comments":{+ "href":"https://api.github.com/repos/tushar912/public-repo/issues/1/comments"+ },+ "review_comments":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1/comments"+ },+ "review_comment":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/comments{/number}"+ },+ "commits":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1/commits"+ },+ "statuses":{+ "href":"https://api.github.com/repos/tushar912/public-repo/statuses/97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f"+ }+ },+ "author_association":"OWNER",+ "auto_merge":{+ "enabled_by":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "merge_method":"merge",+ "commit_title":"Merge pull request #1 from tushar912/test",+ "commit_message":"Update the README with new information"+ },+ "active_lock_reason":null,+ "merged":false,+ "mergeable":true,+ "rebaseable":true,+ "mergeable_state":"clean",+ "merged_by":null,+ "comments":0,+ "review_comments":0,+ "maintainer_can_modify":false,+ "commits":1,+ "additions":1,+ "deletions":1,+ "changed_files":1+ },+ "repository":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main"+ },+ "sender":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ }+ }diff --git a/zerver/webhooks/github/fixtures/pull_request__locked.json b/zerver/webhooks/github/fixtures/pull_request__locked.jsonnew file mode 100644index 00000000000..43f5eb7cacb--- /dev/null+++ b/zerver/webhooks/github/fixtures/pull_request__locked.json@@ -0,0 +1,464 @@+{+ "action":"locked",+ "number":1,+ "pull_request":{+ "url":"https://api.github.com/repos/tushar912/public-repo/pulls/1",+ "id":579107344,+ "node_id":"MDExOlB1bGxSZXF1ZXN0NTc5MTA3MzQ0",+ "html_url":"https://github.com/tushar912/public-repo/pull/1",+ "diff_url":"https://github.com/tushar912/public-repo/pull/1.diff",+ "patch_url":"https://github.com/tushar912/public-repo/pull/1.patch",+ "issue_url":"https://api.github.com/repos/tushar912/public-repo/issues/1",+ "number":1,+ "state":"open",+ "locked":true,+ "title":"Update the README with new information",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "body":"",+ "created_at":"2021-02-24T08:29:15Z",+ "updated_at":"2021-02-24T08:29:57Z",+ "closed_at":null,+ "merged_at":null,+ "merge_commit_sha":"ed1a02e41801c337ffda8e2e303e726446109ad6",+ "assignee":null,+ "assignees":[++ ],+ "requested_reviewers":[++ ],+ "requested_teams":[++ ],+ "labels":[++ ],+ "milestone":null,+ "draft":false,+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/pulls/1/commits",+ "review_comments_url":"https://api.github.com/repos/tushar912/public-repo/pulls/1/comments",+ "review_comment_url":"https://api.github.com/repos/tushar912/public-repo/pulls/comments{/number}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/issues/1/comments",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f",+ "head":{+ "label":"tushar912:test",+ "ref":"test",+ "sha":"97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "repo":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main",+ "allow_squash_merge":true,+ "allow_merge_commit":true,+ "allow_rebase_merge":true,+ "delete_branch_on_merge":false+ }+ },+ "base":{+ "label":"tushar912:main",+ "ref":"main",+ "sha":"039310a8db95a3486c3787e4bf20dbe5ce6c9877",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "repo":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main",+ "allow_squash_merge":true,+ "allow_merge_commit":true,+ "allow_rebase_merge":true,+ "delete_branch_on_merge":false+ }+ },+ "_links":{+ "self":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1"+ },+ "html":{+ "href":"https://github.com/tushar912/public-repo/pull/1"+ },+ "issue":{+ "href":"https://api.github.com/repos/tushar912/public-repo/issues/1"+ },+ "comments":{+ "href":"https://api.github.com/repos/tushar912/public-repo/issues/1/comments"+ },+ "review_comments":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1/comments"+ },+ "review_comment":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/comments{/number}"+ },+ "commits":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1/commits"+ },+ "statuses":{+ "href":"https://api.github.com/repos/tushar912/public-repo/statuses/97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f"+ }+ },+ "author_association":"OWNER",+ "auto_merge":null,+ "active_lock_reason":"off-topic",+ "merged":false,+ "mergeable":true,+ "rebaseable":true,+ "mergeable_state":"clean",+ "merged_by":null,+ "comments":0,+ "review_comments":0,+ "maintainer_can_modify":false,+ "commits":1,+ "additions":1,+ "deletions":1,+ "changed_files":1+ },+ "repository":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main"+ },+ "sender":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ }+ }diff --git a/zerver/webhooks/github/fixtures/pull_request__unlocked.json b/zerver/webhooks/github/fixtures/pull_request__unlocked.jsonnew file mode 100644index 00000000000..7c353434a4f--- /dev/null+++ b/zerver/webhooks/github/fixtures/pull_request__unlocked.json@@ -0,0 +1,464 @@+{+ "action":"unlocked",+ "number":1,+ "pull_request":{+ "url":"https://api.github.com/repos/tushar912/public-repo/pulls/1",+ "id":579107344,+ "node_id":"MDExOlB1bGxSZXF1ZXN0NTc5MTA3MzQ0",+ "html_url":"https://github.com/tushar912/public-repo/pull/1",+ "diff_url":"https://github.com/tushar912/public-repo/pull/1.diff",+ "patch_url":"https://github.com/tushar912/public-repo/pull/1.patch",+ "issue_url":"https://api.github.com/repos/tushar912/public-repo/issues/1",+ "number":1,+ "state":"open",+ "locked":false,+ "title":"Update the README with new information",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "body":"",+ "created_at":"2021-02-24T08:29:15Z",+ "updated_at":"2021-02-24T08:30:16Z",+ "closed_at":null,+ "merged_at":null,+ "merge_commit_sha":"ed1a02e41801c337ffda8e2e303e726446109ad6",+ "assignee":null,+ "assignees":[++ ],+ "requested_reviewers":[++ ],+ "requested_teams":[++ ],+ "labels":[++ ],+ "milestone":null,+ "draft":false,+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/pulls/1/commits",+ "review_comments_url":"https://api.github.com/repos/tushar912/public-repo/pulls/1/comments",+ "review_comment_url":"https://api.github.com/repos/tushar912/public-repo/pulls/comments{/number}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/issues/1/comments",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f",+ "head":{+ "label":"tushar912:test",+ "ref":"test",+ "sha":"97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "repo":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main",+ "allow_squash_merge":true,+ "allow_merge_commit":true,+ "allow_rebase_merge":true,+ "delete_branch_on_merge":false+ }+ },+ "base":{+ "label":"tushar912:main",+ "ref":"main",+ "sha":"039310a8db95a3486c3787e4bf20dbe5ce6c9877",+ "user":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "repo":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main",+ "allow_squash_merge":true,+ "allow_merge_commit":true,+ "allow_rebase_merge":true,+ "delete_branch_on_merge":false+ }+ },+ "_links":{+ "self":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1"+ },+ "html":{+ "href":"https://github.com/tushar912/public-repo/pull/1"+ },+ "issue":{+ "href":"https://api.github.com/repos/tushar912/public-repo/issues/1"+ },+ "comments":{+ "href":"https://api.github.com/repos/tushar912/public-repo/issues/1/comments"+ },+ "review_comments":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1/comments"+ },+ "review_comment":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/comments{/number}"+ },+ "commits":{+ "href":"https://api.github.com/repos/tushar912/public-repo/pulls/1/commits"+ },+ "statuses":{+ "href":"https://api.github.com/repos/tushar912/public-repo/statuses/97a23cd1e6892c67c9a6b2ac0a4cf8d68e39c09f"+ }+ },+ "author_association":"OWNER",+ "auto_merge":null,+ "active_lock_reason":null,+ "merged":false,+ "mergeable":true,+ "rebaseable":true,+ "mergeable_state":"clean",+ "merged_by":null,+ "comments":0,+ "review_comments":0,+ "maintainer_can_modify":false,+ "commits":1,+ "additions":1,+ "deletions":1,+ "changed_files":1+ },+ "repository":{+ "id":341802507,+ "node_id":"MDEwOlJlcG9zaXRvcnkzNDE4MDI1MDc=",+ "name":"public-repo",+ "full_name":"tushar912/public-repo",+ "private":false,+ "owner":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ },+ "html_url":"https://github.com/tushar912/public-repo",+ "description":null,+ "fork":false,+ "url":"https://api.github.com/repos/tushar912/public-repo",+ "forks_url":"https://api.github.com/repos/tushar912/public-repo/forks",+ "keys_url":"https://api.github.com/repos/tushar912/public-repo/keys{/key_id}",+ "collaborators_url":"https://api.github.com/repos/tushar912/public-repo/collaborators{/collaborator}",+ "teams_url":"https://api.github.com/repos/tushar912/public-repo/teams",+ "hooks_url":"https://api.github.com/repos/tushar912/public-repo/hooks",+ "issue_events_url":"https://api.github.com/repos/tushar912/public-repo/issues/events{/number}",+ "events_url":"https://api.github.com/repos/tushar912/public-repo/events",+ "assignees_url":"https://api.github.com/repos/tushar912/public-repo/assignees{/user}",+ "branches_url":"https://api.github.com/repos/tushar912/public-repo/branches{/branch}",+ "tags_url":"https://api.github.com/repos/tushar912/public-repo/tags",+ "blobs_url":"https://api.github.com/repos/tushar912/public-repo/git/blobs{/sha}",+ "git_tags_url":"https://api.github.com/repos/tushar912/public-repo/git/tags{/sha}",+ "git_refs_url":"https://api.github.com/repos/tushar912/public-repo/git/refs{/sha}",+ "trees_url":"https://api.github.com/repos/tushar912/public-repo/git/trees{/sha}",+ "statuses_url":"https://api.github.com/repos/tushar912/public-repo/statuses/{sha}",+ "languages_url":"https://api.github.com/repos/tushar912/public-repo/languages",+ "stargazers_url":"https://api.github.com/repos/tushar912/public-repo/stargazers",+ "contributors_url":"https://api.github.com/repos/tushar912/public-repo/contributors",+ "subscribers_url":"https://api.github.com/repos/tushar912/public-repo/subscribers",+ "subscription_url":"https://api.github.com/repos/tushar912/public-repo/subscription",+ "commits_url":"https://api.github.com/repos/tushar912/public-repo/commits{/sha}",+ "git_commits_url":"https://api.github.com/repos/tushar912/public-repo/git/commits{/sha}",+ "comments_url":"https://api.github.com/repos/tushar912/public-repo/comments{/number}",+ "issue_comment_url":"https://api.github.com/repos/tushar912/public-repo/issues/comments{/number}",+ "contents_url":"https://api.github.com/repos/tushar912/public-repo/contents/{+path}",+ "compare_url":"https://api.github.com/repos/tushar912/public-repo/compare/{base}...{head}",+ "merges_url":"https://api.github.com/repos/tushar912/public-repo/merges",+ "archive_url":"https://api.github.com/repos/tushar912/public-repo/{archive_format}{/ref}",+ "downloads_url":"https://api.github.com/repos/tushar912/public-repo/downloads",+ "issues_url":"https://api.github.com/repos/tushar912/public-repo/issues{/number}",+ "pulls_url":"https://api.github.com/repos/tushar912/public-repo/pulls{/number}",+ "milestones_url":"https://api.github.com/repos/tushar912/public-repo/milestones{/number}",+ "notifications_url":"https://api.github.com/repos/tushar912/public-repo/notifications{?since,all,participating}",+ "labels_url":"https://api.github.com/repos/tushar912/public-repo/labels{/name}",+ "releases_url":"https://api.github.com/repos/tushar912/public-repo/releases{/id}",+ "deployments_url":"https://api.github.com/repos/tushar912/public-repo/deployments",+ "created_at":"2021-02-24T06:30:47Z",+ "updated_at":"2021-02-24T06:30:50Z",+ "pushed_at":"2021-02-24T08:29:15Z",+ "git_url":"git://github.com/tushar912/public-repo.git",+ "ssh_url":"[email protected]:tushar912/public-repo.git",+ "clone_url":"https://github.com/tushar912/public-repo.git",+ "svn_url":"https://github.com/tushar912/public-repo",+ "homepage":null,+ "size":0,+ "stargazers_count":0,+ "watchers_count":0,+ "language":null,+ "has_issues":true,+ "has_projects":true,+ "has_downloads":true,+ "has_wiki":true,+ "has_pages":false,+ "forks_count":0,+ "mirror_url":null,+ "archived":false,+ "disabled":false,+ "open_issues_count":1,+ "license":null,+ "forks":0,+ "open_issues":1,+ "watchers":0,+ "default_branch":"main"+ },+ "sender":{+ "login":"tushar912",+ "id":59223034,+ "node_id":"MDQ6VXNlcjU5MjIzMDM0",+ "avatar_url":"https://avatars.githubusercontent.com/u/59223034?v=4",+ "gravatar_id":"",+ "url":"https://api.github.com/users/tushar912",+ "html_url":"https://github.com/tushar912",+ "followers_url":"https://api.github.com/users/tushar912/followers",+ "following_url":"https://api.github.com/users/tushar912/following{/other_user}",+ "gists_url":"https://api.github.com/users/tushar912/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/tushar912/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/tushar912/subscriptions",+ "organizations_url":"https://api.github.com/users/tushar912/orgs",+ "repos_url":"https://api.github.com/users/tushar912/repos",+ "events_url":"https://api.github.com/users/tushar912/events{/privacy}",+ "received_events_url":"https://api.github.com/users/tushar912/received_events",+ "type":"User",+ "site_admin":false+ }+ }diff --git a/zerver/webhooks/github/tests.py b/zerver/webhooks/github/tests.pyindex ed7b7117ffb..8a4822c6242 100644--- a/zerver/webhooks/github/tests.py+++ b/zerver/webhooks/github/tests.py@@ -250,6 +250,24 @@ class GitHubWebhookTest(WebhookTestCase):expected_message = "baxterthehacker created [PR Review Comment on #1 Update the README with new information](https://github.com/baxterthehacker/public-repo/pull/1#discussion_r29724692):\n\n~~~ quote\nMaybe you should use more emojji on this line.\n~~~"self.check_webhook("pull_request_review_comment", expected_topic, expected_message)+ def test_pull_request_locked(self) -> None:+ expected_message = "tushar912 has locked [PR #1](https://github.com/tushar912/public-repo/pull/1) as off-topic and limited conversation to collaborators."+ self.check_webhook("pull_request__locked", TOPIC_PR, expected_message)++ def test_pull_request_unlocked(self) -> None:+ expected_message = (+ "tushar912 has unlocked [PR #1](https://github.com/tushar912/public-repo/pull/1)."+ )+ self.check_webhook("pull_request__unlocked", TOPIC_PR, expected_message)++ def test_pull_request_auto_merge_enabled(self) -> None:+ expected_message = "tushar912 has enabled auto merge for [PR #1](https://github.com/tushar912/public-repo/pull/1)."+ self.check_webhook("pull_request__auto_merge_enabled", TOPIC_PR, expected_message)++ def test_pull_request_auto_merge_disabled(self) -> None:+ expected_message = "tushar912 has disabled auto merge for [PR #1](https://github.com/tushar912/public-repo/pull/1)."+ self.check_webhook("pull_request__auto_merge_disabled", TOPIC_PR, expected_message)+def test_push_tag_msg(self) -> None:expected_message = "baxterthehacker pushed tag abc."self.check_webhook("push__tag", TOPIC_REPO, expected_message)diff --git a/zerver/webhooks/github/view.py b/zerver/webhooks/github/view.pyindex 260b16d2bb3..593bb0bfe38 100644--- a/zerver/webhooks/github/view.py+++ b/zerver/webhooks/github/view.py@@ -381,6 +381,37 @@ def get_status_body(helper: Helper) -> str:)+def get_locked_or_unlocked_pull_request_body(helper: Helper) -> str:+ payload = helper.payload++ action = payload["action"]++ message = "{sender} has locked [PR #{pr_number}]({pr_url}) as {reason} and limited conversation to collaborators."+ if action == "unlocked":+ message = "{sender} has unlocked [PR #{pr_number}]({pr_url})."+ return message.format(+ sender=get_sender_name(payload),+ pr_number=payload["pull_request"]["number"],+ pr_url=payload["pull_request"]["html_url"],+ reason=payload["pull_request"]["active_lock_reason"],+ )+++def get_pull_request_auto_merge_body(helper: Helper) -> str:+ payload = helper.payload++ action = payload["action"]++ message = "{sender} has enabled auto merge for [PR #{pr_number}]({pr_url})."+ if action == "auto_merge_disabled":+ message = "{sender} has disabled auto merge for [PR #{pr_number}]({pr_url})."+ return message.format(+ sender=get_sender_name(payload),+ pr_number=payload["pull_request"]["number"],+ pr_url=payload["pull_request"]["html_url"],+ )++def get_pull_request_ready_for_review_body(helper: Helper) -> str:payload = helper.payload@@ -603,6 +634,8 @@ EVENT_FUNCTION_MAPPER: Dict[str, Callable[[Helper], str]] = {"pull_request_review": get_pull_request_review_body,"pull_request_review_comment": get_pull_request_review_comment_body,"pull_request_review_requested": get_pull_request_review_requested_body,+ "pull_request_auto_merge": get_pull_request_auto_merge_body,+ "locked_or_unlocked_pull_request": get_locked_or_unlocked_pull_request_body,"push_commits": get_push_commits_body,"push_tags": get_push_tags_body,"release": get_release_body,@@ -707,6 +740,10 @@ def get_zulip_event_name(return "pull_request_review_requested"if action == "ready_for_review":return "pull_request_ready_for_review"+ if action in ("locked", "unlocked"):+ return "locked_or_unlocked_pull_request"+ if action in ("auto_merge_enabled", "auto_merge_disabled"):+ return "pull_request_auto_merge"if action in IGNORED_PULL_REQUEST_ACTIONS:return Noneelif header_event == "push":