)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"c5f5b8529379572396d0869963b2cfc81aecd99f","unresolved":false,"context_lines":[{"line_number":12,"context_line":"need docs reviewers, which projects have healthy docs."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"- Help wanted: Not sure how to test. I know the gerrit query cmd works."},{"line_number":15,"context_line":"- Ideally would also report the amount of time it takes to merge docs"},{"line_number":16,"context_line":"  or api-ref changes."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ifce720a3c796d4f0a7d3dc6383f9dfb4384f7220"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f044301_f7bfe2f8","line":15,"updated":"2017-05-05 15:17:37.000000000","message":"For this part I think you\u0027d want to be able to filter the regular reviewstats output to only include docs changes.  Since you\u0027re adding the filters to the utils function anyway, it should just be a question of wiring that into the openreviews command so it sets the appropriate parameters when getting changes.\n\nActually, come to think of it the existing reviewstats commands probably include the numbers you care about.  You\u0027d just need to add the ability to filter out only docs changes.  Check the example output in http://russellbryant.net/openstack-stats/nova-reviewers-30.txt and http://russellbryant.net/openstack-stats/nova-openreviews.html  Note that the bottom of the reviewers page includes some more overall stats.  Would those stats, but only looking at patches with doc changes, address your needs?  That would be much simpler than writing a whole new command.\n\nThe one thing that might be missing is historical data on how long it took to merge previous patches.  Reviewstats today only reports on open reviews.","commit_id":"b6725972dfc8acbd755cd893d97903a5dee45ccd"}],"genresults-alldocreviews.sh":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"c5f5b8529379572396d0869963b2cfc81aecd99f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"all\u003d0"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"if [ \"$projects\" \u003d \"\" ] ; then"},{"line_number":7,"context_line":"\tprojects\u003dprojects/*.json"},{"line_number":8,"context_line":"\tall\u003d1"},{"line_number":9,"context_line":"fi"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-sh","patch_set":7,"id":"3f044301_f476c006","line":7,"updated":"2017-05-05 15:17:37.000000000","message":"Nit: tabs","commit_id":"b6725972dfc8acbd755cd893d97903a5dee45ccd"}],"reviewstats/cmd/docstats.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4b18fcc2957469a82eda78192541de4edfce94b5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    optparser.add_option(\u0027-r\u0027, \u0027--api-ref\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":52,"context_line":"                         help\u003d\u0027Only generate stats for /api-ref/source\u0027)"},{"line_number":53,"context_line":"    optparser.add_option(\u0027-d\u0027, \u0027--docs\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":54,"context_line":"                         help\u003d\u0027Only generate stats for /doc/source\u0027)"},{"line_number":55,"context_line":"    options, args \u003d optparser.parse_args()"},{"line_number":56,"context_line":"    projects \u003d utils.get_projects_info(options.project, options.all)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f044301_83a50007","line":54,"updated":"2017-05-05 17:42:27.000000000","message":"Would it be worth looking at install-guide as well? But maybe that\u0027d be better as a follow-up...","commit_id":"b6725972dfc8acbd755cd893d97903a5dee45ccd"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"c5f5b8529379572396d0869963b2cfc81aecd99f","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            for patch_set in docchange[\u0027patchSets\u0027][:-1]:"},{"line_number":82,"context_line":"                if (utils.patch_set_approved(patch_set)"},{"line_number":83,"context_line":"                        and not utils.patch_set_approved(docchange[\u0027patchSets\u0027][-1])):"},{"line_number":84,"context_line":"                    if has_negative_feedback(docchange[\u0027patchSets\u0027][-1]):"},{"line_number":85,"context_line":"                        continue"},{"line_number":86,"context_line":"                    docs_changes.add(\"%s %s\" % (docchange[\u0027url\u0027],"},{"line_number":87,"context_line":"                                                docchange[\u0027subject\u0027]))"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f044301_577336b2","line":84,"range":{"start_line":84,"start_character":23,"end_line":84,"end_character":44},"updated":"2017-05-05 15:17:37.000000000","message":"Not sure you\u0027re going to want this check for counting changes.","commit_id":"b6725972dfc8acbd755cd893d97903a5dee45ccd"}],"reviewstats/utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4b18fcc2957469a82eda78192541de4edfce94b5","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"def get_changes(projects, ssh_user, ssh_key, only_open\u003dFalse, stable\u003d\u0027\u0027,"},{"line_number":104,"context_line":"                only_doc\u003dFalse, api_doc\u003dFalse, server\u003d\u0027review.openstack.org\u0027):"},{"line_number":105,"context_line":"    \"\"\"Get the changesets data list."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    :param projects: List of gerrit project names."}],"source_content_type":"text/x-python","patch_set":7,"id":"3f044301_e345e444","line":104,"updated":"2017-05-05 17:42:27.000000000","message":"I wonder if it would be better to accept an arbitrary cmd_extra string.\n\nOn the one hand, it would put the knowledge of which paths are doc paths in docstats.py, which seems appropriate.\n\nOn the other, this seems like the only place that currently knows anything about how qerrit queries are constructed.\n\nMaybe something like this as a compromise?\n\n def get_changes(..., limit_to_path\u003dNone, ...):\n     ...\n     if limit_to_path:\n         cmd +\u003d \u0027 file:^.*%s.*\u0027 % re.escape(limit_to_path)\n     ...","commit_id":"b6725972dfc8acbd755cd893d97903a5dee45ccd"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4b18fcc2957469a82eda78192541de4edfce94b5","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            if api_doc:"},{"line_number":199,"context_line":"                # Get the patchsets for api-ref documentation"},{"line_number":200,"context_line":"                cmd +\u003d \u0027 file:^.*api-ref/source/.*\u0027"},{"line_number":201,"context_line":"            else:"},{"line_number":202,"context_line":"                # Get a small set the first time so we can get to checking"},{"line_number":203,"context_line":"                # againt the cache sooner"},{"line_number":204,"context_line":"                cmd +\u003d \u0027 limit:5\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f044301_883bdfe9","line":201,"updated":"2017-05-05 17:42:27.000000000","message":"I\u0027m fairly certain we still want this `else` to be tied to\n\n if new_count:\n\nlike before.","commit_id":"b6725972dfc8acbd755cd893d97903a5dee45ccd"},{"author":{"_account_id":964,"name":"Anne Gentle","email":"annegentle@justwriteclick.com","username":"annegentle"},"change_message_id":"5e9d0f26010852ffd397dc68a71f7edc8cb2fe44","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            if api_doc:"},{"line_number":199,"context_line":"                # Get the patchsets for api-ref documentation"},{"line_number":200,"context_line":"                cmd +\u003d \u0027 file:^.*api-ref/source/.*\u0027"},{"line_number":201,"context_line":"            else:"},{"line_number":202,"context_line":"                # Get a small set the first time so we can get to checking"},{"line_number":203,"context_line":"                # againt the cache sooner"},{"line_number":204,"context_line":"                cmd +\u003d \u0027 limit:5\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f044301_b841223c","line":201,"in_reply_to":"3f044301_883bdfe9","updated":"2017-05-08 19:58:47.000000000","message":"Ah, okay! GIving this a try.","commit_id":"b6725972dfc8acbd755cd893d97903a5dee45ccd"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4276c3a97955fb1f9950f7827f9f0958edbb0253","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                    # Patchsets for API reference docs are in api-ref/source"},{"line_number":199,"context_line":"                    cmd +\u003d \u0027 file:^.*%s.*\u0027 % re.escape(limit_to_path)"},{"line_number":200,"context_line":"                else:"},{"line_number":201,"context_line":"                    continue"},{"line_number":202,"context_line":"            else:"},{"line_number":203,"context_line":"                # Get a small set the first time so we can get to checking"},{"line_number":204,"context_line":"                # againt the cache sooner"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_6160b3cf","line":201,"updated":"2017-05-18 20:01:08.000000000","message":"This is going to skip back to the top of the loop without running the command. Is that what you want?","commit_id":"926eb0118ebfbc6f8439c0de543e7101b1e82a3b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7eeedbd7e0ef3ec465405c5b5c208bfc683eebba","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                    # Patchsets for API reference docs are in api-ref/source"},{"line_number":199,"context_line":"                    cmd +\u003d \u0027 file:^.*%s.*\u0027 % re.escape(limit_to_path)"},{"line_number":200,"context_line":"                else:"},{"line_number":201,"context_line":"                    continue"},{"line_number":202,"context_line":"            else:"},{"line_number":203,"context_line":"                # Get a small set the first time so we can get to checking"},{"line_number":204,"context_line":"                # againt the cache sooner"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_5143c113","line":201,"in_reply_to":"ff0f0b1f_53d1f0cc","updated":"2017-05-23 18:56:35.000000000","message":"I think we want to just hoist this out of the `if new_count:` block and drop the `else` clause, like\n\n if stable:\n     cmd +\u003d \u0027 branch:stable/%s\u0027 % stable\n if limit_to_path:\n     cmd +\u003d \u0027 file:^.*%s.*\u0027 % re.escape(limit_to_path)\n if new_count:\n     cmd +\u003d \u0027 --start %d\u0027 % new_count\n else:\n     cmd +\u003d \u0027 limit:5\u0027\n\n(Maybe with some additional whitespace to make it more clear that those aren\u0027t `elif`s.)","commit_id":"926eb0118ebfbc6f8439c0de543e7101b1e82a3b"},{"author":{"_account_id":964,"name":"Anne Gentle","email":"annegentle@justwriteclick.com","username":"annegentle"},"change_message_id":"e82dd588a7754de77e7daebdeb0b406d6e874f38","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                    # Patchsets for API reference docs are in api-ref/source"},{"line_number":199,"context_line":"                    cmd +\u003d \u0027 file:^.*%s.*\u0027 % re.escape(limit_to_path)"},{"line_number":200,"context_line":"                else:"},{"line_number":201,"context_line":"                    continue"},{"line_number":202,"context_line":"            else:"},{"line_number":203,"context_line":"                # Get a small set the first time so we can get to checking"},{"line_number":204,"context_line":"                # againt the cache sooner"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_53d1f0cc","line":201,"in_reply_to":"ff0f0b1f_6160b3cf","updated":"2017-05-23 15:21:43.000000000","message":"Let\u0027s see, if there\u0027s a new count and I want to limit to only api-ref directory, I want it to run the command with the limit_to_path included, with the --start \u003cnew_count\u003e param.\n\nSo... I also need to change what the cmd becomes. Thanks Doug. What do I do in the else: statement then? Do I not need an else here?","commit_id":"926eb0118ebfbc6f8439c0de543e7101b1e82a3b"},{"author":{"_account_id":6547,"name":"Andreas Jaeger","email":"jaegerandi@gmail.com","username":"jaegerandi"},"change_message_id":"5f63507b233c3043569e2c6f82987fcb8879068e","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                # Patchsets for install guides are in a path containing"},{"line_number":198,"context_line":"                # install-guide/source"},{"line_number":199,"context_line":"                cmd +\u003d \u0027 file:^.*%s.*\u0027 % re.escape(limit_to_path)"},{"line_number":200,"context_line":"                print cmd"},{"line_number":201,"context_line":"            if new_count:"},{"line_number":202,"context_line":"                cmd +\u003d \u0027 --start %d\u0027 % new_count"},{"line_number":203,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3f1d235d_361af77c","line":200,"range":{"start_line":200,"start_character":16,"end_line":200,"end_character":21},"updated":"2017-06-30 18:21:40.000000000","message":"print(cmd) to make py35 gate happy","commit_id":"e5c9076bef5bd15655ab8cee190950ece84ee8a7"}]}
