mirror of https://github.com/zulip/zulip.git
integrations: Update note fixtures for GitLab Integration.
This commit is contained in:
parent
0adcc2a1df
commit
508514c870
|
@ -1,65 +1,73 @@
|
||||||
{
|
{
|
||||||
"object_kind":"note",
|
"object_kind": "note",
|
||||||
"user":{
|
"event_type": "note",
|
||||||
"name":"Tomasz Kolek",
|
"user": {
|
||||||
"username":"tomaszkolek0",
|
"id": 14613894,
|
||||||
"avatar_url":"https://secure.gravatar.com/avatar/116a6fdbcfd00466297a39174da11fbb?s=80\u0026d=identicon"
|
"name": "Satyam Bansal",
|
||||||
|
"username": "sbansal1999",
|
||||||
|
"avatar_url": "https://secure.gravatar.com/avatar/f4dd7cfc79fac91db4d9ecbb443a0519?s=80&d=identicon",
|
||||||
|
"email": "[REDACTED]"
|
||||||
},
|
},
|
||||||
"project_id":1534233,
|
"project_id": 46186758,
|
||||||
"project":{
|
"project": {
|
||||||
"name":"my-awesome-project",
|
"id": 46186758,
|
||||||
"description":"",
|
"name": "testing-zulip-gitlab-integration",
|
||||||
"web_url":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"description": null,
|
||||||
"avatar_url":null,
|
"web_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"git_ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"avatar_url": null,
|
||||||
"git_http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git",
|
"git_ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"namespace":"tomaszkolek0",
|
"git_http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"visibility_level":0,
|
"namespace": "Satyam Bansal",
|
||||||
"path_with_namespace":"tomaszkolek0/my-awesome-project",
|
"visibility_level": 0,
|
||||||
"default_branch":"master",
|
"path_with_namespace": "sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"homepage":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"default_branch": "main",
|
||||||
"url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"ci_config_path": "",
|
||||||
"ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git"
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git"
|
||||||
},
|
},
|
||||||
"object_attributes":{
|
"object_attributes": {
|
||||||
"id":14169211,
|
"attachment": null,
|
||||||
"note":"nice commit",
|
"author_id": 14613894,
|
||||||
"noteable_type":"Commit",
|
"change_position": null,
|
||||||
"author_id":670043,
|
"commit_id": "82689ddf00fd7bdadb5c2afb3b94bd555edc9d01",
|
||||||
"created_at":"2016-08-22 19:17:30 UTC",
|
"created_at": "2023-05-25 18:18:17 UTC",
|
||||||
"updated_at":"2016-08-22 19:17:30 UTC",
|
"discussion_id": "10ffd7c627f00f19cc2fa9cbbed9d13f3ff91375",
|
||||||
"project_id":1534233,
|
"id": 1406241063,
|
||||||
"attachment":null,
|
"line_code": null,
|
||||||
"line_code":null,
|
"note": "Wow what a beautiful commit.",
|
||||||
"commit_id":"66abd2da28809ffa128ed0447965cf11d7f863a7",
|
"noteable_id": null,
|
||||||
"noteable_id":null,
|
"noteable_type": "Commit",
|
||||||
"st_diff":null,
|
"original_position": null,
|
||||||
"system":false,
|
"position": null,
|
||||||
"updated_by_id":null,
|
"project_id": 46186758,
|
||||||
"type":null,
|
"resolved_at": null,
|
||||||
"position":null,
|
"resolved_by_id": null,
|
||||||
"original_position":null,
|
"resolved_by_push": null,
|
||||||
"resolved_at":null,
|
"st_diff": null,
|
||||||
"resolved_by_id":null,
|
"system": false,
|
||||||
"discussion_id":"c748ca8fd85ec719e2d4d75c849cf7c616dc3955",
|
"type": null,
|
||||||
"original_discussion_id":null,
|
"updated_at": "2023-05-25 18:18:17 UTC",
|
||||||
"url":"https://gitlab.com/tomaszkolek0/my-awesome-project/commit/66abd2da28809ffa128ed0447965cf11d7f863a7#note_14169211"
|
"updated_by_id": null,
|
||||||
|
"description": "Wow what a beautiful commit.",
|
||||||
|
"url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/commit/82689ddf00fd7bdadb5c2afb3b94bd555edc9d01#note_1406241063"
|
||||||
},
|
},
|
||||||
"repository":{
|
"repository": {
|
||||||
"name":"my-awesome-project",
|
"name": "testing-zulip-gitlab-integration",
|
||||||
"url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"description":"",
|
"description": null,
|
||||||
"homepage":"https://gitlab.com/tomaszkolek0/my-awesome-project"
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration"
|
||||||
},
|
},
|
||||||
"commit":{
|
"commit": {
|
||||||
"id":"66abd2da28809ffa128ed0447965cf11d7f863a7",
|
"id": "82689ddf00fd7bdadb5c2afb3b94bd555edc9d01",
|
||||||
"message":"b\n",
|
"message": "added some lines in second file\n",
|
||||||
"timestamp":"2016-08-17T21:17:54+02:00",
|
"title": "added some lines in second file",
|
||||||
"url":"https://gitlab.com/tomaszkolek0/my-awesome-project/commit/66abd2da28809ffa128ed0447965cf11d7f863a7",
|
"timestamp": "2023-05-25T22:21:16+05:30",
|
||||||
"author":{
|
"url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/commit/82689ddf00fd7bdadb5c2afb3b94bd555edc9d01",
|
||||||
"name":"Tomasz Kolek",
|
"author": {
|
||||||
"email":"tomasz-kolek@o2.pl"
|
"name": "Satyam Bansal",
|
||||||
|
"email": "sbansal1999@gmail.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,87 +2,97 @@
|
||||||
"object_kind": "note",
|
"object_kind": "note",
|
||||||
"event_type": "confidential_note",
|
"event_type": "confidential_note",
|
||||||
"user": {
|
"user": {
|
||||||
"name": "Joe Bloggs",
|
"id": 14613894,
|
||||||
"username": "joebloggs",
|
"name": "Satyam Bansal",
|
||||||
"avatar_url": "https://secure.gravatar.com/avatar/1e00d93acdfdddc06304143a1dfcd0b4?s=80&d=identicon"
|
"username": "sbansal1999",
|
||||||
|
"avatar_url": "https://secure.gravatar.com/avatar/f4dd7cfc79fac91db4d9ecbb443a0519?s=80&d=identicon",
|
||||||
|
"email": "[REDACTED]"
|
||||||
},
|
},
|
||||||
"project_id": 8385998,
|
"project_id": 46186758,
|
||||||
"project": {
|
"project": {
|
||||||
"id": 8385998,
|
"id": 46186758,
|
||||||
"name": "Test",
|
"name": "testing-zulip-gitlab-integration",
|
||||||
"description": "",
|
"description": null,
|
||||||
"web_url": "https://gitlab.com/joebloggs/test",
|
"web_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"avatar_url": null,
|
"avatar_url": null,
|
||||||
"git_ssh_url": "git@gitlab.com:joebloggs/test.git",
|
"git_ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"git_http_url": "https://gitlab.com/joebloggs/test.git",
|
"git_http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"namespace": "joebloggs",
|
"namespace": "Satyam Bansal",
|
||||||
"visibility_level": 20,
|
"visibility_level": 0,
|
||||||
"path_with_namespace": "joebloggs/test",
|
"path_with_namespace": "sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"default_branch": null,
|
"default_branch": "main",
|
||||||
"ci_config_path": null,
|
"ci_config_path": "",
|
||||||
"homepage": "https://gitlab.com/joebloggs/test",
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"url": "git@gitlab.com:joebloggs/test.git",
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"ssh_url": "git@gitlab.com:joebloggs/test.git",
|
"ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"http_url": "https://gitlab.com/joebloggs/test.git"
|
"http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git"
|
||||||
},
|
},
|
||||||
"object_attributes": {
|
"object_attributes": {
|
||||||
"attachment": null,
|
"attachment": null,
|
||||||
"author_id": 1102929,
|
"author_id": 14613894,
|
||||||
"change_position": null,
|
"change_position": null,
|
||||||
"commit_id": null,
|
"commit_id": null,
|
||||||
"created_at": "2018-09-15 21:01:07 UTC",
|
"created_at": "2023-05-25 17:12:06 UTC",
|
||||||
"discussion_id": "0be9d1a81a3841710ae99c237f781b4209e6c23f",
|
"discussion_id": "0f34ca7c156316d3169dee075808536909857945",
|
||||||
"id": 101638770,
|
"id": 1406130881,
|
||||||
"line_code": null,
|
"line_code": null,
|
||||||
"note": "Test",
|
"note": "Some more comments",
|
||||||
"noteable_id": 14177506,
|
"noteable_id": 128231959,
|
||||||
"noteable_type": "Issue",
|
"noteable_type": "Issue",
|
||||||
"original_position": null,
|
"original_position": null,
|
||||||
"position": null,
|
"position": null,
|
||||||
"project_id": 8385998,
|
"project_id": 46186758,
|
||||||
"resolved_at": null,
|
"resolved_at": null,
|
||||||
"resolved_by_id": null,
|
"resolved_by_id": null,
|
||||||
"resolved_by_push": null,
|
"resolved_by_push": null,
|
||||||
"st_diff": null,
|
"st_diff": null,
|
||||||
"system": false,
|
"system": false,
|
||||||
"type": null,
|
"type": null,
|
||||||
"updated_at": "2018-09-15 21:01:07 UTC",
|
"updated_at": "2023-05-25 17:12:06 UTC",
|
||||||
"updated_by_id": null,
|
"updated_by_id": null,
|
||||||
"description": "Test",
|
"description": "Some more comments",
|
||||||
"url": "https://gitlab.com/joebloggs/test/issues/3#note_101638770"
|
"url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/issues/1#note_1406130881"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"name": "Test",
|
"name": "testing-zulip-gitlab-integration",
|
||||||
"url": "git@gitlab.com:joebloggs/test.git",
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"description": "",
|
"description": null,
|
||||||
"homepage": "https://gitlab.com/joebloggs/test"
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration"
|
||||||
},
|
},
|
||||||
"issue": {
|
"issue": {
|
||||||
"author_id": 1102929,
|
"author_id": 14613894,
|
||||||
"closed_at": null,
|
"closed_at": null,
|
||||||
"confidential": true,
|
"confidential": false,
|
||||||
"created_at": "2018-09-15 21:01:03 UTC",
|
"created_at": "2023-05-20 17:56:18 UTC",
|
||||||
"description": "Test",
|
"description": "I think we should add a couple of more lines to the file. That will make this a lot better. :eyes:",
|
||||||
|
"discussion_locked": null,
|
||||||
"due_date": null,
|
"due_date": null,
|
||||||
"id": 14177506,
|
"id": 128231959,
|
||||||
"iid": 3,
|
"iid": 1,
|
||||||
"last_edited_at": null,
|
"last_edited_at": null,
|
||||||
"last_edited_by_id": null,
|
"last_edited_by_id": null,
|
||||||
"milestone_id": null,
|
"milestone_id": null,
|
||||||
"moved_to_id": null,
|
"moved_to_id": null,
|
||||||
"project_id": 8385998,
|
"duplicated_to_id": null,
|
||||||
"relative_position": 1073743323,
|
"project_id": 46186758,
|
||||||
"state": "opened",
|
"relative_position": 513,
|
||||||
|
"state_id": 1,
|
||||||
"time_estimate": 0,
|
"time_estimate": 0,
|
||||||
"title": "Test",
|
"title": "Add more lines",
|
||||||
"updated_at": "2018-09-15 21:01:03 UTC",
|
"updated_at": "2023-05-25 17:12:06 UTC",
|
||||||
"updated_by_id": null,
|
"updated_by_id": null,
|
||||||
"weight": null,
|
"weight": null,
|
||||||
"url": "https://gitlab.com/joebloggs/test/issues/3",
|
"health_status": null,
|
||||||
|
"url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/issues/1",
|
||||||
"total_time_spent": 0,
|
"total_time_spent": 0,
|
||||||
|
"time_change": 0,
|
||||||
"human_total_time_spent": null,
|
"human_total_time_spent": null,
|
||||||
|
"human_time_change": null,
|
||||||
"human_time_estimate": null,
|
"human_time_estimate": null,
|
||||||
"assignee_ids": [],
|
"assignee_ids": [],
|
||||||
"assignee_id": null
|
"assignee_id": null,
|
||||||
}
|
"labels": [],
|
||||||
|
"state": "opened",
|
||||||
|
"severity": "unknown"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,76 +1,98 @@
|
||||||
{
|
{
|
||||||
"object_kind":"note",
|
"object_kind": "note",
|
||||||
"user":{
|
"event_type": "note",
|
||||||
"name":"Tomasz Kolek",
|
"user": {
|
||||||
"username":"tomaszkolek0",
|
"id": 14613894,
|
||||||
"avatar_url":"https://secure.gravatar.com/avatar/116a6fdbcfd00466297a39174da11fbb?s=80\u0026d=identicon"
|
"name": "Satyam Bansal",
|
||||||
|
"username": "sbansal1999",
|
||||||
|
"avatar_url": "https://secure.gravatar.com/avatar/f4dd7cfc79fac91db4d9ecbb443a0519?s=80&d=identicon",
|
||||||
|
"email": "[REDACTED]"
|
||||||
},
|
},
|
||||||
"project_id":1534233,
|
"project_id": 46186758,
|
||||||
"project":{
|
"project": {
|
||||||
"name":"my-awesome-project",
|
"id": 46186758,
|
||||||
"description":"",
|
"name": "testing-zulip-gitlab-integration",
|
||||||
"web_url":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"description": null,
|
||||||
"avatar_url":null,
|
"web_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"git_ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"avatar_url": null,
|
||||||
"git_http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git",
|
"git_ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"namespace":"tomaszkolek0",
|
"git_http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"visibility_level":0,
|
"namespace": "Satyam Bansal",
|
||||||
"path_with_namespace":"tomaszkolek0/my-awesome-project",
|
"visibility_level": 0,
|
||||||
"default_branch":"master",
|
"path_with_namespace": "sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"homepage":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"default_branch": "main",
|
||||||
"url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"ci_config_path": "",
|
||||||
"ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git"
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git"
|
||||||
},
|
},
|
||||||
"object_attributes":{
|
"object_attributes": {
|
||||||
"id":14172057,
|
"attachment": null,
|
||||||
"note":"Nice issue",
|
"author_id": 14613894,
|
||||||
"noteable_type":"Issue",
|
"change_position": null,
|
||||||
"author_id":670043,
|
"commit_id": null,
|
||||||
"created_at":"2016-08-22 19:46:01 UTC",
|
"created_at": "2023-05-25 18:41:09 UTC",
|
||||||
"updated_at":"2016-08-22 19:46:01 UTC",
|
"discussion_id": "d85e085fd1fbf70a166d9aebd27933112a25a072",
|
||||||
"project_id":1534233,
|
"id": 1406279810,
|
||||||
"attachment":null,
|
"line_code": null,
|
||||||
"line_code":null,
|
"note": "This is again a random comment.",
|
||||||
"commit_id":"",
|
"noteable_id": 128231959,
|
||||||
"noteable_id":2788403,
|
"noteable_type": "Issue",
|
||||||
"st_diff":null,
|
"original_position": null,
|
||||||
"system":false,
|
"position": null,
|
||||||
"updated_by_id":null,
|
"project_id": 46186758,
|
||||||
"type":null,
|
"resolved_at": null,
|
||||||
"position":null,
|
"resolved_by_id": null,
|
||||||
"original_position":null,
|
"resolved_by_push": null,
|
||||||
"resolved_at":null,
|
"st_diff": null,
|
||||||
"resolved_by_id":null,
|
"system": false,
|
||||||
"discussion_id":"3dc99fafcb44acc90c91e745626617b650b50809",
|
"type": null,
|
||||||
"original_discussion_id":null,
|
"updated_at": "2023-05-25 18:41:09 UTC",
|
||||||
"url":"https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2#note_14172057"
|
"updated_by_id": null,
|
||||||
|
"description": "This is again a random comment.",
|
||||||
|
"url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/issues/1#note_1406279810"
|
||||||
},
|
},
|
||||||
"repository":{
|
"repository": {
|
||||||
"name":"my-awesome-project",
|
"name": "testing-zulip-gitlab-integration",
|
||||||
"url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"description":"",
|
"description": null,
|
||||||
"homepage":"https://gitlab.com/tomaszkolek0/my-awesome-project"
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration"
|
||||||
},
|
},
|
||||||
"issue":{
|
"issue": {
|
||||||
"id":2788403,
|
"author_id": 14613894,
|
||||||
"title":"abc",
|
"closed_at": null,
|
||||||
"assignee_id":null,
|
"confidential": false,
|
||||||
"author_id":670043,
|
"created_at": "2023-05-20 17:56:18 UTC",
|
||||||
"project_id":1534233,
|
"description": "I think we should add a couple of more lines to the file. That will make this a lot better. :eyes:",
|
||||||
"created_at":"2016-08-18 18:29:14 UTC",
|
"discussion_locked": null,
|
||||||
"updated_at":"2016-08-22 19:46:01 UTC",
|
"due_date": null,
|
||||||
"position":0,
|
"id": 128231959,
|
||||||
"branch_name":null,
|
"iid": 1,
|
||||||
"description":"",
|
"last_edited_at": null,
|
||||||
"milestone_id":null,
|
"last_edited_by_id": null,
|
||||||
"state":"opened",
|
"milestone_id": null,
|
||||||
"iid":2,
|
"moved_to_id": null,
|
||||||
"updated_by_id":null,
|
"duplicated_to_id": null,
|
||||||
"weight":null,
|
"project_id": 46186758,
|
||||||
"confidential":false,
|
"relative_position": 513,
|
||||||
"moved_to_id":null,
|
"state_id": 1,
|
||||||
"deleted_at":null,
|
"time_estimate": 0,
|
||||||
"due_date":null
|
"title": "Add more lines",
|
||||||
|
"updated_at": "2023-05-25 18:41:09 UTC",
|
||||||
|
"updated_by_id": null,
|
||||||
|
"weight": null,
|
||||||
|
"health_status": null,
|
||||||
|
"url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/issues/1",
|
||||||
|
"total_time_spent": 0,
|
||||||
|
"time_change": 0,
|
||||||
|
"human_total_time_spent": null,
|
||||||
|
"human_time_change": null,
|
||||||
|
"human_time_estimate": null,
|
||||||
|
"assignee_ids": [],
|
||||||
|
"assignee_id": null,
|
||||||
|
"labels": [],
|
||||||
|
"state": "opened",
|
||||||
|
"severity": "unknown"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,129 +1,152 @@
|
||||||
{
|
{
|
||||||
"object_kind":"note",
|
"object_kind": "note",
|
||||||
"user":{
|
"event_type": "note",
|
||||||
"name":"Tomasz Kolek",
|
"user": {
|
||||||
"username":"tomaszkolek0",
|
"id": 14613894,
|
||||||
"avatar_url":"https://secure.gravatar.com/avatar/116a6fdbcfd00466297a39174da11fbb?s=80\u0026d=identicon"
|
"name": "Satyam Bansal",
|
||||||
|
"username": "sbansal1999",
|
||||||
|
"avatar_url": "https://secure.gravatar.com/avatar/f4dd7cfc79fac91db4d9ecbb443a0519?s=80&d=identicon",
|
||||||
|
"email": "[REDACTED]"
|
||||||
},
|
},
|
||||||
"project_id":1534233,
|
"project_id": 46186758,
|
||||||
"project":{
|
"project": {
|
||||||
"name":"my-awesome-project",
|
"id": 46186758,
|
||||||
"description":"",
|
"name": "testing-zulip-gitlab-integration",
|
||||||
"web_url":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"description": null,
|
||||||
"avatar_url":null,
|
"web_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"git_ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"avatar_url": null,
|
||||||
"git_http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git",
|
"git_ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"namespace":"tomaszkolek0",
|
"git_http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"visibility_level":0,
|
"namespace": "Satyam Bansal",
|
||||||
"path_with_namespace":"tomaszkolek0/my-awesome-project",
|
"visibility_level": 0,
|
||||||
"default_branch":"master",
|
"path_with_namespace": "sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"homepage":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"default_branch": "main",
|
||||||
"url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"ci_config_path": "",
|
||||||
"ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git"
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git"
|
||||||
},
|
},
|
||||||
"object_attributes":{
|
"object_attributes": {
|
||||||
"id":14171860,
|
"attachment": null,
|
||||||
"note":"Nice merge request!",
|
"author_id": 14613894,
|
||||||
"noteable_type":"MergeRequest",
|
"change_position": null,
|
||||||
"author_id":670043,
|
"commit_id": null,
|
||||||
"created_at":"2016-08-22 19:36:22 UTC",
|
"created_at": "2023-05-25 19:04:19 UTC",
|
||||||
"updated_at":"2016-08-22 19:36:22 UTC",
|
"discussion_id": "547c7f02ebb7bbdef59e006756cc5b4a09de710a",
|
||||||
"project_id":1534233,
|
"id": 1406328457,
|
||||||
"attachment":null,
|
"line_code": null,
|
||||||
"line_code":null,
|
"note": "I am not sure if this new feature is even required or not.",
|
||||||
"commit_id":"",
|
"noteable_id": 226323715,
|
||||||
"noteable_id":756075,
|
"noteable_type": "MergeRequest",
|
||||||
"st_diff":null,
|
"original_position": null,
|
||||||
"system":false,
|
"position": null,
|
||||||
"updated_by_id":null,
|
"project_id": 46186758,
|
||||||
"type":null,
|
"resolved_at": null,
|
||||||
"position":null,
|
"resolved_by_id": null,
|
||||||
"original_position":null,
|
"resolved_by_push": null,
|
||||||
"resolved_at":null,
|
"st_diff": null,
|
||||||
"resolved_by_id":null,
|
"system": false,
|
||||||
"discussion_id":"431b621ff2e6f4dc0e37ad19160b9e946a02f488",
|
"type": null,
|
||||||
"original_discussion_id":null,
|
"updated_at": "2023-05-25 19:04:19 UTC",
|
||||||
"url":"https://gitlab.com/tomaszkolek0/my-awesome-project/merge_requests/1#note_14171860"
|
"updated_by_id": null,
|
||||||
|
"description": "I am not sure if this new feature is even required or not.",
|
||||||
|
"url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/merge_requests/1#note_1406328457"
|
||||||
},
|
},
|
||||||
"repository":{
|
"repository": {
|
||||||
"name":"my-awesome-project",
|
"name": "testing-zulip-gitlab-integration",
|
||||||
"url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"description":"",
|
"description": null,
|
||||||
"homepage":"https://gitlab.com/tomaszkolek0/my-awesome-project"
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration"
|
||||||
},
|
},
|
||||||
"merge_request":{
|
"merge_request": {
|
||||||
"id":756075,
|
"assignee_id": null,
|
||||||
"target_branch":"master",
|
"author_id": 14613894,
|
||||||
"source_branch":"tomek",
|
"created_at": "2023-05-25 19:03:52 UTC",
|
||||||
"source_project_id":1534233,
|
"description": "",
|
||||||
"author_id":670043,
|
"head_pipeline_id": null,
|
||||||
"assignee_id":null,
|
"id": 226323715,
|
||||||
"title":"Tomek",
|
"iid": 1,
|
||||||
"created_at":"2016-08-22 19:36:12 UTC",
|
"last_edited_at": null,
|
||||||
"updated_at":"2016-08-22 19:36:22 UTC",
|
"last_edited_by_id": null,
|
||||||
"milestone_id":null,
|
"merge_commit_sha": null,
|
||||||
"state":"opened",
|
"merge_error": null,
|
||||||
"merge_status":"can_be_merged",
|
"merge_params": {
|
||||||
"target_project_id":1534233,
|
"force_remove_source_branch": "1"
|
||||||
"iid":1,
|
|
||||||
"description":"",
|
|
||||||
"position":0,
|
|
||||||
"locked_at":null,
|
|
||||||
"updated_by_id":null,
|
|
||||||
"merge_error":null,
|
|
||||||
"merge_params":{
|
|
||||||
"force_remove_source_branch":null
|
|
||||||
},
|
},
|
||||||
"merge_when_build_succeeds":false,
|
"merge_status": "can_be_merged",
|
||||||
"merge_user_id":null,
|
"merge_user_id": null,
|
||||||
"merge_commit_sha":null,
|
"merge_when_pipeline_succeeds": false,
|
||||||
"deleted_at":null,
|
"milestone_id": null,
|
||||||
"approvals_before_merge":null,
|
"source_branch": "feature",
|
||||||
"rebase_commit_sha":null,
|
"source_project_id": 46186758,
|
||||||
"in_progress_merge_commit_sha":null,
|
"state_id": 1,
|
||||||
"source":{
|
"target_branch": "main",
|
||||||
"name":"my-awesome-project",
|
"target_project_id": 46186758,
|
||||||
"description":"",
|
"time_estimate": 0,
|
||||||
"web_url":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"title": "add new-feature",
|
||||||
"avatar_url":null,
|
"updated_at": "2023-05-25 19:03:53 UTC",
|
||||||
"git_ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"updated_by_id": null,
|
||||||
"git_http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git",
|
"url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/merge_requests/1",
|
||||||
"namespace":"tomaszkolek0",
|
"source": {
|
||||||
"visibility_level":0,
|
"id": 46186758,
|
||||||
"path_with_namespace":"tomaszkolek0/my-awesome-project",
|
"name": "testing-zulip-gitlab-integration",
|
||||||
"default_branch":"master",
|
"description": null,
|
||||||
"homepage":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"web_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"avatar_url": null,
|
||||||
"ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"git_ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git"
|
"git_http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"namespace": "Satyam Bansal",
|
||||||
|
"visibility_level": 0,
|
||||||
|
"path_with_namespace": "sbansal1999/testing-zulip-gitlab-integration",
|
||||||
|
"default_branch": "main",
|
||||||
|
"ci_config_path": "",
|
||||||
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git"
|
||||||
},
|
},
|
||||||
"target":{
|
"target": {
|
||||||
"name":"my-awesome-project",
|
"id": 46186758,
|
||||||
"description":"",
|
"name": "testing-zulip-gitlab-integration",
|
||||||
"web_url":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"description": null,
|
||||||
"avatar_url":null,
|
"web_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"git_ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"avatar_url": null,
|
||||||
"git_http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git",
|
"git_ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"namespace":"tomaszkolek0",
|
"git_http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"visibility_level":0,
|
"namespace": "Satyam Bansal",
|
||||||
"path_with_namespace":"tomaszkolek0/my-awesome-project",
|
"visibility_level": 0,
|
||||||
"default_branch":"master",
|
"path_with_namespace": "sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"homepage":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"default_branch": "main",
|
||||||
"url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"ci_config_path": "",
|
||||||
"ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git"
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git"
|
||||||
},
|
},
|
||||||
"last_commit":{
|
"last_commit": {
|
||||||
"id":"600060393d326486c12f222ba78d569dab6b4114",
|
"id": "b7d5e68a840f73be14f580e88bc8e37181805f64",
|
||||||
"message":"new commit\n",
|
"message": "add new-feature\n",
|
||||||
"timestamp":"2016-08-22T21:31:34+02:00",
|
"title": "add new-feature",
|
||||||
"url":"https://gitlab.com/tomaszkolek0/my-awesome-project/commit/600060393d326486c12f222ba78d569dab6b4114",
|
"timestamp": "2023-05-26T00:32:24+05:30",
|
||||||
"author":{
|
"url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/commit/b7d5e68a840f73be14f580e88bc8e37181805f64",
|
||||||
"name":"Tomasz Kolek",
|
"author": {
|
||||||
"email":"tomasz-kolek@o2.pl"
|
"name": "Satyam Bansal",
|
||||||
|
"email": "sbansal1999@gmail.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"work_in_progress":false
|
"work_in_progress": false,
|
||||||
|
"total_time_spent": 0,
|
||||||
|
"time_change": 0,
|
||||||
|
"human_total_time_spent": null,
|
||||||
|
"human_time_change": null,
|
||||||
|
"human_time_estimate": null,
|
||||||
|
"assignee_ids": [],
|
||||||
|
"reviewer_ids": [],
|
||||||
|
"labels": [],
|
||||||
|
"state": "opened",
|
||||||
|
"blocking_discussions_resolved": true,
|
||||||
|
"first_contribution": true,
|
||||||
|
"detailed_merge_status": "mergeable"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,60 +1,81 @@
|
||||||
{
|
{
|
||||||
"object_kind": "note",
|
"object_kind": "note",
|
||||||
"user":{
|
"event_type": "note",
|
||||||
"name":"Tomasz Kolek",
|
"user": {
|
||||||
"username":"tomaszkolek0",
|
"id": 14613894,
|
||||||
"avatar_url":"https://secure.gravatar.com/avatar/116a6fdbcfd00466297a39174da11fbb?s=80\u0026d=identicon"
|
"name": "Satyam Bansal",
|
||||||
|
"username": "sbansal1999",
|
||||||
|
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/14613894/avatar.png",
|
||||||
|
"email": "[REDACTED]"
|
||||||
},
|
},
|
||||||
"project_id": 1534233,
|
"project_id": 46186758,
|
||||||
"project":{
|
"project": {
|
||||||
"name":"my-awesome-project",
|
"id": 46186758,
|
||||||
"description":"",
|
"name": "testing-zulip-gitlab-integration",
|
||||||
"web_url":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"description": null,
|
||||||
"avatar_url":null,
|
"web_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"git_ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"avatar_url": null,
|
||||||
"git_http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git",
|
"git_ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"namespace":"tomaszkolek0",
|
"git_http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"visibility_level":0,
|
"namespace": "Satyam Bansal",
|
||||||
"path_with_namespace":"tomaszkolek0/my-awesome-project",
|
"visibility_level": 0,
|
||||||
"default_branch":"master",
|
"path_with_namespace": "sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"homepage":"https://gitlab.com/tomaszkolek0/my-awesome-project",
|
"default_branch": "main",
|
||||||
"url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"ci_config_path": "",
|
||||||
"ssh_url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration",
|
||||||
"http_url":"https://gitlab.com/tomaszkolek0/my-awesome-project.git"
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
},
|
"ssh_url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
"repository":{
|
"http_url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration.git"
|
||||||
"name":"my-awesome-project",
|
|
||||||
"url":"git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
|
||||||
"description":"",
|
|
||||||
"homepage":"https://gitlab.com/tomaszkolek0/my-awesome-project"
|
|
||||||
},
|
},
|
||||||
"object_attributes": {
|
"object_attributes": {
|
||||||
"id": 14172058,
|
|
||||||
"note": "Nice snippet",
|
|
||||||
"noteable_type": "Snippet",
|
|
||||||
"author_id": 670043,
|
|
||||||
"created_at":"2016-08-22 19:46:01 UTC",
|
|
||||||
"updated_at":"2016-08-22 19:46:01 UTC",
|
|
||||||
"project_id": 1534233,
|
|
||||||
"attachment": null,
|
"attachment": null,
|
||||||
|
"author_id": 14613894,
|
||||||
|
"change_position": null,
|
||||||
|
"commit_id": null,
|
||||||
|
"created_at": "2023-06-08 19:25:03 UTC",
|
||||||
|
"discussion_id": "d3348140b5483090551f0e4cce3a08f2faf041a3",
|
||||||
|
"id": 1424268837,
|
||||||
"line_code": null,
|
"line_code": null,
|
||||||
"commit_id": "",
|
"note": "some comment",
|
||||||
"noteable_id": 2788404,
|
"noteable_id": 2547713,
|
||||||
"system": false,
|
"noteable_type": "Snippet",
|
||||||
|
"original_position": null,
|
||||||
|
"position": null,
|
||||||
|
"project_id": 46186758,
|
||||||
|
"resolved_at": null,
|
||||||
|
"resolved_by_id": null,
|
||||||
|
"resolved_by_push": null,
|
||||||
"st_diff": null,
|
"st_diff": null,
|
||||||
"url":"https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2#note_14172058"
|
"system": false,
|
||||||
|
"type": null,
|
||||||
|
"updated_at": "2023-06-08 19:25:03 UTC",
|
||||||
|
"updated_by_id": null,
|
||||||
|
"description": "some comment",
|
||||||
|
"url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/snippets/2547713#note_1424268837"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"name": "testing-zulip-gitlab-integration",
|
||||||
|
"url": "git@gitlab.com:sbansal1999/testing-zulip-gitlab-integration.git",
|
||||||
|
"description": null,
|
||||||
|
"homepage": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration"
|
||||||
},
|
},
|
||||||
"snippet": {
|
"snippet": {
|
||||||
"id": 2,
|
"id": 2547713,
|
||||||
"title": "test",
|
"title": "a very new new feature",
|
||||||
"content": "puts 'Hello world'",
|
"content": "a very new new feature\na very new new feature\na very new new feature\na very new new feature\na very new new feature",
|
||||||
"author_id": 670043,
|
"author_id": 14613894,
|
||||||
"project_id": 1534233,
|
"project_id": 46186758,
|
||||||
"created_at":"2016-08-21 17:36:01 UTC",
|
"created_at": "2023-05-25 19:13:05 UTC",
|
||||||
"updated_at":"2016-08-22 19:46:01 UTC",
|
"updated_at": "2023-06-08 19:25:03 UTC",
|
||||||
"file_name": "README.md",
|
"file_name": "",
|
||||||
"expires_at": null,
|
|
||||||
"type": "ProjectSnippet",
|
"type": "ProjectSnippet",
|
||||||
"visibility_level": 0
|
"visibility_level": 0,
|
||||||
|
"description": "",
|
||||||
|
"encrypted_secret_token": null,
|
||||||
|
"encrypted_secret_token_iv": null,
|
||||||
|
"secret": false,
|
||||||
|
"repository_read_only": false,
|
||||||
|
"secret_token": null,
|
||||||
|
"url": "https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/snippets/2547713"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
{
|
||||||
|
"object_kind": "note",
|
||||||
|
"user": {
|
||||||
|
"name": "Tomasz Kolek",
|
||||||
|
"username": "tomaszkolek0",
|
||||||
|
"avatar_url": "https://secure.gravatar.com/avatar/116a6fdbcfd00466297a39174da11fbb?s=80\u0026d=identicon"
|
||||||
|
},
|
||||||
|
"project_id": 1534233,
|
||||||
|
"project": {
|
||||||
|
"name": "my-awesome-project",
|
||||||
|
"description": "",
|
||||||
|
"web_url": "https://gitlab.com/tomaszkolek0/my-awesome-project",
|
||||||
|
"avatar_url": null,
|
||||||
|
"git_ssh_url": "git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
||||||
|
"git_http_url": "https://gitlab.com/tomaszkolek0/my-awesome-project.git",
|
||||||
|
"namespace": "tomaszkolek0",
|
||||||
|
"visibility_level": 0,
|
||||||
|
"path_with_namespace": "tomaszkolek0/my-awesome-project",
|
||||||
|
"default_branch": "master",
|
||||||
|
"homepage": "https://gitlab.com/tomaszkolek0/my-awesome-project",
|
||||||
|
"url": "git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
||||||
|
"ssh_url": "git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
||||||
|
"http_url": "https://gitlab.com/tomaszkolek0/my-awesome-project.git"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"name": "my-awesome-project",
|
||||||
|
"url": "git@gitlab.com:tomaszkolek0/my-awesome-project.git",
|
||||||
|
"description": "",
|
||||||
|
"homepage": "https://gitlab.com/tomaszkolek0/my-awesome-project"
|
||||||
|
},
|
||||||
|
"object_attributes": {
|
||||||
|
"id": 14172058,
|
||||||
|
"note": "Nice snippet",
|
||||||
|
"noteable_type": "Snippet",
|
||||||
|
"author_id": 670043,
|
||||||
|
"created_at": "2016-08-22 19:46:01 UTC",
|
||||||
|
"updated_at": "2016-08-22 19:46:01 UTC",
|
||||||
|
"project_id": 1534233,
|
||||||
|
"attachment": null,
|
||||||
|
"line_code": null,
|
||||||
|
"commit_id": "",
|
||||||
|
"noteable_id": 2788404,
|
||||||
|
"system": false,
|
||||||
|
"st_diff": null,
|
||||||
|
"url": "https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2#note_14172058"
|
||||||
|
},
|
||||||
|
"snippet": {
|
||||||
|
"id": 2,
|
||||||
|
"title": "test",
|
||||||
|
"content": "puts 'Hello world'",
|
||||||
|
"author_id": 670043,
|
||||||
|
"project_id": 1534233,
|
||||||
|
"created_at": "2016-08-21 17:36:01 UTC",
|
||||||
|
"updated_at": "2016-08-22 19:46:01 UTC",
|
||||||
|
"file_name": "README.md",
|
||||||
|
"expires_at": null,
|
||||||
|
"type": "ProjectSnippet",
|
||||||
|
"visibility_level": 0
|
||||||
|
}
|
||||||
|
}
|
|
@ -224,20 +224,20 @@ class GitlabHookTests(WebhookTestCase):
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_note_commit_event_message(self) -> None:
|
def test_note_commit_event_message(self) -> None:
|
||||||
expected_topic = "my-awesome-project"
|
expected_topic = "testing-zulip-gitlab-integration"
|
||||||
expected_message = "Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/commit/66abd2da28809ffa128ed0447965cf11d7f863a7#note_14169211) on [66abd2da288](https://gitlab.com/tomaszkolek0/my-awesome-project/commit/66abd2da28809ffa128ed0447965cf11d7f863a7):\n~~~ quote\nnice commit\n~~~"
|
expected_message = "Satyam Bansal [commented](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/commit/82689ddf00fd7bdadb5c2afb3b94bd555edc9d01#note_1406241063) on [82689ddf00f](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/commit/82689ddf00fd7bdadb5c2afb3b94bd555edc9d01):\n~~~ quote\nWow what a beautiful commit.\n~~~"
|
||||||
|
|
||||||
self.check_webhook("note_hook__commit_note", expected_topic, expected_message)
|
self.check_webhook("note_hook__commit_note", expected_topic, expected_message)
|
||||||
|
|
||||||
def test_note_merge_request_event_message(self) -> None:
|
def test_note_merge_request_event_message(self) -> None:
|
||||||
expected_topic = "my-awesome-project / MR #1 Tomek"
|
expected_topic = "testing-zulip-gitlab-integration / MR #1 add new-feature"
|
||||||
expected_message = "Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/merge_requests/1#note_14171860) on [MR #1](https://gitlab.com/tomaszkolek0/my-awesome-project/merge_requests/1):\n\n~~~ quote\nNice merge request!\n~~~"
|
expected_message = "Satyam Bansal [commented](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/merge_requests/1#note_1406328457) on [MR #1](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/merge_requests/1):\n\n~~~ quote\nI am not sure if this new feature is even required or not.\n~~~"
|
||||||
|
|
||||||
self.check_webhook("note_hook__merge_request_note", expected_topic, expected_message)
|
self.check_webhook("note_hook__merge_request_note", expected_topic, expected_message)
|
||||||
|
|
||||||
def test_note_merge_request_event_message_without_merge_request_title(self) -> None:
|
def test_note_merge_request_event_message_without_merge_request_title(self) -> None:
|
||||||
expected_topic = "my-awesome-project / MR #1"
|
expected_topic = "testing-zulip-gitlab-integration / MR #1"
|
||||||
expected_message = "Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/merge_requests/1#note_14171860) on [MR #1](https://gitlab.com/tomaszkolek0/my-awesome-project/merge_requests/1):\n\n~~~ quote\nNice merge request!\n~~~"
|
expected_message = "Satyam Bansal [commented](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/merge_requests/1#note_1406328457) on [MR #1](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/merge_requests/1):\n\n~~~ quote\nI am not sure if this new feature is even required or not.\n~~~"
|
||||||
# To keep things as valid JSON.
|
# To keep things as valid JSON.
|
||||||
self.url = self.build_webhook_url(use_merge_request_title="false")
|
self.url = self.build_webhook_url(use_merge_request_title="false")
|
||||||
self.check_webhook("note_hook__merge_request_note", expected_topic, expected_message)
|
self.check_webhook("note_hook__merge_request_note", expected_topic, expected_message)
|
||||||
|
@ -245,39 +245,45 @@ class GitlabHookTests(WebhookTestCase):
|
||||||
def test_note_merge_request_with_custom_topic_in_url(self) -> None:
|
def test_note_merge_request_with_custom_topic_in_url(self) -> None:
|
||||||
self.url = self.build_webhook_url(topic="notifications")
|
self.url = self.build_webhook_url(topic="notifications")
|
||||||
expected_topic = "notifications"
|
expected_topic = "notifications"
|
||||||
expected_message = "[[my-awesome-project](https://gitlab.com/tomaszkolek0/my-awesome-project)] Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/merge_requests/1#note_14171860) on [MR #1 Tomek](https://gitlab.com/tomaszkolek0/my-awesome-project/merge_requests/1):\n\n~~~ quote\nNice merge request!\n~~~"
|
expected_message = "[[testing-zulip-gitlab-integration](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration)] Satyam Bansal [commented](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/merge_requests/1#note_1406328457) on [MR #1 add new-feature](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/merge_requests/1):\n\n~~~ quote\nI am not sure if this new feature is even required or not.\n~~~"
|
||||||
|
|
||||||
self.check_webhook("note_hook__merge_request_note", expected_topic, expected_message)
|
self.check_webhook("note_hook__merge_request_note", expected_topic, expected_message)
|
||||||
|
|
||||||
def test_note_issue_event_message(self) -> None:
|
def test_note_issue_event_message(self) -> None:
|
||||||
expected_topic = "my-awesome-project / issue #2 abc"
|
expected_topic = "testing-zulip-gitlab-integration / issue #1 Add more lines"
|
||||||
expected_message = "Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2#note_14172057) on [issue #2](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2):\n\n~~~ quote\nNice issue\n~~~"
|
expected_message = "Satyam Bansal [commented](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/issues/1#note_1406279810) on [issue #1](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/issues/1):\n\n~~~ quote\nThis is again a random comment.\n~~~"
|
||||||
|
|
||||||
self.check_webhook("note_hook__issue_note", expected_topic, expected_message)
|
self.check_webhook("note_hook__issue_note", expected_topic, expected_message)
|
||||||
|
|
||||||
def test_note_confidential_issue_event_message(self) -> None:
|
def test_note_confidential_issue_event_message(self) -> None:
|
||||||
expected_subject = "Test / issue #3 Test"
|
expected_subject = "testing-zulip-gitlab-integration / issue #1 Add more lines"
|
||||||
expected_message = "Joe Bloggs [commented](https://gitlab.com/joebloggs/test/issues/3#note_101638770) on [issue #3](https://gitlab.com/joebloggs/test/issues/3):\n\n~~~ quote\nTest\n~~~"
|
expected_message = "Satyam Bansal [commented](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/issues/1#note_1406130881) on [issue #1](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/issues/1):\n\n~~~ quote\nSome more comments\n~~~"
|
||||||
|
|
||||||
self.check_webhook("note_hook__confidential_issue_note", expected_subject, expected_message)
|
self.check_webhook("note_hook__confidential_issue_note", expected_subject, expected_message)
|
||||||
|
|
||||||
def test_note_issue_with_custom_topic_in_url(self) -> None:
|
def test_note_issue_with_custom_topic_in_url(self) -> None:
|
||||||
self.url = self.build_webhook_url(topic="notifications")
|
self.url = self.build_webhook_url(topic="notifications")
|
||||||
expected_topic = "notifications"
|
expected_topic = "notifications"
|
||||||
expected_message = "[[my-awesome-project](https://gitlab.com/tomaszkolek0/my-awesome-project)] Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2#note_14172057) on [issue #2 abc](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2):\n\n~~~ quote\nNice issue\n~~~"
|
expected_message = "[[testing-zulip-gitlab-integration](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration)] Satyam Bansal [commented](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/issues/1#note_1406279810) on [issue #1 Add more lines](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/issues/1):\n\n~~~ quote\nThis is again a random comment.\n~~~"
|
||||||
|
|
||||||
self.check_webhook("note_hook__issue_note", expected_topic, expected_message)
|
self.check_webhook("note_hook__issue_note", expected_topic, expected_message)
|
||||||
|
|
||||||
def test_note_snippet_event_message(self) -> None:
|
def test_note_snippet_old_event_message(self) -> None:
|
||||||
expected_topic = "my-awesome-project / snippet #2 test"
|
expected_topic = "my-awesome-project / snippet #2 test"
|
||||||
expected_message = "Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2#note_14172058) on [snippet #2](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2):\n\n~~~ quote\nNice snippet\n~~~"
|
expected_message = "Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2#note_14172058) on [snippet #2](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2):\n\n~~~ quote\nNice snippet\n~~~"
|
||||||
|
|
||||||
|
self.check_webhook("note_hook__snippet_note_old", expected_topic, expected_message)
|
||||||
|
|
||||||
|
def test_note_snippet_event_message(self) -> None:
|
||||||
|
expected_topic = "testing-zulip-gitlab-integration / snippet #2547713 a ver..."
|
||||||
|
expected_message = "Satyam Bansal [commented](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/snippets/2547713#note_1424268837) on [snippet #2547713](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/snippets/2547713):\n\n~~~ quote\nsome comment\n~~~"
|
||||||
|
|
||||||
self.check_webhook("note_hook__snippet_note", expected_topic, expected_message)
|
self.check_webhook("note_hook__snippet_note", expected_topic, expected_message)
|
||||||
|
|
||||||
def test_note_snippet_with_custom_topic_in_url(self) -> None:
|
def test_note_snippet_with_custom_topic_in_url(self) -> None:
|
||||||
self.url = self.build_webhook_url(topic="notifications")
|
self.url = self.build_webhook_url(topic="notifications")
|
||||||
expected_topic = "notifications"
|
expected_topic = "notifications"
|
||||||
expected_message = "[[my-awesome-project](https://gitlab.com/tomaszkolek0/my-awesome-project)] Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2#note_14172058) on [snippet #2 test](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2):\n\n~~~ quote\nNice snippet\n~~~"
|
expected_message = "[[testing-zulip-gitlab-integration](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration)] Satyam Bansal [commented](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/-/snippets/2547713#note_1424268837) on [snippet #2547713 a very new new feature](https://gitlab.com/sbansal1999/testing-zulip-gitlab-integration/snippets/2547713):\n\n~~~ quote\nsome comment\n~~~"
|
||||||
|
|
||||||
self.check_webhook("note_hook__snippet_note", expected_topic, expected_message)
|
self.check_webhook("note_hook__snippet_note", expected_topic, expected_message)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue