snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
This commit is contained in:
0
zerver/webhooks/gitea/__init__.py
Normal file
0
zerver/webhooks/gitea/__init__.py
Normal file
29
zerver/webhooks/gitea/doc.md
Normal file
29
zerver/webhooks/gitea/doc.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Zulip Gitea integration
|
||||
|
||||
Receive Gitea notifications in Zulip!
|
||||
|
||||
{start_tabs}
|
||||
|
||||
1. {!create-an-incoming-webhook.md!}
|
||||
|
||||
1. {!generate-webhook-url-with-branch-filtering.md!}
|
||||
|
||||
1. Go to your repository on Gitea and click on **Settings**. Select
|
||||
**Webhooks** on the left sidebar, and click **Add Webhook**.
|
||||
Select **Gitea**.
|
||||
|
||||
1. Set **Payload URL** to the URL generated above. Set **Content type**
|
||||
to `application/json`. Select the [events](#filtering-incoming-events)
|
||||
you would like to receive notifications for, and click **Add Webhook**.
|
||||
|
||||
{end_tabs}
|
||||
|
||||
{!congrats.md!}
|
||||
|
||||

|
||||
|
||||
{!event-filtering-additional-feature.md!}
|
||||
|
||||
### Related documentation
|
||||
|
||||
{!webhooks-url-specification.md!}
|
||||
75
zerver/webhooks/gitea/fixtures/create__branch.json
Normal file
75
zerver/webhooks/gitea/fixtures/create__branch.json
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"sha": "01efc1fe09d4fba25397a386a6c623fd12eadd79",
|
||||
"ref": "test-branch",
|
||||
"ref_type": "branch",
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:11:14Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
}
|
||||
163
zerver/webhooks/gitea/fixtures/issue_comment__edited.json
Normal file
163
zerver/webhooks/gitea/fixtures/issue_comment__edited.json
Normal file
@@ -0,0 +1,163 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "edited",
|
||||
"issue": {
|
||||
"id": 8184,
|
||||
"url": "https://try.gitea.io/api/v1/repos/kostekIV/test/issues/3",
|
||||
"number": 3,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"title": "Test issue 2",
|
||||
"body": "Test body",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"assignees": [
|
||||
{
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
],
|
||||
"state": "open",
|
||||
"comments": 4,
|
||||
"created_at": "2019-11-17T23:45:03Z",
|
||||
"updated_at": "2019-11-18T01:21:56Z",
|
||||
"closed_at": null,
|
||||
"due_date": null,
|
||||
"pull_request": null,
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test"
|
||||
}
|
||||
},
|
||||
"comment": {
|
||||
"id": 24400,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test/issues/3#issuecomment-24400",
|
||||
"pull_request_url": "",
|
||||
"issue_url": "https://try.gitea.io/kostekIV/test/issues/3",
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"body": "edit test comment",
|
||||
"created_at": "2019-11-17T23:45:10Z",
|
||||
"updated_at": "2019-11-18T02:44:09Z"
|
||||
},
|
||||
"changes": {
|
||||
"body": {
|
||||
"from": "test comment\r\n"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 66,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 1,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T01:55:57Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"is_pull": false
|
||||
}
|
||||
137
zerver/webhooks/gitea/fixtures/issue_comment__in_pr.json
Normal file
137
zerver/webhooks/gitea/fixtures/issue_comment__in_pr.json
Normal file
@@ -0,0 +1,137 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "created",
|
||||
"issue": {
|
||||
"id": 8170,
|
||||
"url": "https://try.gitea.io/api/v1/repos/kostekIV/test/issues/1",
|
||||
"number": 1,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"title": "dummy",
|
||||
"body": "sdfasdfa",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"state": "closed",
|
||||
"comments": 0,
|
||||
"created_at": "2019-11-15T20:56:14Z",
|
||||
"updated_at": "2019-11-15T21:01:32Z",
|
||||
"closed_at": "2019-11-15T21:01:26Z",
|
||||
"due_date": null,
|
||||
"pull_request": {
|
||||
"merged": true,
|
||||
"merged_at": "2019-11-15T21:01:26Z"
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test"
|
||||
}
|
||||
},
|
||||
"comment": {
|
||||
"id": 24399,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test/pulls/1/files#issuecomment-24399",
|
||||
"pull_request_url": "https://try.gitea.io/kostekIV/test/pulls/1",
|
||||
"issue_url": "",
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"body": "test comment",
|
||||
"created_at": "2019-11-17T23:24:44Z",
|
||||
"updated_at": "2019-11-17T23:24:44Z"
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-17T21:35:13Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"is_pull": true
|
||||
}
|
||||
134
zerver/webhooks/gitea/fixtures/issue_comment__new.json
Normal file
134
zerver/webhooks/gitea/fixtures/issue_comment__new.json
Normal file
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "created",
|
||||
"issue": {
|
||||
"id": 8184,
|
||||
"url": "https://try.gitea.io/api/v1/repos/kostekIV/test/issues/3",
|
||||
"number": 3,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"title": "Test issue",
|
||||
"body": "Test body",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"state": "open",
|
||||
"comments": 0,
|
||||
"created_at": "2019-11-17T23:45:03Z",
|
||||
"updated_at": "2019-11-17T23:45:10Z",
|
||||
"closed_at": null,
|
||||
"due_date": null,
|
||||
"pull_request": null,
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test"
|
||||
}
|
||||
},
|
||||
"comment": {
|
||||
"id": 24400,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test/issues/3#issuecomment-24400",
|
||||
"pull_request_url": "",
|
||||
"issue_url": "https://try.gitea.io/kostekIV/test/issues/3",
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"body": "test comment",
|
||||
"created_at": "2019-11-17T23:45:10Z",
|
||||
"updated_at": "2019-11-17T23:45:10Z"
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-17T21:35:13Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"is_pull": false
|
||||
}
|
||||
135
zerver/webhooks/gitea/fixtures/issues__assigned.json
Normal file
135
zerver/webhooks/gitea/fixtures/issues__assigned.json
Normal file
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "assigned",
|
||||
"number": 3,
|
||||
"issue": {
|
||||
"id": 8184,
|
||||
"url": "https://try.gitea.io/api/v1/repos/kostekIV/test/issues/3",
|
||||
"number": 3,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"title": "Test issue",
|
||||
"body": "Test body",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"assignees": [
|
||||
{
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
],
|
||||
"state": "open",
|
||||
"comments": 1,
|
||||
"created_at": "2019-11-17T23:45:03Z",
|
||||
"updated_at": "2019-11-18T00:01:30Z",
|
||||
"closed_at": null,
|
||||
"due_date": null,
|
||||
"pull_request": null,
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-17T21:35:13Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
}
|
||||
135
zerver/webhooks/gitea/fixtures/issues__closed.json
Normal file
135
zerver/webhooks/gitea/fixtures/issues__closed.json
Normal file
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "closed",
|
||||
"number": 3,
|
||||
"issue": {
|
||||
"id": 8184,
|
||||
"url": "https://try.gitea.io/api/v1/repos/kostekIV/test/issues/3",
|
||||
"number": 3,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"title": "Test issue 2",
|
||||
"body": "Test body",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"assignees": [
|
||||
{
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
],
|
||||
"state": "closed",
|
||||
"comments": 1,
|
||||
"created_at": "2019-11-17T23:45:03Z",
|
||||
"updated_at": "2019-11-18T00:08:27Z",
|
||||
"closed_at": "2019-11-18T00:08:27Z",
|
||||
"due_date": null,
|
||||
"pull_request": null,
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-17T21:35:13Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
}
|
||||
140
zerver/webhooks/gitea/fixtures/issues__edited.json
Normal file
140
zerver/webhooks/gitea/fixtures/issues__edited.json
Normal file
@@ -0,0 +1,140 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "edited",
|
||||
"number": 3,
|
||||
"changes": {
|
||||
"title": {
|
||||
"from": "Test issue"
|
||||
}
|
||||
},
|
||||
"issue": {
|
||||
"id": 8184,
|
||||
"url": "https://try.gitea.io/api/v1/repos/kostekIV/test/issues/3",
|
||||
"number": 3,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"title": "Test issue 2",
|
||||
"body": "Test body",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"assignees": [
|
||||
{
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
],
|
||||
"state": "open",
|
||||
"comments": 1,
|
||||
"created_at": "2019-11-17T23:45:03Z",
|
||||
"updated_at": "2019-11-18T00:06:07Z",
|
||||
"closed_at": null,
|
||||
"due_date": null,
|
||||
"pull_request": null,
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-17T21:35:13Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
}
|
||||
111
zerver/webhooks/gitea/fixtures/issues__opened.json
Normal file
111
zerver/webhooks/gitea/fixtures/issues__opened.json
Normal file
@@ -0,0 +1,111 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "opened",
|
||||
"number": 3,
|
||||
"issue": {
|
||||
"id": 8184,
|
||||
"url": "https://try.gitea.io/api/v1/repos/kostekIV/test/issues/3",
|
||||
"number": 3,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"title": "Test issue",
|
||||
"body": "Test body",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"state": "open",
|
||||
"comments": 0,
|
||||
"created_at": "2019-11-17T23:45:03Z",
|
||||
"updated_at": "2019-11-17T23:45:03Z",
|
||||
"closed_at": null,
|
||||
"due_date": null,
|
||||
"pull_request": null,
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-17T21:35:13Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
}
|
||||
135
zerver/webhooks/gitea/fixtures/issues__reopened.json
Normal file
135
zerver/webhooks/gitea/fixtures/issues__reopened.json
Normal file
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "reopened",
|
||||
"number": 3,
|
||||
"issue": {
|
||||
"id": 8184,
|
||||
"url": "https://try.gitea.io/api/v1/repos/kostekIV/test/issues/3",
|
||||
"number": 3,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"original_author": "",
|
||||
"original_author_id": 0,
|
||||
"title": "Test issue 2",
|
||||
"body": "Test body",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"assignees": [
|
||||
{
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
],
|
||||
"state": "open",
|
||||
"comments": 2,
|
||||
"created_at": "2019-11-17T23:45:03Z",
|
||||
"updated_at": "2019-11-18T00:42:36Z",
|
||||
"closed_at": null,
|
||||
"due_date": null,
|
||||
"pull_request": null,
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:32:22Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
}
|
||||
263
zerver/webhooks/gitea/fixtures/pull_request__assigned.json
Normal file
263
zerver/webhooks/gitea/fixtures/pull_request__assigned.json
Normal file
@@ -0,0 +1,263 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "assigned",
|
||||
"number": 5,
|
||||
"pull_request": {
|
||||
"id": 1906,
|
||||
"url": "https://try.gitea.io/kostekIV/test/pulls/5",
|
||||
"number": 5,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"title": "test 2",
|
||||
"body": "test",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"assignees": [
|
||||
{
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
],
|
||||
"state": "open",
|
||||
"comments": 1,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test/pulls/5",
|
||||
"diff_url": "https://try.gitea.io/kostekIV/test/pulls/5.diff",
|
||||
"patch_url": "https://try.gitea.io/kostekIV/test/pulls/5.patch",
|
||||
"mergeable": false,
|
||||
"merged": false,
|
||||
"merged_at": null,
|
||||
"merge_commit_sha": null,
|
||||
"merged_by": null,
|
||||
"base": {
|
||||
"label": "master",
|
||||
"ref": "master",
|
||||
"sha": "1d40c3be7919f066f9158eaaaecaf696b3e22886",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:32:22Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"head": {
|
||||
"label": "d",
|
||||
"ref": "d",
|
||||
"sha": "40f7d3050bdc11085e00518a1356150e5fff512d",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:32:22Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"merge_base": "50a822293e4dda7fdc1ecb6e61f7da62345b7fce",
|
||||
"due_date": null,
|
||||
"created_at": "2019-11-18T00:26:08Z",
|
||||
"updated_at": "2019-11-18T00:35:13Z",
|
||||
"closed_at": null
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:32:22Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"review": null
|
||||
}
|
||||
239
zerver/webhooks/gitea/fixtures/pull_request__closed.json
Normal file
239
zerver/webhooks/gitea/fixtures/pull_request__closed.json
Normal file
@@ -0,0 +1,239 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "closed",
|
||||
"number": 5,
|
||||
"pull_request": {
|
||||
"id": 1906,
|
||||
"url": "https://try.gitea.io/kostekIV/test/pulls/5",
|
||||
"number": 5,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"title": "test 2",
|
||||
"body": "test",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"state": "closed",
|
||||
"comments": 0,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test/pulls/5",
|
||||
"diff_url": "https://try.gitea.io/kostekIV/test/pulls/5.diff",
|
||||
"patch_url": "https://try.gitea.io/kostekIV/test/pulls/5.patch",
|
||||
"mergeable": true,
|
||||
"merged": false,
|
||||
"merged_at": null,
|
||||
"merge_commit_sha": null,
|
||||
"merged_by": null,
|
||||
"base": {
|
||||
"label": "master",
|
||||
"ref": "master",
|
||||
"sha": "1d40c3be7919f066f9158eaaaecaf696b3e22886",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:22:27Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"head": {
|
||||
"label": "d",
|
||||
"ref": "d",
|
||||
"sha": "06902b147a01a3fc0e7c23caf5548e242300e553",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:22:27Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"merge_base": "50a822293e4dda7fdc1ecb6e61f7da62345b7fce",
|
||||
"due_date": null,
|
||||
"created_at": "2019-11-18T00:26:08Z",
|
||||
"updated_at": "2019-11-18T00:28:29Z",
|
||||
"closed_at": null
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:22:27Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"review": null
|
||||
}
|
||||
@@ -0,0 +1,479 @@
|
||||
{
|
||||
"action": "closed",
|
||||
"number": 1,
|
||||
"pull_request": {
|
||||
"id": 126085,
|
||||
"url": "https://gitea.com/Aneesh-Hegde/test-repo/pulls/1",
|
||||
"number": 1,
|
||||
"user": {
|
||||
"id": 116733,
|
||||
"login": "Celebi",
|
||||
"login_name": "",
|
||||
"source_id": 0,
|
||||
"full_name": "",
|
||||
"email": "celebi_datatransfer@noreply.gitea.com",
|
||||
"avatar_url": "https://seccdn.libravatar.org/avatar/7acebc2b09409dc06796dc2cbd80c08a?d=identicon",
|
||||
"html_url": "https://gitea.com/Celebi",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2025-03-29T17:56:48Z",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "",
|
||||
"description": "",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "Celebi"
|
||||
},
|
||||
"title": "PR closed",
|
||||
"body": "",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": [],
|
||||
"requested_reviewers": [],
|
||||
"requested_reviewers_teams": [],
|
||||
"state": "closed",
|
||||
"draft": true,
|
||||
"is_locked": false,
|
||||
"comments": 10,
|
||||
"additions": 3,
|
||||
"deletions": 1,
|
||||
"changed_files": 3,
|
||||
"html_url": "https://gitea.com/Aneesh-Hegde/test-repo/pulls/1",
|
||||
"diff_url": "https://gitea.com/Aneesh-Hegde/test-repo/pulls/1.diff",
|
||||
"patch_url": "https://gitea.com/Aneesh-Hegde/test-repo/pulls/1.patch",
|
||||
"mergeable": false,
|
||||
"merged": false,
|
||||
"merged_at": null,
|
||||
"merge_commit_sha": null,
|
||||
"merged_by": null,
|
||||
"allow_maintainer_edit": false,
|
||||
"base": {
|
||||
"label": "main",
|
||||
"ref": "main",
|
||||
"sha": "aef25c08146a31ac1d9941edd8c306132194978f",
|
||||
"repo_id": 95379,
|
||||
"repo": {
|
||||
"id": 95379,
|
||||
"owner": {
|
||||
"id": 116728,
|
||||
"login": "Aneesh-Hegde",
|
||||
"login_name": "",
|
||||
"source_id": 0,
|
||||
"full_name": "CELEBI",
|
||||
"email": "aneesh-hegde@noreply.gitea.com",
|
||||
"avatar_url": "https://seccdn.libravatar.org/avatar/3629fd95adff086774218f58a8d33c7c?d=identicon",
|
||||
"html_url": "https://gitea.com/Aneesh-Hegde",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2025-03-29T17:41:12Z",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "",
|
||||
"description": "",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "Aneesh-Hegde"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "Aneesh-Hegde/test-repo",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"mirror": false,
|
||||
"size": 30,
|
||||
"language": "",
|
||||
"languages_url": "https://gitea.com/api/v1/repos/Aneesh-Hegde/test-repo/languages",
|
||||
"html_url": "https://gitea.com/Aneesh-Hegde/test-repo",
|
||||
"url": "https://gitea.com/api/v1/repos/Aneesh-Hegde/test-repo",
|
||||
"link": "",
|
||||
"ssh_url": "git@gitea.com:Aneesh-Hegde/test-repo.git",
|
||||
"clone_url": "https://gitea.com/Aneesh-Hegde/test-repo.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 1,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"open_pr_counter": 2,
|
||||
"release_counter": 1,
|
||||
"default_branch": "main",
|
||||
"archived": false,
|
||||
"created_at": "2025-03-29T18:00:25Z",
|
||||
"updated_at": "2025-10-02T11:23:27Z",
|
||||
"archived_at": "1970-01-01T00:00:00Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_code": false,
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"has_projects": true,
|
||||
"projects_mode": "all",
|
||||
"has_releases": true,
|
||||
"has_packages": false,
|
||||
"has_actions": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"allow_fast_forward_only_merge": true,
|
||||
"allow_rebase_update": true,
|
||||
"allow_manual_merge": false,
|
||||
"autodetect_manual_merge": false,
|
||||
"default_delete_branch_after_merge": false,
|
||||
"default_merge_style": "merge",
|
||||
"default_allow_maintainer_edit": false,
|
||||
"avatar_url": "",
|
||||
"internal": false,
|
||||
"mirror_interval": "",
|
||||
"object_format_name": "sha1",
|
||||
"mirror_updated": "0001-01-01T00:00:00Z",
|
||||
"topics": [],
|
||||
"licenses": []
|
||||
}
|
||||
},
|
||||
"head": {
|
||||
"label": "main",
|
||||
"ref": "main",
|
||||
"sha": "cabcb9513308844c015a6b3dd804c5618875b447",
|
||||
"repo_id": 95380,
|
||||
"repo": {
|
||||
"id": 95380,
|
||||
"owner": {
|
||||
"id": 116733,
|
||||
"login": "Celebi",
|
||||
"login_name": "",
|
||||
"source_id": 0,
|
||||
"full_name": "",
|
||||
"email": "celebi_datatransfer@noreply.gitea.com",
|
||||
"avatar_url": "https://seccdn.libravatar.org/avatar/7acebc2b09409dc06796dc2cbd80c08a?d=identicon",
|
||||
"html_url": "https://gitea.com/Celebi",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2025-03-29T17:56:48Z",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "",
|
||||
"description": "",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "Celebi"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "Celebi/test-repo",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": true,
|
||||
"template": false,
|
||||
"parent": {
|
||||
"id": 95379,
|
||||
"owner": {
|
||||
"id": 116728,
|
||||
"login": "Aneesh-Hegde",
|
||||
"login_name": "",
|
||||
"source_id": 0,
|
||||
"full_name": "CELEBI",
|
||||
"email": "aneesh-hegde@noreply.gitea.com",
|
||||
"avatar_url": "https://seccdn.libravatar.org/avatar/3629fd95adff086774218f58a8d33c7c?d=identicon",
|
||||
"html_url": "https://gitea.com/Aneesh-Hegde",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2025-03-29T17:41:12Z",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "",
|
||||
"description": "",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "Aneesh-Hegde"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "Aneesh-Hegde/test-repo",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"mirror": false,
|
||||
"size": 30,
|
||||
"language": "",
|
||||
"languages_url": "https://gitea.com/api/v1/repos/Aneesh-Hegde/test-repo/languages",
|
||||
"html_url": "https://gitea.com/Aneesh-Hegde/test-repo",
|
||||
"url": "https://gitea.com/api/v1/repos/Aneesh-Hegde/test-repo",
|
||||
"link": "",
|
||||
"ssh_url": "git@gitea.com:Aneesh-Hegde/test-repo.git",
|
||||
"clone_url": "https://gitea.com/Aneesh-Hegde/test-repo.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 1,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"open_pr_counter": 1,
|
||||
"release_counter": 1,
|
||||
"default_branch": "main",
|
||||
"archived": false,
|
||||
"created_at": "2025-03-29T18:00:25Z",
|
||||
"updated_at": "2025-10-02T11:23:27Z",
|
||||
"archived_at": "1970-01-01T00:00:00Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": true
|
||||
},
|
||||
"has_code": false,
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"has_projects": true,
|
||||
"projects_mode": "all",
|
||||
"has_releases": true,
|
||||
"has_packages": false,
|
||||
"has_actions": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"allow_fast_forward_only_merge": true,
|
||||
"allow_rebase_update": true,
|
||||
"allow_manual_merge": false,
|
||||
"autodetect_manual_merge": false,
|
||||
"default_delete_branch_after_merge": false,
|
||||
"default_merge_style": "merge",
|
||||
"default_allow_maintainer_edit": false,
|
||||
"avatar_url": "",
|
||||
"internal": false,
|
||||
"mirror_interval": "",
|
||||
"object_format_name": "sha1",
|
||||
"mirror_updated": "0001-01-01T00:00:00Z",
|
||||
"topics": [],
|
||||
"licenses": []
|
||||
},
|
||||
"mirror": false,
|
||||
"size": 30,
|
||||
"language": "",
|
||||
"languages_url": "https://gitea.com/api/v1/repos/Celebi/test-repo/languages",
|
||||
"html_url": "https://gitea.com/Celebi/test-repo",
|
||||
"url": "https://gitea.com/api/v1/repos/Celebi/test-repo",
|
||||
"link": "",
|
||||
"ssh_url": "git@gitea.com:Celebi/test-repo.git",
|
||||
"clone_url": "https://gitea.com/Celebi/test-repo.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"open_pr_counter": 0,
|
||||
"release_counter": 0,
|
||||
"default_branch": "main",
|
||||
"archived": false,
|
||||
"created_at": "2025-03-29T18:04:25Z",
|
||||
"updated_at": "2025-03-31T10:07:23Z",
|
||||
"archived_at": "1970-01-01T00:00:00Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": true
|
||||
},
|
||||
"has_code": false,
|
||||
"has_issues": false,
|
||||
"has_wiki": false,
|
||||
"has_pull_requests": true,
|
||||
"has_projects": false,
|
||||
"projects_mode": "all",
|
||||
"has_releases": false,
|
||||
"has_packages": false,
|
||||
"has_actions": false,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"allow_fast_forward_only_merge": true,
|
||||
"allow_rebase_update": true,
|
||||
"allow_manual_merge": false,
|
||||
"autodetect_manual_merge": false,
|
||||
"default_delete_branch_after_merge": false,
|
||||
"default_merge_style": "merge",
|
||||
"default_allow_maintainer_edit": false,
|
||||
"avatar_url": "",
|
||||
"internal": false,
|
||||
"mirror_interval": "",
|
||||
"object_format_name": "sha1",
|
||||
"mirror_updated": "0001-01-01T00:00:00Z",
|
||||
"topics": [],
|
||||
"licenses": []
|
||||
}
|
||||
},
|
||||
"merge_base": "3d1aa2535f5433f56e252fee2311039c3afb0cb6",
|
||||
"due_date": null,
|
||||
"created_at": "2025-03-29T18:04:51Z",
|
||||
"updated_at": "2025-10-10T19:45:22Z",
|
||||
"closed_at": "2025-10-10T19:45:22Z",
|
||||
"pin_order": 0
|
||||
},
|
||||
"requested_reviewer": null,
|
||||
"repository": {
|
||||
"id": 95379,
|
||||
"owner": {
|
||||
"id": 116728,
|
||||
"login": "Aneesh-Hegde",
|
||||
"login_name": "",
|
||||
"source_id": 0,
|
||||
"full_name": "CELEBI",
|
||||
"email": "aneesh-hegde@noreply.gitea.com",
|
||||
"avatar_url": "https://seccdn.libravatar.org/avatar/3629fd95adff086774218f58a8d33c7c?d=identicon",
|
||||
"html_url": "https://gitea.com/Aneesh-Hegde",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2025-03-29T17:41:12Z",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "",
|
||||
"description": "",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "Aneesh-Hegde"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "Aneesh-Hegde/test-repo",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"mirror": false,
|
||||
"size": 30,
|
||||
"language": "",
|
||||
"languages_url": "https://gitea.com/api/v1/repos/Aneesh-Hegde/test-repo/languages",
|
||||
"html_url": "https://gitea.com/Aneesh-Hegde/test-repo",
|
||||
"url": "https://gitea.com/api/v1/repos/Aneesh-Hegde/test-repo",
|
||||
"link": "",
|
||||
"ssh_url": "git@gitea.com:Aneesh-Hegde/test-repo.git",
|
||||
"clone_url": "https://gitea.com/Aneesh-Hegde/test-repo.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 1,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"open_pr_counter": 2,
|
||||
"release_counter": 1,
|
||||
"default_branch": "main",
|
||||
"archived": false,
|
||||
"created_at": "2025-03-29T18:00:25Z",
|
||||
"updated_at": "2025-10-02T11:23:27Z",
|
||||
"archived_at": "1970-01-01T00:00:00Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": true
|
||||
},
|
||||
"has_code": false,
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"has_projects": true,
|
||||
"projects_mode": "all",
|
||||
"has_releases": true,
|
||||
"has_packages": false,
|
||||
"has_actions": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"allow_fast_forward_only_merge": true,
|
||||
"allow_rebase_update": true,
|
||||
"allow_manual_merge": false,
|
||||
"autodetect_manual_merge": false,
|
||||
"default_delete_branch_after_merge": false,
|
||||
"default_merge_style": "merge",
|
||||
"default_allow_maintainer_edit": false,
|
||||
"avatar_url": "",
|
||||
"internal": false,
|
||||
"mirror_interval": "",
|
||||
"object_format_name": "sha1",
|
||||
"mirror_updated": "0001-01-01T00:00:00Z",
|
||||
"topics": [],
|
||||
"licenses": []
|
||||
},
|
||||
"sender": {
|
||||
"id": 150382,
|
||||
"login": "Aneesh-Hegde",
|
||||
"login_name": "",
|
||||
"source_id": 0,
|
||||
"full_name": "",
|
||||
"email": "Aneesh-Hegde@noreply.gitea.com",
|
||||
"avatar_url": "https://seccdn.libravatar.org/avatar/466f1c45cb91f690a119741a0ffbb418?d=identicon",
|
||||
"html_url": "https://gitea.com/Aneesh-Hegde",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "0001-01-01T00:00:00Z",
|
||||
"created": "2025-10-10T19:39:18Z",
|
||||
"restricted": false,
|
||||
"active": false,
|
||||
"prohibit_login": false,
|
||||
"location": "",
|
||||
"website": "",
|
||||
"description": "",
|
||||
"visibility": "public",
|
||||
"followers_count": 0,
|
||||
"following_count": 0,
|
||||
"starred_repos_count": 0,
|
||||
"username": "Aneesh-Hegde"
|
||||
},
|
||||
"commit_id": "",
|
||||
"review": null
|
||||
}
|
||||
244
zerver/webhooks/gitea/fixtures/pull_request__edited.json
Normal file
244
zerver/webhooks/gitea/fixtures/pull_request__edited.json
Normal file
@@ -0,0 +1,244 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "edited",
|
||||
"number": 5,
|
||||
"changes": {
|
||||
"title": {
|
||||
"from": "test"
|
||||
}
|
||||
},
|
||||
"pull_request": {
|
||||
"id": 1906,
|
||||
"url": "https://try.gitea.io/kostekIV/test/pulls/5",
|
||||
"number": 5,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"title": "test 2",
|
||||
"body": "test",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"state": "open",
|
||||
"comments": 0,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test/pulls/5",
|
||||
"diff_url": "https://try.gitea.io/kostekIV/test/pulls/5.diff",
|
||||
"patch_url": "https://try.gitea.io/kostekIV/test/pulls/5.patch",
|
||||
"mergeable": true,
|
||||
"merged": false,
|
||||
"merged_at": null,
|
||||
"merge_commit_sha": null,
|
||||
"merged_by": null,
|
||||
"base": {
|
||||
"label": "master",
|
||||
"ref": "master",
|
||||
"sha": "1d40c3be7919f066f9158eaaaecaf696b3e22886",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:22:27Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"head": {
|
||||
"label": "d",
|
||||
"ref": "d",
|
||||
"sha": "06902b147a01a3fc0e7c23caf5548e242300e553",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:22:27Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"merge_base": "50a822293e4dda7fdc1ecb6e61f7da62345b7fce",
|
||||
"due_date": null,
|
||||
"created_at": "2019-11-18T00:26:08Z",
|
||||
"updated_at": "2019-11-18T00:26:33Z",
|
||||
"closed_at": null
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:22:27Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"review": null
|
||||
}
|
||||
250
zerver/webhooks/gitea/fixtures/pull_request__merged.json
Normal file
250
zerver/webhooks/gitea/fixtures/pull_request__merged.json
Normal file
@@ -0,0 +1,250 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "closed",
|
||||
"number": 4,
|
||||
"pull_request": {
|
||||
"id": 1905,
|
||||
"url": "https://try.gitea.io/kostekIV/test/pulls/4",
|
||||
"number": 1905,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"title": "Fix remove-op on reaction event",
|
||||
"body": "Body",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"state": "closed",
|
||||
"comments": 1,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test/pulls/4",
|
||||
"diff_url": "https://try.gitea.io/kostekIV/test/pulls/4.diff",
|
||||
"patch_url": "https://try.gitea.io/kostekIV/test/pulls/4.patch",
|
||||
"mergeable": true,
|
||||
"merged": true,
|
||||
"merged_at": "2019-11-18T00:22:27Z",
|
||||
"merge_commit_sha": "1d40c3be7919f066f9158eaaaecaf696b3e22886",
|
||||
"merged_by": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"base": {
|
||||
"label": "master",
|
||||
"ref": "main",
|
||||
"sha": "1d40c3be7919f066f9158eaaaecaf696b3e22886",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:11:14Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"head": {
|
||||
"label": "test-branch",
|
||||
"ref": "reaction-metadata",
|
||||
"sha": "01efc1fe09d4fba25397a386a6c623fd12eadd79",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:11:14Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"merge_base": "50a822293e4dda7fdc1ecb6e61f7da62345b7fce",
|
||||
"due_date": null,
|
||||
"created_at": "2019-11-18T00:16:29Z",
|
||||
"updated_at": "2019-11-18T00:22:27Z",
|
||||
"closed_at": null
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "zulip-terminal",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:11:14Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"review": null
|
||||
}
|
||||
239
zerver/webhooks/gitea/fixtures/pull_request__opened.json
Normal file
239
zerver/webhooks/gitea/fixtures/pull_request__opened.json
Normal file
@@ -0,0 +1,239 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "opened",
|
||||
"number": 4,
|
||||
"pull_request": {
|
||||
"id": 1905,
|
||||
"url": "https://try.gitea.io/kostekIV/test/pulls/4",
|
||||
"number": 4,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"title": "New pr",
|
||||
"body": "Body",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"state": "open",
|
||||
"comments": 0,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test/pulls/4",
|
||||
"diff_url": "https://try.gitea.io/kostekIV/test/pulls/4.diff",
|
||||
"patch_url": "https://try.gitea.io/kostekIV/test/pulls/4.patch",
|
||||
"mergeable": true,
|
||||
"merged": false,
|
||||
"merged_at": null,
|
||||
"merge_commit_sha": null,
|
||||
"merged_by": null,
|
||||
"base": {
|
||||
"label": "master",
|
||||
"ref": "master",
|
||||
"sha": "df5c4968af6569095b40fa8f756953072d03d39f",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:11:14Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"head": {
|
||||
"label": "test-branch",
|
||||
"ref": "test-branch",
|
||||
"sha": "01efc1fe09d4fba25397a386a6c623fd12eadd79",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:11:14Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"merge_base": "50a822293e4dda7fdc1ecb6e61f7da62345b7fce",
|
||||
"due_date": null,
|
||||
"created_at": "2019-11-18T00:16:29Z",
|
||||
"updated_at": "2019-11-18T00:16:29Z",
|
||||
"closed_at": null
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 18,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:11:14Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"review": null
|
||||
}
|
||||
239
zerver/webhooks/gitea/fixtures/pull_request__reopened.json
Normal file
239
zerver/webhooks/gitea/fixtures/pull_request__reopened.json
Normal file
@@ -0,0 +1,239 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"action": "reopened",
|
||||
"number": 5,
|
||||
"pull_request": {
|
||||
"id": 1906,
|
||||
"url": "https://try.gitea.io/kostekIV/test/pulls/5",
|
||||
"number": 5,
|
||||
"user": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"title": "test 2",
|
||||
"body": "test",
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"state": "open",
|
||||
"comments": 1,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test/pulls/5",
|
||||
"diff_url": "https://try.gitea.io/kostekIV/test/pulls/5.diff",
|
||||
"patch_url": "https://try.gitea.io/kostekIV/test/pulls/5.patch",
|
||||
"mergeable": false,
|
||||
"merged": false,
|
||||
"merged_at": null,
|
||||
"merge_commit_sha": null,
|
||||
"merged_by": null,
|
||||
"base": {
|
||||
"label": "master",
|
||||
"ref": "master",
|
||||
"sha": "1d40c3be7919f066f9158eaaaecaf696b3e22886",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:22:27Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"head": {
|
||||
"label": "d",
|
||||
"ref": "d",
|
||||
"sha": "06902b147a01a3fc0e7c23caf5548e242300e553",
|
||||
"repo_id": 14576,
|
||||
"repo": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:22:27Z",
|
||||
"permissions": {
|
||||
"admin": false,
|
||||
"push": false,
|
||||
"pull": false
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
}
|
||||
},
|
||||
"merge_base": "50a822293e4dda7fdc1ecb6e61f7da62345b7fce",
|
||||
"due_date": null,
|
||||
"created_at": "2019-11-18T00:26:08Z",
|
||||
"updated_at": "2019-11-18T00:28:33Z",
|
||||
"closed_at": null
|
||||
},
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 19,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 0,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 0,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T00:22:27Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"review": null
|
||||
}
|
||||
201
zerver/webhooks/gitea/fixtures/push__5_commits.json
Normal file
201
zerver/webhooks/gitea/fixtures/push__5_commits.json
Normal file
@@ -0,0 +1,201 @@
|
||||
{
|
||||
"secret": "123",
|
||||
"ref": "refs/heads/d",
|
||||
"before": "21138d2ca0ce18f8e037696fdbe1b3f0c211f630",
|
||||
"after": "2ec0c971d04723523aa20f2b378f8b419b47d4ec",
|
||||
"compare_url": "https://try.gitea.io/kostekIV/test/compare/21138d2ca0ce18f8e037696fdbe1b3f0c211f630...2ec0c971d04723523aa20f2b378f8b419b47d4ec",
|
||||
"commits": [
|
||||
{
|
||||
"id": "2ec0c971d04723523aa20f2b378f8b419b47d4ec",
|
||||
"message": "commit\n",
|
||||
"url": "https://try.gitea.io/kostekIV/test/commit/2ec0c971d04723523aa20f2b378f8b419b47d4ec",
|
||||
"author": {
|
||||
"name": "Jan Koscisz",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Jan Koscisz",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"verification": null,
|
||||
"timestamp": "2019-11-18T02:55:51+01:00",
|
||||
"added": [],
|
||||
"removed": [],
|
||||
"modified": [
|
||||
"1.c"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "6cb1701c8b0114ad716f4cd49153076e7109cb85",
|
||||
"message": "commit\n",
|
||||
"url": "https://try.gitea.io/kostekIV/test/commit/6cb1701c8b0114ad716f4cd49153076e7109cb85",
|
||||
"author": {
|
||||
"name": "Jan Koscisz",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Jan Koscisz",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"verification": null,
|
||||
"timestamp": "2019-11-18T02:55:51+01:00",
|
||||
"added": [],
|
||||
"removed": [],
|
||||
"modified": [
|
||||
"1.c"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "6773eabc0778a3e38997c06a13f5f0c48b67e5dc",
|
||||
"message": "commit\n",
|
||||
"url": "https://try.gitea.io/kostekIV/test/commit/6773eabc0778a3e38997c06a13f5f0c48b67e5dc",
|
||||
"author": {
|
||||
"name": "Jan Koscisz",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Jan Koscisz",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"verification": null,
|
||||
"timestamp": "2019-11-18T02:55:51+01:00",
|
||||
"added": [],
|
||||
"removed": [],
|
||||
"modified": [
|
||||
"1.c"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "337402cf675ce7082ddcd23d06a116c85241825a",
|
||||
"message": "commit\n",
|
||||
"url": "https://try.gitea.io/kostekIV/test/commit/337402cf675ce7082ddcd23d06a116c85241825a",
|
||||
"author": {
|
||||
"name": "Jan Koscisz",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Jan Koscisz",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"verification": null,
|
||||
"timestamp": "2019-11-18T02:55:51+01:00",
|
||||
"added": [],
|
||||
"removed": [],
|
||||
"modified": [
|
||||
"1.c"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "0a38cad3fac3a13bb78b738d13f15ce9cc3343fa",
|
||||
"message": "commit\n",
|
||||
"url": "https://try.gitea.io/kostekIV/test/commit/0a38cad3fac3a13bb78b738d13f15ce9cc3343fa",
|
||||
"author": {
|
||||
"name": "Jan Koscisz",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Jan Koscisz",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"verification": null,
|
||||
"timestamp": "2019-11-18T02:55:51+01:00",
|
||||
"added": [],
|
||||
"removed": [],
|
||||
"modified": [
|
||||
"1.c"
|
||||
]
|
||||
}
|
||||
],
|
||||
"head_commit": null,
|
||||
"repository": {
|
||||
"id": 14576,
|
||||
"owner": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"name": "test",
|
||||
"full_name": "kostekIV/test",
|
||||
"description": "",
|
||||
"empty": false,
|
||||
"private": false,
|
||||
"fork": false,
|
||||
"template": false,
|
||||
"parent": null,
|
||||
"mirror": false,
|
||||
"size": 66,
|
||||
"html_url": "https://try.gitea.io/kostekIV/test",
|
||||
"ssh_url": "git@try.gitea.io:kostekIV/test.git",
|
||||
"clone_url": "https://try.gitea.io/kostekIV/test.git",
|
||||
"original_url": "",
|
||||
"website": "",
|
||||
"stars_count": 1,
|
||||
"forks_count": 0,
|
||||
"watchers_count": 1,
|
||||
"open_issues_count": 1,
|
||||
"default_branch": "master",
|
||||
"archived": false,
|
||||
"created_at": "2019-11-15T19:19:34Z",
|
||||
"updated_at": "2019-11-18T01:55:57Z",
|
||||
"permissions": {
|
||||
"admin": true,
|
||||
"push": true,
|
||||
"pull": true
|
||||
},
|
||||
"has_issues": true,
|
||||
"internal_tracker": {
|
||||
"enable_time_tracker": true,
|
||||
"allow_only_contributors_to_track_time": true,
|
||||
"enable_issue_dependencies": true
|
||||
},
|
||||
"has_wiki": true,
|
||||
"has_pull_requests": true,
|
||||
"ignore_whitespace_conflicts": false,
|
||||
"allow_merge_commits": true,
|
||||
"allow_rebase": true,
|
||||
"allow_rebase_explicit": true,
|
||||
"allow_squash_merge": true,
|
||||
"avatar_url": ""
|
||||
},
|
||||
"pusher": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
},
|
||||
"sender": {
|
||||
"id": 21818,
|
||||
"login": "kostekIV",
|
||||
"full_name": "",
|
||||
"email": "koscis.j@gmail.com",
|
||||
"avatar_url": "https://try.gitea.io/user/avatar/kostekIV/-1",
|
||||
"language": "",
|
||||
"is_admin": false,
|
||||
"last_login": "2019-11-17T23:23:04Z",
|
||||
"created": "2019-11-15T19:17:02Z",
|
||||
"username": "kostekIV"
|
||||
}
|
||||
}
|
||||
111
zerver/webhooks/gitea/tests.py
Normal file
111
zerver/webhooks/gitea/tests.py
Normal file
@@ -0,0 +1,111 @@
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from zerver.lib.test_classes import WebhookTestCase
|
||||
|
||||
|
||||
class GiteaHookTests(WebhookTestCase):
|
||||
def test_multiple_commits(self) -> None:
|
||||
expected_topic_name = "test / d"
|
||||
expected_message = """kostekIV [pushed](https://try.gitea.io/kostekIV/test/compare/21138d2ca0ce18f8e037696fdbe1b3f0c211f630...2ec0c971d04723523aa20f2b378f8b419b47d4ec) 5 commits to branch d.
|
||||
|
||||
* commit ([2ec0c971d04](https://try.gitea.io/kostekIV/test/commit/2ec0c971d04723523aa20f2b378f8b419b47d4ec))
|
||||
* commit ([6cb1701c8b0](https://try.gitea.io/kostekIV/test/commit/6cb1701c8b0114ad716f4cd49153076e7109cb85))
|
||||
* commit ([6773eabc077](https://try.gitea.io/kostekIV/test/commit/6773eabc0778a3e38997c06a13f5f0c48b67e5dc))
|
||||
* commit ([337402cf675](https://try.gitea.io/kostekIV/test/commit/337402cf675ce7082ddcd23d06a116c85241825a))
|
||||
* commit ([0a38cad3fac](https://try.gitea.io/kostekIV/test/commit/0a38cad3fac3a13bb78b738d13f15ce9cc3343fa))"""
|
||||
self.check_webhook("push__5_commits", expected_topic_name, expected_message)
|
||||
|
||||
def test_new_branch(self) -> None:
|
||||
expected_topic_name = "test / test-branch"
|
||||
expected_message = "kostekIV created [test-branch](https://try.gitea.io/kostekIV/test/src/test-branch) branch."
|
||||
self.check_webhook("create__branch", expected_topic_name, expected_message)
|
||||
|
||||
def test_pull_request_opened(self) -> None:
|
||||
expected_topic_name = "test / PR #1905 New pr"
|
||||
expected_message = """kostekIV opened [PR #4](https://try.gitea.io/kostekIV/test/pulls/4) from `test-branch` to `master`."""
|
||||
self.check_webhook("pull_request__opened", expected_topic_name, expected_message)
|
||||
|
||||
def test_pull_request_merged(self) -> None:
|
||||
expected_topic_name = "zulip-terminal / PR #1905 Fix remove-op on reaction event"
|
||||
expected_message = """kostekIV merged [PR #1905](https://try.gitea.io/kostekIV/test/pulls/4) from `reaction-metadata` to `main`."""
|
||||
self.check_webhook("pull_request__merged", expected_topic_name, expected_message)
|
||||
|
||||
def test_pull_request_edited(self) -> None:
|
||||
expected_topic_name = "test / PR #1906 test 2"
|
||||
expected_message = (
|
||||
"""kostekIV edited [PR #5](https://try.gitea.io/kostekIV/test/pulls/5)."""
|
||||
)
|
||||
self.check_webhook("pull_request__edited", expected_topic_name, expected_message)
|
||||
|
||||
def test_pull_request_reopened(self) -> None:
|
||||
expected_topic_name = "test / PR #1906 test 2"
|
||||
expected_message = """kostekIV reopened [PR #5](https://try.gitea.io/kostekIV/test/pulls/5) from `d` to `master`."""
|
||||
self.check_webhook("pull_request__reopened", expected_topic_name, expected_message)
|
||||
|
||||
def test_pull_request_closed(self) -> None:
|
||||
expected_topic_name = "test / PR #1906 test 2"
|
||||
expected_message = """kostekIV closed [PR #5](https://try.gitea.io/kostekIV/test/pulls/5) from `d` to `master`."""
|
||||
self.check_webhook("pull_request__closed", expected_topic_name, expected_message)
|
||||
|
||||
def test_pull_request_closed_different_user(self) -> None:
|
||||
expected_topic_name = "test / PR #126085 PR closed"
|
||||
expected_message = """Aneesh-Hegde closed [PR #1](https://gitea.com/Aneesh-Hegde/test-repo/pulls/1) from `main` to `main`."""
|
||||
self.check_webhook("pull_request__closed_diff_user", expected_topic_name, expected_message)
|
||||
|
||||
def test_pull_request_assigned(self) -> None:
|
||||
expected_topic_name = "test / PR #1906 test 2"
|
||||
expected_message = """kostekIV assigned kostekIV to [PR #5](https://try.gitea.io/kostekIV/test/pulls/5) from `d` to `master` (assigned to kostekIV)."""
|
||||
self.check_webhook("pull_request__assigned", expected_topic_name, expected_message)
|
||||
|
||||
def test_issues_opened(self) -> None:
|
||||
expected_topic_name = "test / issue #3 Test issue"
|
||||
expected_message = """kostekIV opened [issue #3](https://try.gitea.io/kostekIV/test/issues/3):\n\n``` quote\nTest body\n```"""
|
||||
self.check_webhook("issues__opened", expected_topic_name, expected_message)
|
||||
|
||||
def test_issues_edited(self) -> None:
|
||||
expected_topic_name = "test / issue #3 Test issue 2"
|
||||
expected_message = """kostekIV edited [issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n``` quote\nTest body\n```"""
|
||||
self.check_webhook("issues__edited", expected_topic_name, expected_message)
|
||||
|
||||
def test_issues_closed(self) -> None:
|
||||
expected_topic_name = "test / issue #3 Test issue 2"
|
||||
expected_message = """kostekIV closed [issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n``` quote\nTest body\n```"""
|
||||
self.check_webhook("issues__closed", expected_topic_name, expected_message)
|
||||
|
||||
def test_issues_assigned(self) -> None:
|
||||
expected_topic_name = "test / issue #3 Test issue"
|
||||
expected_message = """kostekIV assigned kostekIV to [issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n``` quote\nTest body\n```"""
|
||||
self.check_webhook("issues__assigned", expected_topic_name, expected_message)
|
||||
|
||||
def test_issues_reopened(self) -> None:
|
||||
expected_topic_name = "test / issue #3 Test issue 2"
|
||||
expected_message = """kostekIV reopened [issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n``` quote\nTest body\n```"""
|
||||
self.check_webhook("issues__reopened", expected_topic_name, expected_message)
|
||||
|
||||
def test_issue_comment_new(self) -> None:
|
||||
expected_topic_name = "test / issue #3 Test issue"
|
||||
expected_message = """kostekIV [commented](https://try.gitea.io/kostekIV/test/issues/3#issuecomment-24400) on [issue #3](https://try.gitea.io/kostekIV/test/issues/3):\n\n``` quote\ntest comment\n```"""
|
||||
self.check_webhook("issue_comment__new", expected_topic_name, expected_message)
|
||||
|
||||
def test_issue_comment_in_pr(self) -> None:
|
||||
expected_topic_name = "test / issue #1 dummy"
|
||||
expected_message = """kostekIV [commented](https://try.gitea.io/kostekIV/test/pulls/1/files#issuecomment-24399) on [issue #1](https://try.gitea.io/kostekIV/test/issues/1):\n\n``` quote\ntest comment\n```"""
|
||||
self.check_webhook("issue_comment__in_pr", expected_topic_name, expected_message)
|
||||
|
||||
def test_issue_comment_edited(self) -> None:
|
||||
expected_topic_name = "test / issue #3 Test issue 2"
|
||||
expected_message = """kostekIV edited a [comment](https://try.gitea.io/kostekIV/test/issues/3#issuecomment-24400) on [issue #3](https://try.gitea.io/kostekIV/test/issues/3):\n\n``` quote\nedit test comment\n```"""
|
||||
|
||||
self.check_webhook("issue_comment__edited", expected_topic_name, expected_message)
|
||||
|
||||
@patch("zerver.webhooks.gogs.view.check_send_webhook_message")
|
||||
def test_push_filtered_by_branches_ignore(
|
||||
self, check_send_webhook_message_mock: MagicMock
|
||||
) -> None:
|
||||
self.url = self.build_webhook_url(branches="changes,development")
|
||||
payload = self.get_body("push__5_commits")
|
||||
result = self.client_post(
|
||||
self.url, payload, HTTP_X_GITEA_EVENT="push", content_type="application/json"
|
||||
)
|
||||
self.assertFalse(check_send_webhook_message_mock.called)
|
||||
self.assert_json_success(result)
|
||||
72
zerver/webhooks/gitea/view.py
Normal file
72
zerver/webhooks/gitea/view.py
Normal file
@@ -0,0 +1,72 @@
|
||||
# vim:fenc=utf-8
|
||||
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
from zerver.decorator import webhook_view
|
||||
from zerver.lib.typed_endpoint import JsonBodyPayload, typed_endpoint
|
||||
from zerver.lib.validator import WildValue, check_bool, check_int, check_string
|
||||
from zerver.lib.webhooks.common import OptionalUserSpecifiedTopicStr, default_fixture_to_headers
|
||||
from zerver.lib.webhooks.git import get_pull_request_event_message
|
||||
from zerver.models import UserProfile
|
||||
|
||||
# Gitea is a fork of Gogs, and so the webhook implementation is nearly the same.
|
||||
from zerver.webhooks.gogs.view import gogs_webhook_main
|
||||
|
||||
fixture_to_headers = default_fixture_to_headers("HTTP_X_GITEA_EVENT")
|
||||
|
||||
|
||||
def format_pull_request_event(payload: WildValue, include_title: bool = False) -> str:
|
||||
assignee = payload["pull_request"]["assignee"]
|
||||
|
||||
if payload["pull_request"]["merged"].tame(check_bool):
|
||||
user_name = payload["pull_request"]["merged_by"]["username"].tame(check_string)
|
||||
action = "merged"
|
||||
else:
|
||||
user_name = payload["sender"]["username"].tame(check_string)
|
||||
action = payload["action"].tame(check_string)
|
||||
|
||||
url = payload["pull_request"]["html_url"].tame(check_string)
|
||||
number = payload["pull_request"]["number"].tame(check_int)
|
||||
target_branch = None
|
||||
base_branch = None
|
||||
if action != "edited":
|
||||
if "head" in payload["pull_request"]:
|
||||
target_branch = payload["pull_request"]["head"]["ref"].tame(check_string)
|
||||
if "base" in payload["pull_request"]:
|
||||
base_branch = payload["pull_request"]["base"]["ref"].tame(check_string)
|
||||
title = payload["pull_request"]["title"].tame(check_string) if include_title else None
|
||||
stringified_assignee = assignee["login"].tame(check_string) if assignee else None
|
||||
|
||||
return get_pull_request_event_message(
|
||||
user_name=user_name,
|
||||
action=action,
|
||||
url=url,
|
||||
number=number,
|
||||
target_branch=target_branch,
|
||||
base_branch=base_branch,
|
||||
title=title,
|
||||
assignee=stringified_assignee,
|
||||
assignee_updated=stringified_assignee if action == "assigned" else None,
|
||||
)
|
||||
|
||||
|
||||
@webhook_view("Gitea")
|
||||
@typed_endpoint
|
||||
def api_gitea_webhook(
|
||||
request: HttpRequest,
|
||||
user_profile: UserProfile,
|
||||
*,
|
||||
payload: JsonBodyPayload[WildValue],
|
||||
branches: str | None = None,
|
||||
user_specified_topic: OptionalUserSpecifiedTopicStr = None,
|
||||
) -> HttpResponse:
|
||||
return gogs_webhook_main(
|
||||
"Gitea",
|
||||
"X-Gitea-Event",
|
||||
format_pull_request_event,
|
||||
request,
|
||||
user_profile,
|
||||
payload,
|
||||
branches,
|
||||
user_specified_topic,
|
||||
)
|
||||
Reference in New Issue
Block a user