)]}'
{"jenkins/__init__.py":[{"author":{"_account_id":1054,"name":"Darragh Bailey","email":"daragh.bailey@gmail.com","username":"dbailey-k"},"change_message_id":"f9f083c334b265f83a8429a6e1aa295c37faa48c","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        for token in os.environ.get(\"JENKINS_API_EXTRA_HEADERS\", \"\").split(\"\\n\"):"},{"line_number":382,"context_line":"            if \":\" in token:"},{"line_number":383,"context_line":"                header, value \u003d token.split(\":\", 1)"},{"line_number":384,"context_line":"                req.headers[header] \u003d value.strip()"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"    def _maybe_add_auth(self):"},{"line_number":387,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_89c1a283","line":384,"updated":"2018-08-18 11:46:13.000000000","message":"Besides a test I think this code should emit a debug message in case someone doesn\u0027t realise they have left it set.\n\nThinking that there should be a way to provide this via the API for this project add well that overrides the environment value.","commit_id":"1b1bd5e652398db74de78a442fe7d6ae46e46ca0"},{"author":{"_account_id":28882,"name":"Aigars Mahinovs","email":"aigarius@debian.org","username":"aigarius"},"change_message_id":"3607e2ed9e1ec13a001bc60bda15785042ac51e3","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        for token in os.environ.get(\"JENKINS_API_EXTRA_HEADERS\", \"\").split(\"\\n\"):"},{"line_number":382,"context_line":"            if \":\" in token:"},{"line_number":383,"context_line":"                header, value \u003d token.split(\":\", 1)"},{"line_number":384,"context_line":"                req.headers[header] \u003d value.strip()"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"    def _maybe_add_auth(self):"},{"line_number":387,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_c3718e46","line":384,"in_reply_to":"3f79a3b5_89c1a283","updated":"2018-08-21 08:29:12.000000000","message":"Test added. Do you really want an extra debug log message for every request? As far I can see only the SSL verification disabling does that (with a good reason, as that lowers security)","commit_id":"1b1bd5e652398db74de78a442fe7d6ae46e46ca0"},{"author":{"_account_id":1054,"name":"Darragh Bailey","email":"daragh.bailey@gmail.com","username":"dbailey-k"},"change_message_id":"1ca2050bb754183cd44e9aec434d62207f293fdd","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        if self.crumb:"},{"line_number":358,"context_line":"            req.headers[self.crumb[\u0027crumbRequestField\u0027]] \u003d self.crumb[\u0027crumb\u0027]"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def maybe_add_headers(self, req):"},{"line_number":361,"context_line":"        for token in os.environ.get(\"JENKINS_API_EXTRA_HEADERS\", \"\").split(\"\\n\"):"},{"line_number":362,"context_line":"            if \":\" in token:"},{"line_number":363,"context_line":"                header, value \u003d token.split(\":\", 1)"},{"line_number":364,"context_line":"                req.headers[header] \u003d value.strip()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def _maybe_add_auth(self):"},{"line_number":367,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_072b4433","line":364,"range":{"start_line":360,"start_character":4,"end_line":364,"end_character":51},"updated":"2018-09-11 18:35:19.000000000","message":"Given that this is using an env variable, it seems like it should be possible to set the headers directly on the session in the __init__ once only and it should be set for all subsequent requests. Which avoids calling this once per request?","commit_id":"7c1a17c3f11eebd8ff4867d7ef1a7664fd3741d9"},{"author":{"_account_id":28882,"name":"Aigars Mahinovs","email":"aigarius@debian.org","username":"aigarius"},"change_message_id":"adee2bceb27961f491786583d72cc7b1ee4c0486","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        if self.crumb:"},{"line_number":358,"context_line":"            req.headers[self.crumb[\u0027crumbRequestField\u0027]] \u003d self.crumb[\u0027crumb\u0027]"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def maybe_add_headers(self, req):"},{"line_number":361,"context_line":"        for token in os.environ.get(\"JENKINS_API_EXTRA_HEADERS\", \"\").split(\"\\n\"):"},{"line_number":362,"context_line":"            if \":\" in token:"},{"line_number":363,"context_line":"                header, value \u003d token.split(\":\", 1)"},{"line_number":364,"context_line":"                req.headers[header] \u003d value.strip()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def _maybe_add_auth(self):"},{"line_number":367,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_392e95ab","line":364,"range":{"start_line":360,"start_character":4,"end_line":364,"end_character":51},"in_reply_to":"3f79a3b5_072b4433","updated":"2018-09-12 10:58:46.000000000","message":"Done","commit_id":"7c1a17c3f11eebd8ff4867d7ef1a7664fd3741d9"},{"author":{"_account_id":1054,"name":"Darragh Bailey","email":"daragh.bailey@gmail.com","username":"dbailey-k"},"change_message_id":"ebae85bca36c212cb5808bbe70410cfe5c0a80be","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            logging.debug(\"JENKINS_API_EXTRA_HEADERS adds these HTTP headers: %s\", self.extra_headers)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        self.timeout \u003d timeout"},{"line_number":330,"context_line":"        self._session \u003d WrappedSession()"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if os.getenv(\u0027PYTHONHTTPSVERIFY\u0027, \u00271\u0027) \u003d\u003d \u00270\u0027:"},{"line_number":333,"context_line":"            logging.debug(\u0027PYTHONHTTPSVERIFY\u003d0 detected so we will \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_a4159ce7","line":330,"range":{"start_line":330,"start_character":8,"end_line":330,"end_character":40},"updated":"2018-09-12 11:17:56.000000000","message":"is there a reason not to add the headers directly to the session object?\n\n extra_headers \u003d os.environ.get(\"JENKINS_API_EXTRA_HEADERS\", \"\").split(\"\\n\")\n if extra_headers:\n     logging.warning(\"JENKINS_API_EXTRA_HEADERS adds these HTTP headers: %s\", self.extra_headers\n for token in extra_headers:\n     if \":\" in token:\n         header, value \u003d token.split(\":\", 1)\n         self._session.headers[header] \u003d value.strip()\n\nThen there is no need to set them on individual requests?","commit_id":"e1f6af5854a82df5761dee58a1734c8a742a260f"},{"author":{"_account_id":28882,"name":"Aigars Mahinovs","email":"aigarius@debian.org","username":"aigarius"},"change_message_id":"08b3d8e8a7750012b1cf778f8b6ad79c22d0a065","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            logging.debug(\"JENKINS_API_EXTRA_HEADERS adds these HTTP headers: %s\", self.extra_headers)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        self.timeout \u003d timeout"},{"line_number":330,"context_line":"        self._session \u003d WrappedSession()"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if os.getenv(\u0027PYTHONHTTPSVERIFY\u0027, \u00271\u0027) \u003d\u003d \u00270\u0027:"},{"line_number":333,"context_line":"            logging.debug(\u0027PYTHONHTTPSVERIFY\u003d0 detected so we will \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_2448ac85","line":330,"range":{"start_line":330,"start_character":8,"end_line":330,"end_character":40},"in_reply_to":"3f79a3b5_a4159ce7","updated":"2018-09-12 11:42:50.000000000","message":"Done","commit_id":"e1f6af5854a82df5761dee58a1734c8a742a260f"},{"author":{"_account_id":1054,"name":"Darragh Bailey","email":"daragh.bailey@gmail.com","username":"dbailey-k"},"change_message_id":"dbd9a6f828614cd9c3b6e7280452cc895e316ae1","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        extra_headers \u003d os.environ.get(\"JENKINS_API_EXTRA_HEADERS\", \"\")"},{"line_number":325,"context_line":"        if extra_headers:"},{"line_number":326,"context_line":"            logging.warning(\"JENKINS_API_EXTRA_HEADERS adds these HTTP headers: %s\", extra_headers.split(\"\\n\"))"},{"line_number":327,"context_line":"        for token in extra_headers.split(\"\\n\"):"},{"line_number":328,"context_line":"            if \":\" in token:"},{"line_number":329,"context_line":"                header, value \u003d token.split(\":\", 1)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_442e08ac","line":326,"updated":"2018-09-12 11:44:22.000000000","message":"you may get a pep8 violation on the length here, sorry I didn\u0027t check to make sure that both the logging call and the length of the line were correct.","commit_id":"811a6cffc81fe2d915d6e3d3987de9058fcfa630"},{"author":{"_account_id":28882,"name":"Aigars Mahinovs","email":"aigarius@debian.org","username":"aigarius"},"change_message_id":"c66651b98759b2931ce4fbe7f892dace4640451f","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        extra_headers \u003d os.environ.get(\"JENKINS_API_EXTRA_HEADERS\", \"\")"},{"line_number":325,"context_line":"        if extra_headers:"},{"line_number":326,"context_line":"            logging.warning(\"JENKINS_API_EXTRA_HEADERS adds these HTTP headers: %s\", extra_headers.split(\"\\n\"))"},{"line_number":327,"context_line":"        for token in extra_headers.split(\"\\n\"):"},{"line_number":328,"context_line":"            if \":\" in token:"},{"line_number":329,"context_line":"                header, value \u003d token.split(\":\", 1)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_a4011c09","line":326,"in_reply_to":"3f79a3b5_442e08ac","updated":"2018-09-12 11:47:00.000000000","message":"Let\u0027s see, tox did pass locally","commit_id":"811a6cffc81fe2d915d6e3d3987de9058fcfa630"}]}
