)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1955,"name":"Alan Pevec","email":"alan.pevec@redhat.com","username":"apevec"},"change_message_id":"a0a31be2a2b1c730d0de892c3673dafac74cbe60","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a4e02376_05a6be99","updated":"2021-11-10 08:00:21.000000000","message":"@infra-core Please review, this is an useful addition, we are using it internally for more than a month and works well.","commit_id":"6c55c0c444ce0af765d5dbe0a3fc856b8e49b271"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"651018d300baefeefbb7fa02823193c3d60216c1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f2c54c76_d36e25aa","updated":"2021-11-10 11:41:03.000000000","message":"Thank you for the review!","commit_id":"6c55c0c444ce0af765d5dbe0a3fc856b8e49b271"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"2772a3353d657954a22a4eaffda234b9401a8496","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"29ab3ec4_def32d53","updated":"2021-11-10 11:56:27.000000000","message":"I\u0027d be happy to refactor the implementation if you think that is necessary, but we should discuss it in the parent change that introduces the actual BackendInterface.","commit_id":"65a2a96119c28b4c5a8ed3de887e23a80d74b694"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"603733be31e8fd1df5eee692834edb6861ad77d3","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"018a77c7_01d4c57e","in_reply_to":"29ab3ec4_def32d53","updated":"2021-11-10 22:04:52.000000000","message":"I\u0027m 100% sure this could all be written clearer; it sort of made sense when there was only one page but over time it\u0027s grown all these extra things to update.  I would make BackendInterface.__init__() abstract and then do like\n\n class WikiPage(BackendInterface):\n     def __init__(self, url, pageid, username, password):\n\nand keep all the config parsing in the main() function.  Anyway, we don\u0027t need to do that right now, that can follow on","commit_id":"65a2a96119c28b4c5a8ed3de887e23a80d74b694"}],"statusbot/bot.py":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"9929a49d94a0fe31efefed095e5234f618101bba","unresolved":true,"context_lines":[{"line_number":40,"context_line":"# when using etherpad, set the ircbot.backend value to etherpad"},{"line_number":41,"context_line":"[etherpad]"},{"line_number":42,"context_line":"url\u003dhttps://etherpad.example.com/p"},{"line_number":43,"context_line":"pad\u003dinfra-status"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"[irclogs]"},{"line_number":46,"context_line":"url\u003dhttp://eavesdrop.example.com/irclogs/%(chan)s/%(chan)s.%(date)s.log.html"}],"source_content_type":"text/x-python","patch_set":1,"id":"92518d58_40ec2313","line":43,"updated":"2021-11-10 10:23:11.000000000","message":"this should be \"successpad\"?\n\nalso should define \"thankspad\"?","commit_id":"6c55c0c444ce0af765d5dbe0a3fc856b8e49b271"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"651018d300baefeefbb7fa02823193c3d60216c1","unresolved":true,"context_lines":[{"line_number":40,"context_line":"# when using etherpad, set the ircbot.backend value to etherpad"},{"line_number":41,"context_line":"[etherpad]"},{"line_number":42,"context_line":"url\u003dhttps://etherpad.example.com/p"},{"line_number":43,"context_line":"pad\u003dinfra-status"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"[irclogs]"},{"line_number":46,"context_line":"url\u003dhttp://eavesdrop.example.com/irclogs/%(chan)s/%(chan)s.%(date)s.log.html"}],"source_content_type":"text/x-python","patch_set":1,"id":"ef5911a2_f8e06256","line":43,"in_reply_to":"92518d58_40ec2313","updated":"2021-11-10 11:41:03.000000000","message":"If I understand correctly the wiki configuration, the unnamed document is the status one, then success and thanks are extra configuration, and they are currently missing indeed.","commit_id":"6c55c0c444ce0af765d5dbe0a3fc856b8e49b271"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"9929a49d94a0fe31efefed095e5234f618101bba","unresolved":true,"context_lines":[{"line_number":134,"context_line":"class EtherPage(BackendInterface):"},{"line_number":135,"context_line":"    def __init__(self, config):"},{"line_number":136,"context_line":"        self.url \u003d config.get(\u0027etherpad\u0027, \u0027url\u0027)"},{"line_number":137,"context_line":"        self.pad \u003d config.get(\u0027etherpad\u0027, \u0027pad\u0027)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    @property"},{"line_number":140,"context_line":"    def pageurl(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3de2a11b_c72d45bc","line":137,"updated":"2021-11-10 10:23:11.000000000","message":"This isn\u0027t necessary, and gets reset below?","commit_id":"6c55c0c444ce0af765d5dbe0a3fc856b8e49b271"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"651018d300baefeefbb7fa02823193c3d60216c1","unresolved":true,"context_lines":[{"line_number":134,"context_line":"class EtherPage(BackendInterface):"},{"line_number":135,"context_line":"    def __init__(self, config):"},{"line_number":136,"context_line":"        self.url \u003d config.get(\u0027etherpad\u0027, \u0027url\u0027)"},{"line_number":137,"context_line":"        self.pad \u003d config.get(\u0027etherpad\u0027, \u0027pad\u0027)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    @property"},{"line_number":140,"context_line":"    def pageurl(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"2790a81a_f17c48dd","line":137,"in_reply_to":"3de2a11b_c72d45bc","updated":"2021-11-10 11:41:03.000000000","message":"I think this is how the existing WikiPage works: the `pageid` gets mutated for each page. This is just keeping the same logic.","commit_id":"6c55c0c444ce0af765d5dbe0a3fc856b8e49b271"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"9929a49d94a0fe31efefed095e5234f618101bba","unresolved":true,"context_lines":[{"line_number":165,"context_line":"    def __init__(self, config, backend):"},{"line_number":166,"context_line":"        self.backend \u003d backend(config)"},{"line_number":167,"context_line":"        self.ready \u003d False"},{"line_number":168,"context_line":"        if isinstance(self.backend, WikiPage):"},{"line_number":169,"context_line":"            self.backend.pageid \u003d get_opt(config, \u0027wiki\u0027, \u0027successpageid\u0027)"},{"line_number":170,"context_line":"            self.backend.pageurl \u003d get_opt(config, \u0027wiki\u0027, \u0027successpageurl\u0027)"},{"line_number":171,"context_line":"            self.ready \u003d self.backend.pageid is not None"},{"line_number":172,"context_line":"        elif isinstance(self.backend, EtherPage):"},{"line_number":173,"context_line":"            self.backend.pad \u003d get_opt(config, \u0027etherpad\u0027, \u0027successpad\u0027)"},{"line_number":174,"context_line":"            self.ready \u003d self.backend.pad is not None"},{"line_number":175,"context_line":"        if config.has_option(\u0027irclogs\u0027, \u0027url\u0027):"},{"line_number":176,"context_line":"            self.irclogs_url \u003d config.get(\u0027irclogs\u0027, \u0027url\u0027)"},{"line_number":177,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a95dd8a_70179c7c","line":174,"range":{"start_line":168,"start_character":1,"end_line":174,"end_character":53},"updated":"2021-11-10 10:23:11.000000000","message":"Alternatively, I\u0027m not even sure any of this is necessary?  seems like we can just instantiate the backend object and that should read the config in __init__?","commit_id":"6c55c0c444ce0af765d5dbe0a3fc856b8e49b271"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"651018d300baefeefbb7fa02823193c3d60216c1","unresolved":true,"context_lines":[{"line_number":165,"context_line":"    def __init__(self, config, backend):"},{"line_number":166,"context_line":"        self.backend \u003d backend(config)"},{"line_number":167,"context_line":"        self.ready \u003d False"},{"line_number":168,"context_line":"        if isinstance(self.backend, WikiPage):"},{"line_number":169,"context_line":"            self.backend.pageid \u003d get_opt(config, \u0027wiki\u0027, \u0027successpageid\u0027)"},{"line_number":170,"context_line":"            self.backend.pageurl \u003d get_opt(config, \u0027wiki\u0027, \u0027successpageurl\u0027)"},{"line_number":171,"context_line":"            self.ready \u003d self.backend.pageid is not None"},{"line_number":172,"context_line":"        elif isinstance(self.backend, EtherPage):"},{"line_number":173,"context_line":"            self.backend.pad \u003d get_opt(config, \u0027etherpad\u0027, \u0027successpad\u0027)"},{"line_number":174,"context_line":"            self.ready \u003d self.backend.pad is not None"},{"line_number":175,"context_line":"        if config.has_option(\u0027irclogs\u0027, \u0027url\u0027):"},{"line_number":176,"context_line":"            self.irclogs_url \u003d config.get(\u0027irclogs\u0027, \u0027url\u0027)"},{"line_number":177,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"c94a7e5b_5bce7732","line":174,"range":{"start_line":168,"start_character":1,"end_line":174,"end_character":53},"in_reply_to":"5a95dd8a_70179c7c","updated":"2021-11-10 11:41:03.000000000","message":"I didn\u0027t want to refactor the existing logic, but I think a simpler solution would be to remove the backend state and simply pass the page information to the load and save function.\n\nI don\u0027t understand what you are suggesting, should the __init__ function takes either a wiki pageid/pageurl, or a padurl argument?","commit_id":"6c55c0c444ce0af765d5dbe0a3fc856b8e49b271"}]}
