diff --git a/zerver/webhooks/bitbucket2/fixtures/commit_comment_created.json b/zerver/webhooks/bitbucket2/fixtures/commit_comment_created.json index 12b6657d4a..239c71dd1f 100644 --- a/zerver/webhooks/bitbucket2/fixtures/commit_comment_created.json +++ b/zerver/webhooks/bitbucket2/fixtures/commit_comment_created.json @@ -13,7 +13,7 @@ "href":"https://bitbucket.org/account/kolaszek/avatar/32/" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "type":"user" }, @@ -67,7 +67,7 @@ "href":"https://bitbucket.org/account/kolaszek/avatar/32/" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "type":"user" }, @@ -88,7 +88,7 @@ "href":"https://bitbucket.org/account/kolaszek/avatar/32/" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "type":"user" }, diff --git a/zerver/webhooks/bitbucket2/fixtures/commit_status_changed.json b/zerver/webhooks/bitbucket2/fixtures/commit_status_changed.json index 21827dde6c..2daf960b34 100644 --- a/zerver/webhooks/bitbucket2/fixtures/commit_status_changed.json +++ b/zerver/webhooks/bitbucket2/fixtures/commit_status_changed.json @@ -12,7 +12,7 @@ "href":"https://bitbucket.org/account/kolaszek/avatar/32/" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "type":"user" }, @@ -35,7 +35,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, diff --git a/zerver/webhooks/bitbucket2/fixtures/force_push.json b/zerver/webhooks/bitbucket2/fixtures/force_push.json index 123c1bde66..6b94959e68 100644 --- a/zerver/webhooks/bitbucket2/fixtures/force_push.json +++ b/zerver/webhooks/bitbucket2/fixtures/force_push.json @@ -15,7 +15,7 @@ "uuid":"{ede265ff-3649-4068-a7da-81ac581b6f47}", "name":"Repository name", "owner":{ - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "links":{ "self":{ "href":"https://api.bitbucket.org/2.0/users/kolaszek" @@ -37,7 +37,7 @@ "is_private":true }, "actor":{ - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "links":{ "self":{ "href":"https://api.bitbucket.org/2.0/users/kolaszek" @@ -70,7 +70,7 @@ "author":{ "raw":"Tomasz Kolek ", "user":{ - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "links":{ "self":{ "href":"https://api.bitbucket.org/2.0/users/kolaszek" @@ -153,7 +153,7 @@ "author":{ "raw":"Tomasz Kolek ", "user":{ - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "links":{ "self":{ "href":"https://api.bitbucket.org/2.0/users/kolaszek" @@ -201,7 +201,7 @@ "author":{ "raw":"Tomasz Kolek ", "user":{ - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "links":{ "self":{ "href":"https://api.bitbucket.org/2.0/users/kolaszek" @@ -249,7 +249,7 @@ "author":{ "raw":"Tomasz Kolek ", "user":{ - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "links":{ "self":{ "href":"https://api.bitbucket.org/2.0/users/kolaszek" @@ -297,7 +297,7 @@ "author":{ "raw":"Tomasz Kolek ", "user":{ - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "links":{ "self":{ "href":"https://api.bitbucket.org/2.0/users/kolaszek" @@ -336,7 +336,7 @@ "author":{ "raw":"Tomasz Kolek ", "user":{ - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "links":{ "self":{ "href":"https://api.bitbucket.org/2.0/users/kolaszek" diff --git a/zerver/webhooks/bitbucket2/fixtures/fork.json b/zerver/webhooks/bitbucket2/fixtures/fork.json index 39d79f5c43..d5d9898ca1 100644 --- a/zerver/webhooks/bitbucket2/fixtures/fork.json +++ b/zerver/webhooks/bitbucket2/fixtures/fork.json @@ -12,7 +12,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz" }, @@ -48,7 +48,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz" } diff --git a/zerver/webhooks/bitbucket2/fixtures/issue_commented.json b/zerver/webhooks/bitbucket2/fixtures/issue_commented.json index 51815a79db..6df4f00b09 100644 --- a/zerver/webhooks/bitbucket2/fixtures/issue_commented.json +++ b/zerver/webhooks/bitbucket2/fixtures/issue_commented.json @@ -37,7 +37,7 @@ "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "type":"user", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "version":null, "milestone":null, @@ -63,7 +63,7 @@ "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "type":"user", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "priority":"major", "created_on":"2016-07-04T17:36:51.890354+00:00", @@ -102,7 +102,7 @@ "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "type":"user", - "username":"kolaszek" + "nickname":"" }, "name":"Repository name", "full_name":"kolaszek/repository-name", @@ -138,7 +138,7 @@ "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "type":"user", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "content":{ "raw":"Add comment", @@ -162,6 +162,6 @@ "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "type":"user", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" } } diff --git a/zerver/webhooks/bitbucket2/fixtures/issue_created.json b/zerver/webhooks/bitbucket2/fixtures/issue_created.json index 7d5066dfd7..69ea450f80 100644 --- a/zerver/webhooks/bitbucket2/fixtures/issue_created.json +++ b/zerver/webhooks/bitbucket2/fixtures/issue_created.json @@ -14,7 +14,7 @@ "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "type":"user", "display_name":"Tomasz", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "issue":{ "votes":0, @@ -66,7 +66,7 @@ "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "type":"user", "display_name":"Tomasz", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "priority":"major", "title":"Bug", @@ -87,7 +87,7 @@ "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "type":"user", "display_name":"Tomasz", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "state":"new" }, @@ -122,7 +122,7 @@ "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "type":"user", "display_name":"Tomasz", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "is_private":true, "full_name":"kolaszek/repository-name", diff --git a/zerver/webhooks/bitbucket2/fixtures/issue_updated.json b/zerver/webhooks/bitbucket2/fixtures/issue_updated.json index 12070a56df..4d4e90e0c2 100644 --- a/zerver/webhooks/bitbucket2/fixtures/issue_updated.json +++ b/zerver/webhooks/bitbucket2/fixtures/issue_updated.json @@ -13,7 +13,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "type":"user" }, "comment":{ @@ -37,7 +37,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "type":"user" }, "created_on":"2016-07-04T17:38:33.962551+00:00", @@ -80,7 +80,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "type":"user" }, "type":"repository", @@ -108,7 +108,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "type":"user" }, "links":{ @@ -180,7 +180,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "type":"user" } } diff --git a/zerver/webhooks/bitbucket2/fixtures/more_than_one_push_event.json b/zerver/webhooks/bitbucket2/fixtures/more_than_one_push_event.json index 9a064da898..7c7a6a5ce1 100644 --- a/zerver/webhooks/bitbucket2/fixtures/more_than_one_push_event.json +++ b/zerver/webhooks/bitbucket2/fixtures/more_than_one_push_event.json @@ -32,7 +32,7 @@ } }, "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "website":"" }, @@ -90,7 +90,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -139,7 +139,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -239,6 +239,6 @@ } }, "website":null, - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" } } diff --git a/zerver/webhooks/bitbucket2/fixtures/pull_request_approved_or_unapproved.json b/zerver/webhooks/bitbucket2/fixtures/pull_request_approved_or_unapproved.json index f5a3ff9239..6e237ad768 100644 --- a/zerver/webhooks/bitbucket2/fixtures/pull_request_approved_or_unapproved.json +++ b/zerver/webhooks/bitbucket2/fixtures/pull_request_approved_or_unapproved.json @@ -52,7 +52,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz" }, @@ -115,7 +115,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz" }, @@ -140,7 +140,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz" }, @@ -178,7 +178,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz" } @@ -196,7 +196,7 @@ "href":"https://api.bitbucket.org/2.0/users/kolaszek" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz" } diff --git a/zerver/webhooks/bitbucket2/fixtures/pull_request_comment_action.json b/zerver/webhooks/bitbucket2/fixtures/pull_request_comment_action.json index 691f286e8e..6ea50b255e 100644 --- a/zerver/webhooks/bitbucket2/fixtures/pull_request_comment_action.json +++ b/zerver/webhooks/bitbucket2/fixtures/pull_request_comment_action.json @@ -25,7 +25,7 @@ "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz", "type":"user", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "updated_on":"2016-07-04T20:47:38.608171+00:00", "content":{ @@ -78,7 +78,7 @@ "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz", "type":"user", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "full_name":"kolaszek/repository-name", "name":"Repository name", @@ -100,7 +100,7 @@ "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz", "type":"user", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "pullrequest":{ "title":"new commit", @@ -138,7 +138,7 @@ "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz", "type":"user", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "type":"pullrequest", "merge_commit":null, @@ -224,7 +224,7 @@ "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz", "type":"user", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" } } ] diff --git a/zerver/webhooks/bitbucket2/fixtures/pull_request_created_or_updated.json b/zerver/webhooks/bitbucket2/fixtures/pull_request_created_or_updated.json index 9b41d3a8dc..34dcc781e3 100644 --- a/zerver/webhooks/bitbucket2/fixtures/pull_request_created_or_updated.json +++ b/zerver/webhooks/bitbucket2/fixtures/pull_request_created_or_updated.json @@ -74,7 +74,7 @@ "href":"https://bitbucket.org/account/tkolek/avatar/32/" } }, "type":"user", - "username":"tkolek", + "nickname":"T Kolek", "uuid":"{bf830c24-bde2-41f1-a790-2c9372a2e789}", "display_name":"Tomasz Kolek" } @@ -95,7 +95,7 @@ } }, "display_name":"Tomasz", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "task_count":0, "title":"new commit", @@ -135,7 +135,7 @@ } }, "display_name":"Tomasz", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "repository":{ "website":"", @@ -171,7 +171,7 @@ } }, "display_name":"Tomasz", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" } } } diff --git a/zerver/webhooks/bitbucket2/fixtures/pull_request_created_or_updated_without_username.json b/zerver/webhooks/bitbucket2/fixtures/pull_request_created_or_updated_without_username.json index dbed43978f..2b5cf1a73c 100644 --- a/zerver/webhooks/bitbucket2/fixtures/pull_request_created_or_updated_without_username.json +++ b/zerver/webhooks/bitbucket2/fixtures/pull_request_created_or_updated_without_username.json @@ -94,7 +94,7 @@ } }, "display_name":"Tomasz", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "task_count":0, "title":"new commit", @@ -134,7 +134,7 @@ } }, "display_name":"Tomasz", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "repository":{ "website":"", @@ -170,7 +170,7 @@ } }, "display_name":"Tomasz", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" } } } diff --git a/zerver/webhooks/bitbucket2/fixtures/pull_request_fulfilled_or_rejected.json b/zerver/webhooks/bitbucket2/fixtures/pull_request_fulfilled_or_rejected.json index a614b2a5a8..ea8b93fbe0 100644 --- a/zerver/webhooks/bitbucket2/fixtures/pull_request_fulfilled_or_rejected.json +++ b/zerver/webhooks/bitbucket2/fixtures/pull_request_fulfilled_or_rejected.json @@ -13,7 +13,7 @@ "href":"https://bitbucket.org/account/kolaszek/avatar/32/" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, "pullrequest":{ @@ -43,7 +43,7 @@ "href":"https://bitbucket.org/account/kolaszek/avatar/32/" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, "author":{ @@ -60,7 +60,7 @@ "href":"https://bitbucket.org/account/kolaszek/avatar/32/" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, "updated_on":"2016-07-04T20:17:13.680242+00:00", @@ -167,7 +167,7 @@ "href":"https://bitbucket.org/account/kolaszek/avatar/32/" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, "full_name":"kolaszek/repository-name", diff --git a/zerver/webhooks/bitbucket2/fixtures/push.json b/zerver/webhooks/bitbucket2/fixtures/push.json index 984a6b2cc9..b5a3d1fffa 100644 --- a/zerver/webhooks/bitbucket2/fixtures/push.json +++ b/zerver/webhooks/bitbucket2/fixtures/push.json @@ -12,7 +12,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -35,7 +35,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -107,7 +107,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -156,7 +156,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, diff --git a/zerver/webhooks/bitbucket2/fixtures/push_commits_above_limit.json b/zerver/webhooks/bitbucket2/fixtures/push_commits_above_limit.json index 67998cd58d..f722425661 100644 --- a/zerver/webhooks/bitbucket2/fixtures/push_commits_above_limit.json +++ b/zerver/webhooks/bitbucket2/fixtures/push_commits_above_limit.json @@ -15,7 +15,7 @@ "display_name":"Tomasz", "type":"user", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "location":null, "created_on":"2016-06-29T17:51:47.001868+00:00" }, @@ -366,7 +366,7 @@ }, "repository":{ "owner":{ - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "links":{ "self":{ "href":"https://api.bitbucket.org/2.0/users/kolaszek" diff --git a/zerver/webhooks/bitbucket2/fixtures/push_more_than_one_tag.json b/zerver/webhooks/bitbucket2/fixtures/push_more_than_one_tag.json index a1aa6a4dfb..4f05c08264 100644 --- a/zerver/webhooks/bitbucket2/fixtures/push_more_than_one_tag.json +++ b/zerver/webhooks/bitbucket2/fixtures/push_more_than_one_tag.json @@ -17,7 +17,7 @@ "type":"user", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "location":null, - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "repository":{ "links":{ @@ -48,7 +48,7 @@ "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz", "type":"user", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "name":"Repository name", "is_private":false, diff --git a/zerver/webhooks/bitbucket2/fixtures/push_multiple_committers.json b/zerver/webhooks/bitbucket2/fixtures/push_multiple_committers.json index aca3f87487..e7649a185a 100644 --- a/zerver/webhooks/bitbucket2/fixtures/push_multiple_committers.json +++ b/zerver/webhooks/bitbucket2/fixtures/push_multiple_committers.json @@ -12,7 +12,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -35,7 +35,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -107,7 +107,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -156,7 +156,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -194,7 +194,7 @@ } }, "type":"user", - "username":"zbenjamin", + "nickname":"Zev Benjamin", "display_name":"Ben", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -231,7 +231,7 @@ } }, "type":"user", - "username":"zbenjamin", + "nickname":"Zev Benjamin", "display_name":"Ben", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, diff --git a/zerver/webhooks/bitbucket2/fixtures/push_multiple_committers_with_others.json b/zerver/webhooks/bitbucket2/fixtures/push_multiple_committers_with_others.json index bcb7e1f68e..a2e55bbd2f 100644 --- a/zerver/webhooks/bitbucket2/fixtures/push_multiple_committers_with_others.json +++ b/zerver/webhooks/bitbucket2/fixtures/push_multiple_committers_with_others.json @@ -12,7 +12,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -35,7 +35,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -107,7 +107,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -156,7 +156,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -193,7 +193,7 @@ } }, "type":"user", - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -230,7 +230,7 @@ } }, "type":"user", - "username":"Tomasz", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -267,7 +267,7 @@ } }, "type":"user", - "username":"Tomasz", + "nickname":"Tomasz Kolaszek", "display_name":"Tomasz", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -304,7 +304,7 @@ } }, "type":"user", - "username":"james", + "nickname":"James Franklin", "display_name":"James", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -341,7 +341,7 @@ } }, "type":"user", - "username":"james", + "nickname":"James Franklin", "display_name":"James", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -378,7 +378,7 @@ } }, "type":"user", - "username":"james", + "nickname":"James Kolek", "display_name":"James", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -415,7 +415,7 @@ } }, "type":"user", - "username":"Brendon", + "nickname":"Brendon Rogers", "display_name":"Brendon", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -452,7 +452,7 @@ } }, "type":"user", - "username":"Brendon", + "nickname":"Brendon Rogers", "display_name":"Brendon", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -490,7 +490,7 @@ } }, "type":"user", - "username":"zbenjamin", + "nickname":"Zev Benjamin", "display_name":"Ben", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, diff --git a/zerver/webhooks/bitbucket2/fixtures/push_one_tag.json b/zerver/webhooks/bitbucket2/fixtures/push_one_tag.json index e9197992b0..a3817a1e5d 100644 --- a/zerver/webhooks/bitbucket2/fixtures/push_one_tag.json +++ b/zerver/webhooks/bitbucket2/fixtures/push_one_tag.json @@ -17,7 +17,7 @@ "type":"user", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "location":null, - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "repository":{ "links":{ @@ -48,7 +48,7 @@ "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", "display_name":"Tomasz", "type":"user", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "name":"Repository name", "is_private":false, diff --git a/zerver/webhooks/bitbucket2/fixtures/push_remove_tag.json b/zerver/webhooks/bitbucket2/fixtures/push_remove_tag.json index 0614e9d33b..5257a9e3c1 100644 --- a/zerver/webhooks/bitbucket2/fixtures/push_remove_tag.json +++ b/zerver/webhooks/bitbucket2/fixtures/push_remove_tag.json @@ -32,7 +32,7 @@ } }, "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}", - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" }, "website":"" }, @@ -111,6 +111,6 @@ } }, "website":null, - "username":"kolaszek" + "nickname":"Tomasz Kolaszek" } } diff --git a/zerver/webhooks/bitbucket2/fixtures/push_without_changes.json b/zerver/webhooks/bitbucket2/fixtures/push_without_changes.json index ee6f2aae2d..4a50dd9bd1 100644 --- a/zerver/webhooks/bitbucket2/fixtures/push_without_changes.json +++ b/zerver/webhooks/bitbucket2/fixtures/push_without_changes.json @@ -5,7 +5,7 @@ ] }, "actor":{ - "username":"eeshangarg", + "nickname":"Eeshan Garg", "type":"user", "display_name":"eeshangarg", "uuid":"{a161e482-30e8-47ef-b6ab-c4e4cfaa0dce}", @@ -55,7 +55,7 @@ }, "full_name":"webhooktest/test-repo", "owner":{ - "username":"webhooktest", + "nickname":"Webhook Test", "type":"team", "display_name":"webhooktest", "uuid":"{31358906-183f-4b53-b83c-f70ba0ca5d3c}", diff --git a/zerver/webhooks/bitbucket2/fixtures/remove_branch.json b/zerver/webhooks/bitbucket2/fixtures/remove_branch.json index 75d77acaa5..1e5a3e964a 100644 --- a/zerver/webhooks/bitbucket2/fixtures/remove_branch.json +++ b/zerver/webhooks/bitbucket2/fixtures/remove_branch.json @@ -19,7 +19,7 @@ "href":"https://bitbucket.org/kolaszek/" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "type":"user", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -84,7 +84,7 @@ "href":"https://bitbucket.org/kolaszek/" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "type":"user", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" }, @@ -140,7 +140,7 @@ "href":"https://bitbucket.org/kolaszek/" } }, - "username":"kolaszek", + "nickname":"Tomasz Kolaszek", "type":"user", "uuid":"{678ab31f-9f88-4d7a-b343-1bdf9f024917}" } diff --git a/zerver/webhooks/bitbucket2/fixtures/repo_updated.json b/zerver/webhooks/bitbucket2/fixtures/repo_updated.json index 075c1ec8e3..e5d04e46fb 100644 --- a/zerver/webhooks/bitbucket2/fixtures/repo_updated.json +++ b/zerver/webhooks/bitbucket2/fixtures/repo_updated.json @@ -34,7 +34,7 @@ } }, "actor":{ - "username":"eeshangarg", + "nickname":"Eeshan Garg", "type":"user", "display_name":"eeshangarg", "uuid":"{a161e482-30e8-47ef-b6ab-c4e4cfaa0dce}", @@ -84,7 +84,7 @@ }, "full_name":"webhooktest/new-name", "owner":{ - "username":"webhooktest", + "nickname":"Webhook Test", "type":"team", "display_name":"webhooktest", "uuid":"{31358906-183f-4b53-b83c-f70ba0ca5d3c}", diff --git a/zerver/webhooks/bitbucket2/tests.py b/zerver/webhooks/bitbucket2/tests.py index e56da3db74..e3a29e1816 100644 --- a/zerver/webhooks/bitbucket2/tests.py +++ b/zerver/webhooks/bitbucket2/tests.py @@ -431,7 +431,6 @@ class Bitbucket2HookTests(WebhookTestCase): self.assertEqual(get_user_info({}), "Unknown user") dct = dict( - username="asmith", nickname= "alice", noisy_field="whatever", display_name="Alice Smith", @@ -443,7 +442,4 @@ class Bitbucket2HookTests(WebhookTestCase): self.assertEqual(get_user_info(dct), "alice") del dct["nickname"] - self.assertEqual(get_user_info(dct), "asmith") - del dct["username"] - self.assertEqual(get_user_info(dct), "Unknown user") diff --git a/zerver/webhooks/bitbucket2/view.py b/zerver/webhooks/bitbucket2/view.py index 0cbe65429d..abb025f7ba 100644 --- a/zerver/webhooks/bitbucket2/view.py +++ b/zerver/webhooks/bitbucket2/view.py @@ -411,15 +411,6 @@ def get_user_info(dct: Dict[str, Any]) -> str: unsupported_event=True, ) - if "username" in dct: - # We don't expect this to happen after April 2019; this is - # just defensive code, plus it allows us to avoid changing - # a bunch of test fixtures. We will want to delete this code - # as soon as we have confidence that we don't get errors - # related to display_name/nickname being missing. (see above - # code) - return dct["username"] - return "Unknown user" def get_actor_info(payload: Dict[str, Any]) -> str: