)]}'
{"openapproved.py":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"90b112131a4e39ef910e819cb320d5d906a2c486","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    optparser.add_option(\u0027-u\u0027, \u0027--user\u0027, default\u003dgetpass.getuser(),"},{"line_number":44,"context_line":"                         help\u003d\u0027gerrit user\u0027)"},{"line_number":45,"context_line":"    optparser.add_option(\u0027-k\u0027, \u0027--key\u0027, default\u003dNone,"},{"line_number":46,"context_line":"                         help\u003d\u0027ssh key for gerrit\u0027)"},{"line_number":47,"context_line":"    optparser.add_option(\u0027-s\u0027, \u0027--stable\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":48,"context_line":"                         help\u003d\u0027Include stable branch commits\u0027)"},{"line_number":49,"context_line":"    optparser.add_option("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAS3%2F%2FIXY%3D","line":46,"updated":"2013-10-03 19:38:47.000000000","message":"Looks like you\u0027re reverting some changes made in https://review.openstack.org/#/c/49520/1/openapproved.py","commit_id":"bbfefeb1d684371bcfa0ab78623ef7135f5a1bd5"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"edd4ac040c034b3933c4f425c585cb45ea887658","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    approvals \u003d patch_set.get(\u0027approvals\u0027, [])"},{"line_number":106,"context_line":"    for review in approvals:"},{"line_number":107,"context_line":"        if review[\u0027type\u0027] \u003d\u003d \u0027APRV\u0027 \\"},{"line_number":108,"context_line":"                or review[\u0027type\u0027] \u003d\u003d \u0027Code-Review\u0027 and review[\u0027value\u0027] \u003d\u003d \u00272\u0027:"},{"line_number":109,"context_line":"            return True"},{"line_number":110,"context_line":"    return False"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FGCs%3D","line":108,"updated":"2013-10-04 14:28:27.000000000","message":"It appears that Approved is just optional in newer versions of gerrit.  So, really, we should be doing something like ...\n\n    if review[\u0027type\u0027] in (\u0027APRV\u0027, \u0027Approved\u0027):\n\nI\u0027m not sure if there is a way to discover if the remote gerrit server has Approved enabled or not.  If so, you could fall back to the other type of check.  But it looks like the script would break for OpenStack after the OpenStack gerrit is upgraded.","commit_id":"f56d95db38e925a0db2d5eb68039af2097553e85"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"b520e3542709d6edf0e1431342e4ae54e2d38e2c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    approvals \u003d patch_set.get(\u0027approvals\u0027, [])"},{"line_number":106,"context_line":"    for review in approvals:"},{"line_number":107,"context_line":"        if review[\u0027type\u0027] \u003d\u003d \u0027APRV\u0027 \\"},{"line_number":108,"context_line":"                or review[\u0027type\u0027] \u003d\u003d \u0027Code-Review\u0027 and review[\u0027value\u0027] \u003d\u003d \u00272\u0027:"},{"line_number":109,"context_line":"            return True"},{"line_number":110,"context_line":"    return False"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2F9cE%3D","line":108,"in_reply_to":"AAAAS3%2F%2FD8M%3D","updated":"2013-10-07 13:36:01.000000000","message":"Right, I looked at the ovirt gerrit and saw that.  I was looking at the gerrit docs to see where Approved went, and it looks like it\u0027s just optional now.  The columns are more configurable and not hard coded, I think.\n\nSo, to be more generic and to work how we expect the OpenStack gerrit to work when it upgrades to this version, \"Approved\" is needed here.\n\nI\u0027m not sure what to do for the check you need, because that will break against OpenStack once we upgrade.  The only thing I can think of is to only do the check you want if you can\u0027t find reference to \u0027Approved\u0027 anywhere in any patch set on any review ...\n\nThe trick is to make this work for both setups.","commit_id":"f56d95db38e925a0db2d5eb68039af2097553e85"},{"author":{"_account_id":8212,"name":"David Caro","email":"me@dcaro.es","username":"dcaroest"},"change_message_id":"3017ac9be48e611106e918799ad548847997881a","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    approvals \u003d patch_set.get(\u0027approvals\u0027, [])"},{"line_number":106,"context_line":"    for review in approvals:"},{"line_number":107,"context_line":"        if review[\u0027type\u0027] \u003d\u003d \u0027APRV\u0027 \\"},{"line_number":108,"context_line":"                or review[\u0027type\u0027] \u003d\u003d \u0027Code-Review\u0027 and review[\u0027value\u0027] \u003d\u003d \u00272\u0027:"},{"line_number":109,"context_line":"            return True"},{"line_number":110,"context_line":"    return False"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FD8M%3D","line":108,"in_reply_to":"AAAAS3%2F%2FGCs%3D","updated":"2013-10-05 07:35:38.000000000","message":"Mmm, for ovirt at least the approved flag is actually Code-Review with +2, that by default it reads (+2 Looks good to me, approved).\n\nSo for us is actually needed that check. I can add the \u0027Approved\u0027 state too if you want though, we do not use it.","commit_id":"f56d95db38e925a0db2d5eb68039af2097553e85"}]}
