)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"168997d0063954ff6495c581e2a63fb3d1fd45ca","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e7596ef2_57b5f4b1","updated":"2024-02-28 01:02:27.000000000","message":"Looks good to me.\n\nI don\u0027t have a strong feeling on \"\" vs None.","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"e91249991967c46960a8954b82d477cf99a6d5a4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"305972ec_115d7324","updated":"2024-02-27 21:10:15.000000000","message":"One set of small nits inline.","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"02ee987aa9bf55935a88b5be61b7817d000097ab","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"9b4e1b98_5eb77e72","updated":"2024-03-05 00:26:39.000000000","message":"Looks good to me.\n\nThanks","commit_id":"d633541ecc5cafbf5660e0bf57ecbd96bfb77da0"}],"git_review/cmd.py":[{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"4bf6a89db6105f45a8a6d7de5e8ca196c47b7c85","unresolved":false,"context_lines":[{"line_number":585,"context_line":"    # Short-circuit to an empty URL if the remote is falsey, used for"},{"line_number":586,"context_line":"    # determining commit-msg hook retrieval behavior"},{"line_number":587,"context_line":"    if not remote:"},{"line_number":588,"context_line":"        return \"\""},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    push_url \u003d git_config_get_value(\u0027remote.%s\u0027 % remote, \u0027pushurl\u0027)"},{"line_number":591,"context_line":"    if push_url is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"27b62682_f8e1164b","line":588,"updated":"2024-02-27 21:26:33.000000000","message":"I had that originally, but was also adding a default value in the calling function. None sentinels get called out these days for making type annotation harder, so I figured keeping the same data type would be more palatable in case someone decides to try annotating this later. Happy to take it either direction (though I\u0027d probably pass in None and then just `return remote` here instead of explicitly returning None).","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"e91249991967c46960a8954b82d477cf99a6d5a4","unresolved":true,"context_lines":[{"line_number":585,"context_line":"    # Short-circuit to an empty URL if the remote is falsey, used for"},{"line_number":586,"context_line":"    # determining commit-msg hook retrieval behavior"},{"line_number":587,"context_line":"    if not remote:"},{"line_number":588,"context_line":"        return \"\""},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    push_url \u003d git_config_get_value(\u0027remote.%s\u0027 % remote, \u0027pushurl\u0027)"},{"line_number":591,"context_line":"    if push_url is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a9d7a7b_e609df11","line":588,"range":{"start_line":588,"start_character":15,"end_line":588,"end_character":17},"updated":"2024-02-27 21:10:15.000000000","message":"Would it be better to return None here instead of \"\" because None is more explicitly a broken url if we were to interpolate things later? Basically be defensive because \"\" might actually be parsed as a url somehow?","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"4cd0b6fc1b99df5a085e474f5b81c86f21bb390f","unresolved":false,"context_lines":[{"line_number":585,"context_line":"    # Short-circuit to an empty URL if the remote is falsey, used for"},{"line_number":586,"context_line":"    # determining commit-msg hook retrieval behavior"},{"line_number":587,"context_line":"    if not remote:"},{"line_number":588,"context_line":"        return \"\""},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    push_url \u003d git_config_get_value(\u0027remote.%s\u0027 % remote, \u0027pushurl\u0027)"},{"line_number":591,"context_line":"    if push_url is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"b6139b09_ff1a7bd9","line":588,"range":{"start_line":588,"start_character":15,"end_line":588,"end_character":17},"in_reply_to":"1a9d7a7b_e609df11","updated":"2024-02-28 21:47:42.000000000","message":"Done","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"4cd0b6fc1b99df5a085e474f5b81c86f21bb390f","unresolved":false,"context_lines":[{"line_number":585,"context_line":"    # Short-circuit to an empty URL if the remote is falsey, used for"},{"line_number":586,"context_line":"    # determining commit-msg hook retrieval behavior"},{"line_number":587,"context_line":"    if not remote:"},{"line_number":588,"context_line":"        return \"\""},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    push_url \u003d git_config_get_value(\u0027remote.%s\u0027 % remote, \u0027pushurl\u0027)"},{"line_number":591,"context_line":"    if push_url is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3d457e11_2b99ea7f","line":588,"in_reply_to":"27b62682_f8e1164b","updated":"2024-02-28 21:47:42.000000000","message":"I feel like that is a bug in type annotations then :) even haskell has a Nothing and Maybe type.","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"43170e15e208cd669afe17a6e7894ff667d86aa0","unresolved":false,"context_lines":[{"line_number":585,"context_line":"    # Short-circuit to an empty URL if the remote is falsey, used for"},{"line_number":586,"context_line":"    # determining commit-msg hook retrieval behavior"},{"line_number":587,"context_line":"    if not remote:"},{"line_number":588,"context_line":"        return \"\""},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    push_url \u003d git_config_get_value(\u0027remote.%s\u0027 % remote, \u0027pushurl\u0027)"},{"line_number":591,"context_line":"    if push_url is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"0bdf8bd4_cb878b36","line":588,"in_reply_to":"27b62682_f8e1164b","updated":"2024-02-28 22:22:17.000000000","message":"Python type annotations have `Optional`, so please definitely use None as it was intended to be used.  Explicitly returning None here would make the signature of this method Optional[str] which is expressive, easy, correct, and less likely to introduce bugs.\n\nBy returning the argument, we\u0027ve made the argument type Optional[str] by inference from the calling sites and therefore the return type as well, so it\u0027s all the same.\n\nFrankly, I would hope a type-annotation enthusiast would prefer this rather than the suggestion that this will always return a string and then just be surprised that it\u0027s the empty string.","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"e91249991967c46960a8954b82d477cf99a6d5a4","unresolved":true,"context_lines":[{"line_number":1816,"context_line":"        if options.remote_hook:"},{"line_number":1817,"context_line":"            set_hooks_commit_msg(remote, hook_file)"},{"line_number":1818,"context_line":"        else:"},{"line_number":1819,"context_line":"            set_hooks_commit_msg(\"\", hook_file)"},{"line_number":1820,"context_line":""},{"line_number":1821,"context_line":"    if options.setup:"},{"line_number":1822,"context_line":"        if options.finish and not options.dry:"}],"source_content_type":"text/x-python","patch_set":2,"id":"45b55abf_63291fb9","line":1819,"range":{"start_line":1819,"start_character":33,"end_line":1819,"end_character":35},"updated":"2024-02-27 21:10:15.000000000","message":"See above about using None for explicit invalid values.","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"4bf6a89db6105f45a8a6d7de5e8ca196c47b7c85","unresolved":false,"context_lines":[{"line_number":1816,"context_line":"        if options.remote_hook:"},{"line_number":1817,"context_line":"            set_hooks_commit_msg(remote, hook_file)"},{"line_number":1818,"context_line":"        else:"},{"line_number":1819,"context_line":"            set_hooks_commit_msg(\"\", hook_file)"},{"line_number":1820,"context_line":""},{"line_number":1821,"context_line":"    if options.setup:"},{"line_number":1822,"context_line":"        if options.finish and not options.dry:"}],"source_content_type":"text/x-python","patch_set":2,"id":"488d3e16_96604a02","line":1819,"updated":"2024-02-27 21:26:33.000000000","message":"Yeah, I first used a remote\u003dNone default in the set_hooks_commit_msg def, but existing parameter order made the mix with positional arguments less ergonomic.","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"4cd0b6fc1b99df5a085e474f5b81c86f21bb390f","unresolved":false,"context_lines":[{"line_number":1816,"context_line":"        if options.remote_hook:"},{"line_number":1817,"context_line":"            set_hooks_commit_msg(remote, hook_file)"},{"line_number":1818,"context_line":"        else:"},{"line_number":1819,"context_line":"            set_hooks_commit_msg(\"\", hook_file)"},{"line_number":1820,"context_line":""},{"line_number":1821,"context_line":"    if options.setup:"},{"line_number":1822,"context_line":"        if options.finish and not options.dry:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3d426f3d_fc69484d","line":1819,"range":{"start_line":1819,"start_character":33,"end_line":1819,"end_character":35},"in_reply_to":"45b55abf_63291fb9","updated":"2024-02-28 21:47:42.000000000","message":"Done","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"}],"git_review/hooks.py":[{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"4bf6a89db6105f45a8a6d7de5e8ca196c47b7c85","unresolved":false,"context_lines":[{"line_number":21,"context_line":"# /resources/com/google/gerrit/server/tools/root/hooks/commit-msg as of"},{"line_number":22,"context_line":"# commit 05d6470 on 2024-02-21."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"COMMIT_MSG \u003d r\"\"\"#!/bin/sh"},{"line_number":25,"context_line":"#"},{"line_number":26,"context_line":"# Part of Gerrit Code Review (https://www.gerritcodereview.com/)"},{"line_number":27,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":2,"id":"92d237eb_ad90b1f5","line":24,"updated":"2024-02-27 21:26:33.000000000","message":"Correct, we could in theory ship a data file in the wheel, I think, but it would have to get installed into the Python module tree and then we\u0027d have to use functions to look up the path to it on the system in order to copy it into place at runtime, which seemed far more round-about than just embedding it into a string in a separate module file. This also gives us the opportunity to add some tracking commentary about where the file came from, vs if we were trying to keep the exact file copied verbatim from the source repo with no alterations in order to preserve its checksum or something.","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"e91249991967c46960a8954b82d477cf99a6d5a4","unresolved":true,"context_lines":[{"line_number":21,"context_line":"# /resources/com/google/gerrit/server/tools/root/hooks/commit-msg as of"},{"line_number":22,"context_line":"# commit 05d6470 on 2024-02-21."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"COMMIT_MSG \u003d r\"\"\"#!/bin/sh"},{"line_number":25,"context_line":"#"},{"line_number":26,"context_line":"# Part of Gerrit Code Review (https://www.gerritcodereview.com/)"},{"line_number":27,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":2,"id":"b55b30a3_4564087f","line":24,"updated":"2024-02-27 21:10:15.000000000","message":"I guess the python equivalent of a heredoc is easier than managing a data file in packaging?\n\nThis version of the script includes two changes that are not in the version served by OpenDev\u0027s version of gerrit:\n\nhttps://gerrit.googlesource.com/gerrit/+/d5403dbf335ba7d48977fc95170c3f7027c34659%5E%21/\nhttps://gerrit.googlesource.com/gerrit/+/1745c2f1c5d4f434ff12f31ec10e76cf54144f69%5E%21/\n\nIn both cases these seem like good improvements. Another reason for vendoring is that we can bump the script version easily without redeploying or upgrading gerrit.","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"4cd0b6fc1b99df5a085e474f5b81c86f21bb390f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"# /resources/com/google/gerrit/server/tools/root/hooks/commit-msg as of"},{"line_number":22,"context_line":"# commit 05d6470 on 2024-02-21."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"COMMIT_MSG \u003d r\"\"\"#!/bin/sh"},{"line_number":25,"context_line":"#"},{"line_number":26,"context_line":"# Part of Gerrit Code Review (https://www.gerritcodereview.com/)"},{"line_number":27,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":2,"id":"c2d85f3a_c844de60","line":24,"in_reply_to":"b55b30a3_4564087f","updated":"2024-02-28 21:47:42.000000000","message":"Done","commit_id":"703869bc4b7d0c10ea94b668f088d3027c322226"}]}
