)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"58e76dde59ed959adfa4222b7fb20c865b0a35af","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow decryption of directories"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows users to specify multiple directories and/or files to"},{"line_number":10,"context_line":"be decrypted. The default output is changed to overwrite the encrypted"},{"line_number":11,"context_line":"file with it\u0027s decryption."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Allows directory decryption."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"dfbec78f_f102136f","line":11,"range":{"start_line":10,"start_character":14,"end_line":11,"end_character":26},"updated":"2019-05-11 13:38:36.000000000","message":"default output is stdout","commit_id":"089d21c76d0177f17fad2387eb86a39e84044c7f"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"3a7809918e66be9e7f505f325947a257c73ee49a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow decryption of directories"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows users to specify multiple directories and/or files to"},{"line_number":10,"context_line":"be decrypted. The default output is changed to overwrite the encrypted"},{"line_number":11,"context_line":"file with it\u0027s decryption."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Allows directory decryption."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"dfbec78f_4c190220","line":11,"range":{"start_line":10,"start_character":14,"end_line":11,"end_character":26},"in_reply_to":"dfbec78f_f102136f","updated":"2019-05-11 16:35:47.000000000","message":"Done","commit_id":"089d21c76d0177f17fad2387eb86a39e84044c7f"}],"doc/source/cli/cli.rst":[{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"470725dde76525c7fc55d39b81849365447fbe84","unresolved":false,"context_lines":[{"line_number":674,"context_line":"Decrypt"},{"line_number":675,"context_line":"^^^^^^^"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"Unwrap an encrypted secrets document from a `Pegleg Managed Documents`_,"},{"line_number":678,"context_line":"decrypt the encrypted secrets, and dump the cleartext to stdout or a"},{"line_number":679,"context_line":"specified location."},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"**site_name** (Required)."},{"line_number":682,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"dfbec78f_2b514a63","line":679,"range":{"start_line":677,"start_character":0,"end_line":679,"end_character":19},"updated":"2019-05-08 18:49:43.000000000","message":"this could be one or more secrets depending on filepath or directory path specified in --path option","commit_id":"79b9ed86d233298c95901a95b7d7ab18ed13c12f"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"d9b2a593d55af70eeb913397281b0ce21cdc9df1","unresolved":false,"context_lines":[{"line_number":674,"context_line":"Decrypt"},{"line_number":675,"context_line":"^^^^^^^"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"Unwrap an encrypted secrets document from a `Pegleg Managed Documents`_,"},{"line_number":678,"context_line":"decrypt the encrypted secrets, and dump the cleartext to stdout or a"},{"line_number":679,"context_line":"specified location."},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"**site_name** (Required)."},{"line_number":682,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"dfbec78f_1e65a6e1","line":679,"range":{"start_line":677,"start_character":0,"end_line":679,"end_character":19},"in_reply_to":"dfbec78f_2b514a63","updated":"2019-05-08 18:56:59.000000000","message":"Done","commit_id":"79b9ed86d233298c95901a95b7d7ab18ed13c12f"},{"author":{"_account_id":28235,"name":"Aaron Sheffield","email":"ajs@sheffieldfamily.net","username":"aaronsheffield"},"change_message_id":"f243547a175445c9b159bbac4664b11fbf1086ad","unresolved":false,"context_lines":[{"line_number":692,"context_line":"**-s / --save-location** (Optional)."},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"The desired output path for the decrypted file. If not specified, decrypted"},{"line_number":695,"context_line":"data will be printed to stdout."},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"**-o / --overwrite** (Optional). False by default."},{"line_number":698,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"dfbec78f_4bd11ecd","line":695,"range":{"start_line":695,"start_character":10,"end_line":695,"end_character":20},"updated":"2019-05-08 18:41:11.000000000","message":"nit: Maybe \u0027output\u0027 instead of be printed.","commit_id":"79b9ed86d233298c95901a95b7d7ab18ed13c12f"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"d9b2a593d55af70eeb913397281b0ce21cdc9df1","unresolved":false,"context_lines":[{"line_number":692,"context_line":"**-s / --save-location** (Optional)."},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"The desired output path for the decrypted file. If not specified, decrypted"},{"line_number":695,"context_line":"data will be printed to stdout."},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"**-o / --overwrite** (Optional). False by default."},{"line_number":698,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"dfbec78f_be633adc","line":695,"range":{"start_line":695,"start_character":10,"end_line":695,"end_character":20},"in_reply_to":"dfbec78f_4bd11ecd","updated":"2019-05-08 18:56:59.000000000","message":"Done","commit_id":"79b9ed86d233298c95901a95b7d7ab18ed13c12f"}],"pegleg/cli.py":[{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"eb11c20695d7ca302f0dc082328e82a9d493bae7","unresolved":false,"context_lines":[{"line_number":678,"context_line":"    \u0027decrypt\u0027,"},{"line_number":679,"context_line":"    help\u003d\u0027Command to unwrap and decrypt one site \u0027"},{"line_number":680,"context_line":"         \u0027secrets document and print it to stdout.\u0027)"},{"line_number":681,"context_line":"@click.option("},{"line_number":682,"context_line":"    \u0027-f\u0027,"},{"line_number":683,"context_line":"    \u0027--filename\u0027,"},{"line_number":684,"context_line":"    \u0027file_name\u0027,"},{"line_number":685,"context_line":"    type\u003dclick.Path(exists\u003dTrue, dir_okay\u003dFalse),"},{"line_number":686,"context_line":"    help\u003d\u0027The file(s) to decrypt\u0027)"},{"line_number":687,"context_line":"@click.option("},{"line_number":688,"context_line":"    \u0027-d\u0027,"},{"line_number":689,"context_line":"    \u0027--directory\u0027,"},{"line_number":690,"context_line":"    \u0027directory\u0027,"},{"line_number":691,"context_line":"    type\u003dclick.Path(exists\u003dTrue, file_okay\u003dFalse),"},{"line_number":692,"context_line":"    help\u003d\u0027The directory or directories to decrypt\u0027)"},{"line_number":693,"context_line":"@click.option("},{"line_number":694,"context_line":"    \u0027-s\u0027,"},{"line_number":695,"context_line":"    \u0027--save-location\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfbec78f_51356c45","line":692,"range":{"start_line":681,"start_character":0,"end_line":692,"end_character":51},"updated":"2019-05-07 13:24:09.000000000","message":"since we\u0027re checking if this is a file or a directory below we can combine into a single variable, \u0027path\u0027 that accepts either a file or directory.  this should also be required rather than a simple option to prevent None objects getting passed","commit_id":"5265ed99f2e898a5f21a263622b475ba1f530a78"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"eb11c20695d7ca302f0dc082328e82a9d493bae7","unresolved":false,"context_lines":[{"line_number":690,"context_line":"    \u0027directory\u0027,"},{"line_number":691,"context_line":"    type\u003dclick.Path(exists\u003dTrue, file_okay\u003dFalse),"},{"line_number":692,"context_line":"    help\u003d\u0027The directory or directories to decrypt\u0027)"},{"line_number":693,"context_line":"@click.option("},{"line_number":694,"context_line":"    \u0027-s\u0027,"},{"line_number":695,"context_line":"    \u0027--save-location\u0027,"},{"line_number":696,"context_line":"    \u0027save_location\u0027,"},{"line_number":697,"context_line":"    default\u003dNone,"},{"line_number":698,"context_line":"    help\u003d\u0027The destination where the decrypted file(s) should be saved. \u0027"},{"line_number":699,"context_line":"         \u0027If not specified and -u is not set, it will overwrite encrypted \u0027"},{"line_number":700,"context_line":"         \u0027files with decrypted version.\u0027)"},{"line_number":701,"context_line":"@click.option("},{"line_number":702,"context_line":"    \u0027--use-stdout\u0027,"},{"line_number":703,"context_line":"    \u0027use_stdout\u0027,"},{"line_number":704,"context_line":"    is_flag\u003dTrue,"},{"line_number":705,"context_line":"    default\u003dFalse,"},{"line_number":706,"context_line":"    help\u003d\u0027Prints decrypted files to stdout when set\u0027)"},{"line_number":707,"context_line":"@click.argument(\u0027site_name\u0027)"},{"line_number":708,"context_line":"def decrypt(*, file_name, directory, save_location, use_stdout, site_name):"},{"line_number":709,"context_line":"    engine.repository.process_repositories(site_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfbec78f_51d1eccc","line":706,"range":{"start_line":693,"start_character":0,"end_line":706,"end_character":53},"updated":"2019-05-07 13:24:09.000000000","message":"I dislike overwriting encrypted files by default, perhaps keep stdout as default and if a valid directory (save_location) is specified save there instead.  Alternatively condense these options into a required save_location, then handle the location based on input (stdout vs a directory)","commit_id":"5265ed99f2e898a5f21a263622b475ba1f530a78"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"eb11c20695d7ca302f0dc082328e82a9d493bae7","unresolved":false,"context_lines":[{"line_number":708,"context_line":"def decrypt(*, file_name, directory, save_location, use_stdout, site_name):"},{"line_number":709,"context_line":"    engine.repository.process_repositories(site_name)"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    file_list \u003d []"},{"line_number":712,"context_line":"    if directory:"},{"line_number":713,"context_line":"        for dirpath, dirs, _files in os.walk(directory):"},{"line_number":714,"context_line":"            file_list +\u003d [os.path.join(dirpath, file) for file in _files]"},{"line_number":715,"context_line":"    elif file_name:"},{"line_number":716,"context_line":"        file_list \u003d [file_name]"},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"    for file in file_list:"},{"line_number":719,"context_line":"        decrypted \u003d engine.secrets.decrypt(file)"},{"line_number":720,"context_line":"        if use_stdout:"},{"line_number":721,"context_line":"            click.echo(decrypted)"},{"line_number":722,"context_line":"        elif save_location is not None:"},{"line_number":723,"context_line":"            if directory:"},{"line_number":724,"context_line":"                name \u003d os.path.split(file)[1]"},{"line_number":725,"context_line":"                save_location_file \u003d os.path.join(save_location, name)"},{"line_number":726,"context_line":"                files.write(save_location_file, decrypted)"},{"line_number":727,"context_line":"            else:"},{"line_number":728,"context_line":"                files.write(save_location, decrypted)"},{"line_number":729,"context_line":"            os.chmod(save_location, 0o600)"},{"line_number":730,"context_line":"        else:"},{"line_number":731,"context_line":"            files.write(file, decrypted)"},{"line_number":732,"context_line":"            os.chmod(file, 0o600)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"@main.group(help\u003d\"Miscellaneous generate commands\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfbec78f_318478b1","line":732,"range":{"start_line":711,"start_character":0,"end_line":732,"end_character":33},"updated":"2019-05-07 13:24:09.000000000","message":"most of this can be handled in engine.secrets.decrypt, pass the path argument and save_location/std_out.  then check what the path is (if os.path.isfile(path_arg): file decrypt elif os.path.isdir(path_arg): list of files decrypt)","commit_id":"5265ed99f2e898a5f21a263622b475ba1f530a78"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"19d92fc624c398e01f01628553a1ca7c68be1c90","unresolved":false,"context_lines":[{"line_number":690,"context_line":"    \u0027save_location\u0027,"},{"line_number":691,"context_line":"    default\u003dNone,"},{"line_number":692,"context_line":"    help\u003d\u0027The destination where the decrypted file(s) should be saved. \u0027"},{"line_number":693,"context_line":"         \u0027If not specified and -u is not set, it will overwrite encrypted \u0027"},{"line_number":694,"context_line":"         \u0027files with decrypted version.\u0027)"},{"line_number":695,"context_line":"@click.option("},{"line_number":696,"context_line":"    \u0027-o\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfbec78f_080ed131","line":693,"range":{"start_line":693,"start_character":27,"end_line":693,"end_character":44},"updated":"2019-05-08 12:34:28.000000000","message":"doesn\u0027t appear to be used anywhere in decrypt","commit_id":"59aa296717a6781f1e9a94313f9d464c0586d7be"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"decbb54394a17a5d0615a3fa61dfb56bd4f3df0a","unresolved":false,"context_lines":[{"line_number":690,"context_line":"    \u0027save_location\u0027,"},{"line_number":691,"context_line":"    default\u003dNone,"},{"line_number":692,"context_line":"    help\u003d\u0027The destination where the decrypted file(s) should be saved. \u0027"},{"line_number":693,"context_line":"         \u0027If not specified and -u is not set, it will overwrite encrypted \u0027"},{"line_number":694,"context_line":"         \u0027files with decrypted version.\u0027)"},{"line_number":695,"context_line":"@click.option("},{"line_number":696,"context_line":"    \u0027-o\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfbec78f_598a5d1b","line":693,"range":{"start_line":693,"start_character":27,"end_line":693,"end_character":44},"in_reply_to":"dfbec78f_080ed131","updated":"2019-05-08 15:30:29.000000000","message":"Done","commit_id":"59aa296717a6781f1e9a94313f9d464c0586d7be"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"19d92fc624c398e01f01628553a1ca7c68be1c90","unresolved":false,"context_lines":[{"line_number":692,"context_line":"    help\u003d\u0027The destination where the decrypted file(s) should be saved. \u0027"},{"line_number":693,"context_line":"         \u0027If not specified and -u is not set, it will overwrite encrypted \u0027"},{"line_number":694,"context_line":"         \u0027files with decrypted version.\u0027)"},{"line_number":695,"context_line":"@click.option("},{"line_number":696,"context_line":"    \u0027-o\u0027,"},{"line_number":697,"context_line":"    \u0027--overwrite\u0027,"},{"line_number":698,"context_line":"    \u0027overwrite\u0027,"},{"line_number":699,"context_line":"    is_flag\u003dTrue,"},{"line_number":700,"context_line":"    default\u003dFalse,"},{"line_number":701,"context_line":"    help\u003d\u0027Overwrites file(s) at path with decrypted data when set.\u0027)"},{"line_number":702,"context_line":"@click.argument(\u0027site_name\u0027)"},{"line_number":703,"context_line":"def decrypt(*, path, save_location, overwrite, site_name):"},{"line_number":704,"context_line":"    engine.repository.process_repositories(site_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfbec78f_c830b9eb","line":701,"range":{"start_line":695,"start_character":0,"end_line":701,"end_character":68},"updated":"2019-05-08 12:34:28.000000000","message":"need to update documentation in cli.rst","commit_id":"59aa296717a6781f1e9a94313f9d464c0586d7be"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"decbb54394a17a5d0615a3fa61dfb56bd4f3df0a","unresolved":false,"context_lines":[{"line_number":692,"context_line":"    help\u003d\u0027The destination where the decrypted file(s) should be saved. \u0027"},{"line_number":693,"context_line":"         \u0027If not specified and -u is not set, it will overwrite encrypted \u0027"},{"line_number":694,"context_line":"         \u0027files with decrypted version.\u0027)"},{"line_number":695,"context_line":"@click.option("},{"line_number":696,"context_line":"    \u0027-o\u0027,"},{"line_number":697,"context_line":"    \u0027--overwrite\u0027,"},{"line_number":698,"context_line":"    \u0027overwrite\u0027,"},{"line_number":699,"context_line":"    is_flag\u003dTrue,"},{"line_number":700,"context_line":"    default\u003dFalse,"},{"line_number":701,"context_line":"    help\u003d\u0027Overwrites file(s) at path with decrypted data when set.\u0027)"},{"line_number":702,"context_line":"@click.argument(\u0027site_name\u0027)"},{"line_number":703,"context_line":"def decrypt(*, path, save_location, overwrite, site_name):"},{"line_number":704,"context_line":"    engine.repository.process_repositories(site_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfbec78f_798de12f","line":701,"range":{"start_line":695,"start_character":0,"end_line":701,"end_character":68},"in_reply_to":"dfbec78f_c830b9eb","updated":"2019-05-08 15:30:29.000000000","message":"Done","commit_id":"59aa296717a6781f1e9a94313f9d464c0586d7be"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"19d92fc624c398e01f01628553a1ca7c68be1c90","unresolved":false,"context_lines":[{"line_number":705,"context_line":""},{"line_number":706,"context_line":"    decrypted \u003d engine.secrets.decrypt(path)"},{"line_number":707,"context_line":"    if overwrite:"},{"line_number":708,"context_line":"        if os.path.isdir(path):"},{"line_number":709,"context_line":"            for key, value in decrypted.items():"},{"line_number":710,"context_line":"                files.write(key, value)"},{"line_number":711,"context_line":"                os.chmod(key, 0o600)"},{"line_number":712,"context_line":"        else:"},{"line_number":713,"context_line":"            files.write(path, decrypted)"},{"line_number":714,"context_line":"            os.chmod(path, 0o600)"},{"line_number":715,"context_line":"    elif save_location is None:"},{"line_number":716,"context_line":"        if os.path.isdir(path):"},{"line_number":717,"context_line":"            for value in decrypted.values():"},{"line_number":718,"context_line":"                click.echo(value)"},{"line_number":719,"context_line":"        else:"},{"line_number":720,"context_line":"            click.echo(decrypted)"},{"line_number":721,"context_line":"    else:"},{"line_number":722,"context_line":"        if os.path.isdir(path):"},{"line_number":723,"context_line":"            for key, value in decrypted.items():"},{"line_number":724,"context_line":"                file_name \u003d os.path.split(key)"},{"line_number":725,"context_line":"                file_save_location \u003d os.path.join(save_location, file_name)"},{"line_number":726,"context_line":"                files.write(file_save_location, value)"},{"line_number":727,"context_line":"                os.chmod(file_save_location, 0o600)"},{"line_number":728,"context_line":"        else:"},{"line_number":729,"context_line":"            files.write(save_location, decrypted)"},{"line_number":730,"context_line":"            os.chmod(save_location, 0o600)"},{"line_number":731,"context_line":""},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"@main.group(help\u003d\"Miscellaneous generate commands\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfbec78f_6828ad85","line":730,"range":{"start_line":708,"start_character":0,"end_line":730,"end_character":42},"updated":"2019-05-08 12:34:28.000000000","message":"we\u0027re doing a lot of checks to determine if path is file or dir, can we move this into secrets and standardize the return as a dict instead.  then when we get back to CLI (or unit tests) just loop over the dict and print/save the decrypted values","commit_id":"59aa296717a6781f1e9a94313f9d464c0586d7be"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"decbb54394a17a5d0615a3fa61dfb56bd4f3df0a","unresolved":false,"context_lines":[{"line_number":705,"context_line":""},{"line_number":706,"context_line":"    decrypted \u003d engine.secrets.decrypt(path)"},{"line_number":707,"context_line":"    if overwrite:"},{"line_number":708,"context_line":"        if os.path.isdir(path):"},{"line_number":709,"context_line":"            for key, value in decrypted.items():"},{"line_number":710,"context_line":"                files.write(key, value)"},{"line_number":711,"context_line":"                os.chmod(key, 0o600)"},{"line_number":712,"context_line":"        else:"},{"line_number":713,"context_line":"            files.write(path, decrypted)"},{"line_number":714,"context_line":"            os.chmod(path, 0o600)"},{"line_number":715,"context_line":"    elif save_location is None:"},{"line_number":716,"context_line":"        if os.path.isdir(path):"},{"line_number":717,"context_line":"            for value in decrypted.values():"},{"line_number":718,"context_line":"                click.echo(value)"},{"line_number":719,"context_line":"        else:"},{"line_number":720,"context_line":"            click.echo(decrypted)"},{"line_number":721,"context_line":"    else:"},{"line_number":722,"context_line":"        if os.path.isdir(path):"},{"line_number":723,"context_line":"            for key, value in decrypted.items():"},{"line_number":724,"context_line":"                file_name \u003d os.path.split(key)"},{"line_number":725,"context_line":"                file_save_location \u003d os.path.join(save_location, file_name)"},{"line_number":726,"context_line":"                files.write(file_save_location, value)"},{"line_number":727,"context_line":"                os.chmod(file_save_location, 0o600)"},{"line_number":728,"context_line":"        else:"},{"line_number":729,"context_line":"            files.write(save_location, decrypted)"},{"line_number":730,"context_line":"            os.chmod(save_location, 0o600)"},{"line_number":731,"context_line":""},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"@main.group(help\u003d\"Miscellaneous generate commands\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfbec78f_d97ded1c","line":730,"range":{"start_line":708,"start_character":0,"end_line":730,"end_character":42},"in_reply_to":"dfbec78f_6828ad85","updated":"2019-05-08 15:30:29.000000000","message":"Done. I took all these checks and instead just returned a dictionary from decrypt() regardless of input.","commit_id":"59aa296717a6781f1e9a94313f9d464c0586d7be"},{"author":{"_account_id":30106,"name":"Matt Carter","email":"matt.coach.carter@gmail.com","username":"MattCarter"},"change_message_id":"b9b1fccd83b5eaf124cfc91ef0271b32f82dd9dc","unresolved":false,"context_lines":[{"line_number":697,"context_line":"    \u0027overwrite\u0027,"},{"line_number":698,"context_line":"    is_flag\u003dTrue,"},{"line_number":699,"context_line":"    default\u003dFalse,"},{"line_number":700,"context_line":"    help\u003d\u0027Overwrites file(s) at path with decrypted data when set.\u0027)"},{"line_number":701,"context_line":"@click.argument(\u0027site_name\u0027)"},{"line_number":702,"context_line":"def decrypt(*, path, save_location, overwrite, site_name):"},{"line_number":703,"context_line":"    engine.repository.process_repositories(site_name)"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfbec78f_14702ca5","line":700,"range":{"start_line":700,"start_character":9,"end_line":700,"end_character":67},"updated":"2019-05-08 16:05:16.000000000","message":"It might be worth mentioning that this option overrides save location, and that the two options can\u0027t be used together. Could put that here, or in the rst.","commit_id":"71cb4a532abb87f75e6921144531cca024640355"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"e956b736656d1fe8ece26701fe20b33bf7943fbb","unresolved":false,"context_lines":[{"line_number":697,"context_line":"    \u0027overwrite\u0027,"},{"line_number":698,"context_line":"    is_flag\u003dTrue,"},{"line_number":699,"context_line":"    default\u003dFalse,"},{"line_number":700,"context_line":"    help\u003d\u0027Overwrites file(s) at path with decrypted data when set.\u0027)"},{"line_number":701,"context_line":"@click.argument(\u0027site_name\u0027)"},{"line_number":702,"context_line":"def decrypt(*, path, save_location, overwrite, site_name):"},{"line_number":703,"context_line":"    engine.repository.process_repositories(site_name)"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfbec78f_743168a2","line":700,"range":{"start_line":700,"start_character":9,"end_line":700,"end_character":67},"in_reply_to":"dfbec78f_14702ca5","updated":"2019-05-08 16:11:53.000000000","message":"Done","commit_id":"71cb4a532abb87f75e6921144531cca024640355"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"6988996fb160059c50e3bce96f56aaf611bb0fde","unresolved":false,"context_lines":[{"line_number":678,"context_line":"    \u0027decrypt\u0027,"},{"line_number":679,"context_line":"    help\u003d\u0027Command to unwrap and decrypt one site \u0027"},{"line_number":680,"context_line":"         \u0027secrets document and print it to stdout.\u0027)"},{"line_number":681,"context_line":"@click.option("},{"line_number":682,"context_line":"    \u0027-p\u0027,"},{"line_number":683,"context_line":"    \u0027--path\u0027,"},{"line_number":684,"context_line":"    \u0027path\u0027,"},{"line_number":685,"context_line":"    type\u003dclick.Path(exists\u003dTrue, readable\u003dTrue),"},{"line_number":686,"context_line":"    help\u003d\u0027The file or directory path to decrypt.\u0027)"},{"line_number":687,"context_line":"@click.option("},{"line_number":688,"context_line":"    \u0027-s\u0027,"},{"line_number":689,"context_line":"    \u0027--save-location\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"dfbec78f_b4c4c060","line":686,"range":{"start_line":681,"start_character":0,"end_line":686,"end_character":50},"updated":"2019-05-08 16:18:29.000000000","message":"required\u003dTrue","commit_id":"4bdf5224cb6c18abe5c7a7674806867689a7fe2c"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"2bc7a624e0f0a61b98556c84b0abf5d4cad8d55a","unresolved":false,"context_lines":[{"line_number":678,"context_line":"    \u0027decrypt\u0027,"},{"line_number":679,"context_line":"    help\u003d\u0027Command to unwrap and decrypt one site \u0027"},{"line_number":680,"context_line":"         \u0027secrets document and print it to stdout.\u0027)"},{"line_number":681,"context_line":"@click.option("},{"line_number":682,"context_line":"    \u0027-p\u0027,"},{"line_number":683,"context_line":"    \u0027--path\u0027,"},{"line_number":684,"context_line":"    \u0027path\u0027,"},{"line_number":685,"context_line":"    type\u003dclick.Path(exists\u003dTrue, readable\u003dTrue),"},{"line_number":686,"context_line":"    help\u003d\u0027The file or directory path to decrypt.\u0027)"},{"line_number":687,"context_line":"@click.option("},{"line_number":688,"context_line":"    \u0027-s\u0027,"},{"line_number":689,"context_line":"    \u0027--save-location\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"dfbec78f_345f7073","line":686,"range":{"start_line":681,"start_character":0,"end_line":686,"end_character":50},"in_reply_to":"dfbec78f_b4c4c060","updated":"2019-05-08 16:33:25.000000000","message":"Done","commit_id":"4bdf5224cb6c18abe5c7a7674806867689a7fe2c"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"470725dde76525c7fc55d39b81849365447fbe84","unresolved":false,"context_lines":[{"line_number":698,"context_line":"    \u0027overwrite\u0027,"},{"line_number":699,"context_line":"    is_flag\u003dTrue,"},{"line_number":700,"context_line":"    default\u003dFalse,"},{"line_number":701,"context_line":"    help\u003d\u0027Overwrites file(s) at path with decrypted data when set. \u0027"},{"line_number":702,"context_line":"         \u0027Overrides --save-location option.\u0027)"},{"line_number":703,"context_line":"@click.argument(\u0027site_name\u0027)"},{"line_number":704,"context_line":"def decrypt(*, path, save_location, overwrite, site_name):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_6bed028a","line":701,"range":{"start_line":701,"start_character":21,"end_line":701,"end_character":36},"updated":"2019-05-08 18:49:43.000000000","message":"original file(s)","commit_id":"79b9ed86d233298c95901a95b7d7ab18ed13c12f"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"d9b2a593d55af70eeb913397281b0ce21cdc9df1","unresolved":false,"context_lines":[{"line_number":698,"context_line":"    \u0027overwrite\u0027,"},{"line_number":699,"context_line":"    is_flag\u003dTrue,"},{"line_number":700,"context_line":"    default\u003dFalse,"},{"line_number":701,"context_line":"    help\u003d\u0027Overwrites file(s) at path with decrypted data when set. \u0027"},{"line_number":702,"context_line":"         \u0027Overrides --save-location option.\u0027)"},{"line_number":703,"context_line":"@click.argument(\u0027site_name\u0027)"},{"line_number":704,"context_line":"def decrypt(*, path, save_location, overwrite, site_name):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_de5e2e11","line":701,"range":{"start_line":701,"start_character":21,"end_line":701,"end_character":36},"in_reply_to":"dfbec78f_6bed028a","updated":"2019-05-08 18:56:59.000000000","message":"Done","commit_id":"79b9ed86d233298c95901a95b7d7ab18ed13c12f"}],"pegleg/engine/secrets.py":[{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"5983ff97450e07fe702fdd528f54d8974417f7c0","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        file_dict[path] \u003d PeglegSecretManagement(path).decrypt_secrets()"},{"line_number":90,"context_line":"    else:"},{"line_number":91,"context_line":"        for dirpath, dirs, _files in os.walk(path):"},{"line_number":92,"context_line":"            for file in _files:"},{"line_number":93,"context_line":"                file_path \u003d os.path.join(dirpath, file)"},{"line_number":94,"context_line":"                file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":95,"context_line":"                    file_path).decrypt_secrets()"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfbec78f_944adc52","line":92,"range":{"start_line":92,"start_character":16,"end_line":92,"end_character":20},"updated":"2019-05-08 16:04:42.000000000","message":"python keyword, consider another variable, such as \u0027filename\u0027","commit_id":"71cb4a532abb87f75e6921144531cca024640355"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"e956b736656d1fe8ece26701fe20b33bf7943fbb","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        file_dict[path] \u003d PeglegSecretManagement(path).decrypt_secrets()"},{"line_number":90,"context_line":"    else:"},{"line_number":91,"context_line":"        for dirpath, dirs, _files in os.walk(path):"},{"line_number":92,"context_line":"            for file in _files:"},{"line_number":93,"context_line":"                file_path \u003d os.path.join(dirpath, file)"},{"line_number":94,"context_line":"                file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":95,"context_line":"                    file_path).decrypt_secrets()"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfbec78f_5460e4a5","line":92,"range":{"start_line":92,"start_character":16,"end_line":92,"end_character":20},"in_reply_to":"dfbec78f_944adc52","updated":"2019-05-08 16:11:53.000000000","message":"\u003e\u003e\u003e keyword.iskeyword(\u0027file\u0027)\nFalse\n\nIt doesn\u0027t come up as such in the console","commit_id":"71cb4a532abb87f75e6921144531cca024640355"},{"author":{"_account_id":25731,"name":"Stacey Fletcher","email":"staceylynnfletcher@gmail.com","username":"StaceyFletcher"},"change_message_id":"3cbed673df04de116b88617a1d7bab6e8ef829bd","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            for file in _files:"},{"line_number":93,"context_line":"                file_path \u003d os.path.join(dirpath, file)"},{"line_number":94,"context_line":"                file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":95,"context_line":"                    file_path).decrypt_secrets()"},{"line_number":96,"context_line":"    return file_dict"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"dfbec78f_540544c1","line":95,"updated":"2019-05-08 16:12:01.000000000","message":"Don\u0027t we still want logging if the path that was given wasn\u0027t found?","commit_id":"a1b405b354e805062b2656e3bf5f47ecc102b5f5"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"7da0d4897aced5c77ac53d2b07e988cadc8ca3d5","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            for file in _files:"},{"line_number":93,"context_line":"                file_path \u003d os.path.join(dirpath, file)"},{"line_number":94,"context_line":"                file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":95,"context_line":"                    file_path).decrypt_secrets()"},{"line_number":96,"context_line":"    return file_dict"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"dfbec78f_54d30439","line":95,"in_reply_to":"dfbec78f_540544c1","updated":"2019-05-08 16:14:31.000000000","message":"If called from CLI, intended usage, click will throw an error if the path is not valid.  This may lead to a case where a valid directory path is specified but contains no files - we should add logging on that case.","commit_id":"a1b405b354e805062b2656e3bf5f47ecc102b5f5"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"2bc7a624e0f0a61b98556c84b0abf5d4cad8d55a","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            for file in _files:"},{"line_number":93,"context_line":"                file_path \u003d os.path.join(dirpath, file)"},{"line_number":94,"context_line":"                file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":95,"context_line":"                    file_path).decrypt_secrets()"},{"line_number":96,"context_line":"    return file_dict"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"dfbec78f_54622440","line":95,"in_reply_to":"dfbec78f_54d30439","updated":"2019-05-08 16:33:25.000000000","message":"Done","commit_id":"a1b405b354e805062b2656e3bf5f47ecc102b5f5"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"53c635dea4d415295534990bcd52544faeeffb48","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import logging"},{"line_number":16,"context_line":"import os"},{"line_number":17,"context_line":"from glob import glob"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import yaml"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"dfbec78f_e8725849","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":21},"updated":"2019-05-08 17:19:39.000000000","message":"import order alphabetical","commit_id":"375f28f33e01a92581143576e145834715f25d5d"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"10ca932188e3738ca8188ff310e0dd02f3ceac49","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import logging"},{"line_number":16,"context_line":"import os"},{"line_number":17,"context_line":"from glob import glob"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import yaml"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"dfbec78f_2b6f0a93","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":21},"in_reply_to":"dfbec78f_e8725849","updated":"2019-05-08 18:09:21.000000000","message":"Done","commit_id":"375f28f33e01a92581143576e145834715f25d5d"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"470725dde76525c7fc55d39b81849365447fbe84","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import logging"},{"line_number":17,"context_line":"import os"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import yaml"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from prettytable import PrettyTable"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from pegleg.engine.catalog.pki_utility import PKIUtility"},{"line_number":24,"context_line":"from pegleg.engine.generators.passphrase_generator import PassphraseGenerator"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_ab1d3a74","line":21,"range":{"start_line":19,"start_character":0,"end_line":21,"end_character":35},"updated":"2019-05-08 18:49:43.000000000","message":"these should be grouped as 3rd party libs\nhttps://docs.openstack.org/hacking/latest/user/hacking.html#import-order-template","commit_id":"79b9ed86d233298c95901a95b7d7ab18ed13c12f"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"d9b2a593d55af70eeb913397281b0ce21cdc9df1","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import logging"},{"line_number":17,"context_line":"import os"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import yaml"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from prettytable import PrettyTable"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from pegleg.engine.catalog.pki_utility import PKIUtility"},{"line_number":24,"context_line":"from pegleg.engine.generators.passphrase_generator import PassphraseGenerator"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_9e9e76b6","line":21,"range":{"start_line":19,"start_character":0,"end_line":21,"end_character":35},"in_reply_to":"dfbec78f_ab1d3a74","updated":"2019-05-08 18:56:59.000000000","message":"Done","commit_id":"79b9ed86d233298c95901a95b7d7ab18ed13c12f"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"55f820d7aa9dbba7f911eae62037597e195e4821","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    if os.path.isfile(path):"},{"line_number":96,"context_line":"        file_dict[path] \u003d PeglegSecretManagement(path).decrypt_secrets()"},{"line_number":97,"context_line":"    else:"},{"line_number":98,"context_line":"        match \u003d os.path.join(\u0027**\u0027, \u0027*.yaml\u0027)"},{"line_number":99,"context_line":"        if glob(match, recursive\u003dTrue):"},{"line_number":100,"context_line":"            for dirpath, dirs, _files in os.walk(path, followlinks\u003dTrue):"},{"line_number":101,"context_line":"                for file in _files:"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_7231730b","line":98,"range":{"start_line":98,"start_character":29,"end_line":98,"end_character":43},"updated":"2019-05-09 02:42:49.000000000","message":"This doesn\u0027t strike me as correct. Shouldn\u0027t this be (path, \u0027**\u0027, \u0027*.yaml\u0027)? Otherwise this may needlessly do a recursive iteration by analyzing whether the user\u0027s current directory contains any nested YAML files, rather than checking that the specified path\u0027s nested directories contain any YAML files.","commit_id":"32e9d4333261d41b377be68c1eb73f20ab790335"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"4115d5773fae453eb431a4bf8abde9dcb9d78449","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    if os.path.isfile(path):"},{"line_number":96,"context_line":"        file_dict[path] \u003d PeglegSecretManagement(path).decrypt_secrets()"},{"line_number":97,"context_line":"    else:"},{"line_number":98,"context_line":"        match \u003d os.path.join(\u0027**\u0027, \u0027*.yaml\u0027)"},{"line_number":99,"context_line":"        if glob(match, recursive\u003dTrue):"},{"line_number":100,"context_line":"            for dirpath, dirs, _files in os.walk(path, followlinks\u003dTrue):"},{"line_number":101,"context_line":"                for file in _files:"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_2dccfaba","line":98,"range":{"start_line":98,"start_character":29,"end_line":98,"end_character":43},"in_reply_to":"dfbec78f_7231730b","updated":"2019-05-09 03:29:53.000000000","message":"Well that\u0027s embarrassing. Should be fixed","commit_id":"32e9d4333261d41b377be68c1eb73f20ab790335"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"55f820d7aa9dbba7f911eae62037597e195e4821","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        file_dict[path] \u003d PeglegSecretManagement(path).decrypt_secrets()"},{"line_number":97,"context_line":"    else:"},{"line_number":98,"context_line":"        match \u003d os.path.join(\u0027**\u0027, \u0027*.yaml\u0027)"},{"line_number":99,"context_line":"        if glob(match, recursive\u003dTrue):"},{"line_number":100,"context_line":"            for dirpath, dirs, _files in os.walk(path, followlinks\u003dTrue):"},{"line_number":101,"context_line":"                for file in _files:"},{"line_number":102,"context_line":"                    file_path \u003d os.path.join(dirpath, file)"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_923427fd","line":99,"range":{"start_line":99,"start_character":11,"end_line":99,"end_character":39},"updated":"2019-05-09 02:42:49.000000000","message":"According to the docs this: \"Return[s] a possibly-empty list of path names that match pathname, which must be a string containing a path specification.\"\n\nWhich tells me that you can use the return value from this to do the subsequent iteration over all valid paths, rather than having to manually \"walk\" over each sub-path recursively.\n\nThis effectively does duplicate work: 1) glob.glob finds all relevant paths for you recursively and then 2) you then do a recursive iteration anyway.","commit_id":"32e9d4333261d41b377be68c1eb73f20ab790335"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"4115d5773fae453eb431a4bf8abde9dcb9d78449","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        file_dict[path] \u003d PeglegSecretManagement(path).decrypt_secrets()"},{"line_number":97,"context_line":"    else:"},{"line_number":98,"context_line":"        match \u003d os.path.join(\u0027**\u0027, \u0027*.yaml\u0027)"},{"line_number":99,"context_line":"        if glob(match, recursive\u003dTrue):"},{"line_number":100,"context_line":"            for dirpath, dirs, _files in os.walk(path, followlinks\u003dTrue):"},{"line_number":101,"context_line":"                for file in _files:"},{"line_number":102,"context_line":"                    file_path \u003d os.path.join(dirpath, file)"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_adbf8af9","line":99,"range":{"start_line":99,"start_character":11,"end_line":99,"end_character":39},"in_reply_to":"dfbec78f_923427fd","updated":"2019-05-09 03:29:53.000000000","message":"Good point. I modified the loop and I\u0027ll double check it works tomorrow","commit_id":"32e9d4333261d41b377be68c1eb73f20ab790335"},{"author":{"_account_id":30106,"name":"Matt Carter","email":"matt.coach.carter@gmail.com","username":"MattCarter"},"change_message_id":"7a4bd31223887393f5bb84f7cef6a3d403259237","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    if os.path.isfile(path):"},{"line_number":96,"context_line":"        file_dict[path] \u003d PeglegSecretManagement(path).decrypt_secrets()"},{"line_number":97,"context_line":"    else:"},{"line_number":98,"context_line":"        match \u003d os.path.join(path, \u0027**\u0027, \u0027*.yaml\u0027)"},{"line_number":99,"context_line":"        file_list \u003d glob(match, recursive\u003dTrue)"},{"line_number":100,"context_line":"        for file_path in file_list:"},{"line_number":101,"context_line":"            file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":102,"context_line":"                file_path).decrypt_secrets()"},{"line_number":103,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_f6446d1d","line":100,"range":{"start_line":98,"start_character":1,"end_line":100,"end_character":35},"updated":"2019-05-09 14:09:29.000000000","message":"This looks much better. Seems to work with a quick test in a Python console","commit_id":"32fd0bd4680c33914a74ca3696baafc09c98f1bd"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"16442d1bfac4ce29edc857d326fc40f40dccecb7","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    if os.path.isfile(path):"},{"line_number":96,"context_line":"        file_dict[path] \u003d PeglegSecretManagement(path).decrypt_secrets()"},{"line_number":97,"context_line":"    else:"},{"line_number":98,"context_line":"        match \u003d os.path.join(path, \u0027**\u0027, \u0027*.yaml\u0027)"},{"line_number":99,"context_line":"        file_list \u003d glob(match, recursive\u003dTrue)"},{"line_number":100,"context_line":"        for file_path in file_list:"},{"line_number":101,"context_line":"            file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":102,"context_line":"                file_path).decrypt_secrets()"},{"line_number":103,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_d635a947","line":100,"range":{"start_line":98,"start_character":1,"end_line":100,"end_character":35},"in_reply_to":"dfbec78f_f6446d1d","updated":"2019-05-09 14:24:56.000000000","message":"Yeah I agree. I\u0027m building it now and doing a quick manual test","commit_id":"32fd0bd4680c33914a74ca3696baafc09c98f1bd"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"a6ba6e8779f443ff5db473c90247b785ada5ad94","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        for file_path in file_list:"},{"line_number":101,"context_line":"            file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":102,"context_line":"                file_path).decrypt_secrets()"},{"line_number":103,"context_line":"        else:"},{"line_number":104,"context_line":"            LOG.error(\u0027No YAML files were discovered in path: {}\u0027.format(path))"},{"line_number":105,"context_line":"    return file_dict"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_569f795e","line":104,"range":{"start_line":103,"start_character":8,"end_line":104,"end_character":79},"updated":"2019-05-09 14:18:32.000000000","message":"missing an if statement\n\nif file_list:\n    for file_path in file_list:\n        ...\nelse:\n    LOG.error(.....)","commit_id":"32fd0bd4680c33914a74ca3696baafc09c98f1bd"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"209e0ec26801184adfb275db1bc6faae53417421","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        for file_path in file_list:"},{"line_number":101,"context_line":"            file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":102,"context_line":"                file_path).decrypt_secrets()"},{"line_number":103,"context_line":"        else:"},{"line_number":104,"context_line":"            LOG.error(\u0027No YAML files were discovered in path: {}\u0027.format(path))"},{"line_number":105,"context_line":"    return file_dict"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_76d63df4","line":104,"range":{"start_line":103,"start_character":8,"end_line":104,"end_character":79},"in_reply_to":"dfbec78f_569f795e","updated":"2019-05-09 14:23:19.000000000","message":"Done","commit_id":"32fd0bd4680c33914a74ca3696baafc09c98f1bd"},{"author":{"_account_id":30106,"name":"Matt Carter","email":"matt.coach.carter@gmail.com","username":"MattCarter"},"change_message_id":"cc0b49ca83f8fcfd377ae10a198e10cb8741bb5d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        for file_path in file_list:"},{"line_number":101,"context_line":"            file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":102,"context_line":"                file_path).decrypt_secrets()"},{"line_number":103,"context_line":"        else:"},{"line_number":104,"context_line":"            LOG.error(\u0027No YAML files were discovered in path: {}\u0027.format(path))"},{"line_number":105,"context_line":"    return file_dict"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_f6030d72","line":104,"range":{"start_line":103,"start_character":8,"end_line":104,"end_character":79},"in_reply_to":"dfbec78f_569f795e","updated":"2019-05-09 14:23:44.000000000","message":"I actually had no idea you could do an else on a for and it isn\u0027t a syntax error... looks like whatever is in the else just always runs so this definitely needs to be fixed.","commit_id":"32fd0bd4680c33914a74ca3696baafc09c98f1bd"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"16442d1bfac4ce29edc857d326fc40f40dccecb7","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        for file_path in file_list:"},{"line_number":101,"context_line":"            file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":102,"context_line":"                file_path).decrypt_secrets()"},{"line_number":103,"context_line":"        else:"},{"line_number":104,"context_line":"            LOG.error(\u0027No YAML files were discovered in path: {}\u0027.format(path))"},{"line_number":105,"context_line":"    return file_dict"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_76ef1db0","line":104,"range":{"start_line":103,"start_character":8,"end_line":104,"end_character":79},"in_reply_to":"dfbec78f_f6030d72","updated":"2019-05-09 14:24:56.000000000","message":"Crazy right? I think that\u0027s why I didn\u0027t notice it","commit_id":"32fd0bd4680c33914a74ca3696baafc09c98f1bd"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"1baa62d48fbb60bb065e3774ecea516123357eec","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        match \u003d os.path.join(path, \u0027**\u0027, \u0027*.yaml\u0027)"},{"line_number":99,"context_line":"        file_list \u003d glob(match, recursive\u003dTrue)"},{"line_number":100,"context_line":"        if not file_list:"},{"line_number":101,"context_line":"            LOG.error(\u0027No YAML files were discovered in path: {}\u0027.format(path))"},{"line_number":102,"context_line":"        for file_path in file_list:"},{"line_number":103,"context_line":"            file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":104,"context_line":"                file_path).decrypt_secrets()"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_7013945d","line":101,"range":{"start_line":101,"start_character":16,"end_line":101,"end_character":21},"updated":"2019-05-10 05:47:17.000000000","message":"This seems a bit too dire to me, because no error has actually occurred. Maybe a warning. Any actual error should probably just bubble up and cause the command to fail.","commit_id":"49c07bf04cc609f581fac35d25cebc2232fc1480"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"370bb0d04d25aecf49e95713d0280b63b8d977dc","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        match \u003d os.path.join(path, \u0027**\u0027, \u0027*.yaml\u0027)"},{"line_number":99,"context_line":"        file_list \u003d glob(match, recursive\u003dTrue)"},{"line_number":100,"context_line":"        if not file_list:"},{"line_number":101,"context_line":"            LOG.error(\u0027No YAML files were discovered in path: {}\u0027.format(path))"},{"line_number":102,"context_line":"        for file_path in file_list:"},{"line_number":103,"context_line":"            file_dict[file_path] \u003d PeglegSecretManagement("},{"line_number":104,"context_line":"                file_path).decrypt_secrets()"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_53ba0c0a","line":101,"range":{"start_line":101,"start_character":16,"end_line":101,"end_character":21},"in_reply_to":"dfbec78f_7013945d","updated":"2019-05-10 18:58:57.000000000","message":"Done","commit_id":"49c07bf04cc609f581fac35d25cebc2232fc1480"}],"tests/unit/engine/test_secrets.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"55f820d7aa9dbba7f911eae62037597e195e4821","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    encrypted_files \u003d listdir(save_location_str)"},{"line_number":114,"context_line":"    assert len(encrypted_files) \u003e 0"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    # for _file in encrypted_files:"},{"line_number":117,"context_line":"    encrypted_path \u003d str(save_location.join(\"site/cicd/secrets/passphrases/\""},{"line_number":118,"context_line":"                                            \"cicd-passphrase-encrypted.yaml\"))"},{"line_number":119,"context_line":"    decrypted \u003d secrets.decrypt(encrypted_path)"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_724c139e","line":116,"range":{"start_line":116,"start_character":4,"end_line":116,"end_character":35},"updated":"2019-05-09 02:42:49.000000000","message":"This is dead code, though unrelated to PS.","commit_id":"32e9d4333261d41b377be68c1eb73f20ab790335"},{"author":{"_account_id":30173,"name":"Ian Pittwood","email":"pittwoodian@gmail.com","username":"ianp"},"change_message_id":"4115d5773fae453eb431a4bf8abde9dcb9d78449","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    encrypted_files \u003d listdir(save_location_str)"},{"line_number":114,"context_line":"    assert len(encrypted_files) \u003e 0"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    # for _file in encrypted_files:"},{"line_number":117,"context_line":"    encrypted_path \u003d str(save_location.join(\"site/cicd/secrets/passphrases/\""},{"line_number":118,"context_line":"                                            \"cicd-passphrase-encrypted.yaml\"))"},{"line_number":119,"context_line":"    decrypted \u003d secrets.decrypt(encrypted_path)"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_2d415a0c","line":116,"range":{"start_line":116,"start_character":4,"end_line":116,"end_character":35},"in_reply_to":"dfbec78f_724c139e","updated":"2019-05-09 03:29:53.000000000","message":"Done","commit_id":"32e9d4333261d41b377be68c1eb73f20ab790335"}]}
