)]}' { "commit": "c96b441a1e07dfa75c03a3c214f20d341ec97971", "tree": "06883a473a62b31c4fcfb53058888f79ddb0fe0b", "parents": [ "0e4e41a160afb3553ea0a895500770b290ab569b" ], "author": { "name": "David Pursehouse", "email": "dpursehouse@collab.net", "time": "Wed Aug 30 08:40:20 2017 +0900" }, "committer": { "name": "David Pursehouse", "email": "dpursehouse@collab.net", "time": "Wed Aug 30 09:47:50 2017 +0900" }, "message": "HookArgs: Use IdentifiedUser.getNameEmail to format account name\n\nIn most of the hooks, the account is being formatted as either:\n\n Name Surname (email@domain.com)\n\nwhen the account has an email address, or:\n\n Name Surname\n\nwhen the account does not have an email address. If the account name\nis empty the anonymous coward name is used.\n\nInstead of implementing this logic in the hook, defer it to the\nexisting implementation in IdentifiedUser which properly formats\nthe name when there is an email address:\n\n Name Surname \u003cemail@domain.com\u003e\n\nand also handles the cases where the account does not have an email\naddress but instead has a username, or falls back to the account Id.\n\nThe names used in the ref-update and commit-received hooks were already\nformatted like this, so this change makes the rest of the hooks\nconsistent.\n\nChange-Id: I99eeab1759dcedfdcc8c689ee6ac4599e3b58325\n", "tree_diff": [ { "type": "modify", "old_id": "fa3baec24dfbe53b927c6137ad9056f179eaf310", "old_mode": 33188, "old_path": "src/main/java/com/googlesource/gerrit/plugins/hooks/HookArgs.java", "new_id": "5379239be34af5ae7c57db64c67b5235dc45b6c8", "new_mode": 33188, "new_path": "src/main/java/com/googlesource/gerrit/plugins/hooks/HookArgs.java" }, { "type": "modify", "old_id": "be0897766e916aeed2698acf974b90c035c35191", "old_mode": 33188, "old_path": "src/main/java/com/googlesource/gerrit/plugins/hooks/HookFactory.java", "new_id": "29693580828a4b8a8996f58dadb750c2d1a20f32", "new_mode": 33188, "new_path": "src/main/java/com/googlesource/gerrit/plugins/hooks/HookFactory.java" } ] }