)]}'
{"doc/source/reference/drivers/bitbucketcloud.rst":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":3,"context_line":".. _bitbucketcloud_driver:"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"Bitbucket Cloud"},{"line_number":6,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"The Bitbucket Cloud driver supports sources, triggers, and reporters.  It"},{"line_number":9,"context_line":"interacts with publically hosted Bitbucket Cloud repositories."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3f65232a_e9effdad","line":6,"updated":"2020-10-21 12:23:36.000000000","message":"docs: Title underline too short.","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5c500ce94893d9e19699d8e069bdb8fd44342520","unresolved":false,"context_lines":[{"line_number":45,"context_line":"every project in the Zuul connection:"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"* This user needs an SSH key created for their account, see this"},{"line_number":48,"context_line":"`doc \u003chttps://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/\u003e`_"},{"line_number":49,"context_line":"with the public key stored in the Bitbucket Cloud user interface, and the"},{"line_number":50,"context_line":"private key stored in Zuuls configuration (see below)."},{"line_number":51,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"1f621f24_d21c376c","line":48,"updated":"2020-11-01 19:43:06.000000000","message":"docs: Bullet list ends without a blank line; unexpected unindent.","commit_id":"2052bd20e1285bb3e4745cc29a4dac4843d40f8b"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"dab2add25936a10837011b50d4b7a17526d3667c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"every project in the Zuul connection:"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"* This user needs an SSH key created for their account, see this `doc \u003chttps://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/\u003e`_"},{"line_number":48,"context_line":"with the public key stored in the Bitbucket Cloud user interface, and the"},{"line_number":49,"context_line":"private key stored in Zuuls configuration (see below)."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"1f621f24_8ca2844a","line":48,"updated":"2020-11-03 23:26:10.000000000","message":"docs: Bullet list ends without a blank line; unexpected unindent.","commit_id":"049cb252bedaac1b09f0c23ce9cb361e55a03630"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"a2ccb43d4663408ecb97e05262dedfff4be59e5a","unresolved":false,"context_lines":[{"line_number":3,"context_line":".. _bitbucketcloud_driver:"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"Bitbucket Cloud"},{"line_number":6,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"The Bitbucket Cloud driver supports sources, triggers, and reporters.  It"},{"line_number":9,"context_line":"interacts with publically hosted Bitbucket Cloud repositories."}],"source_content_type":"text/x-rst","patch_set":7,"id":"1f621f24_e822fbff","line":6,"updated":"2020-11-04 13:24:39.000000000","message":"docs: Duplicate explicit target name: \"here\".","commit_id":"e9b9310631a8913e95e9a644ab5524776e28a6c7"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"f2e15c6c541cecc98874cd0577b71e8dd4ae89a0","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  with the public key stored in the Bitbucket Cloud user interface, and the"},{"line_number":49,"context_line":"  private key stored in Zuuls configuration (see below)."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* An *App password* needs to be created for the user, see this `article"},{"line_number":52,"context_line":"  https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/`_"},{"line_number":53,"context_line":"  Select Read \u0026 Write for Pull requests, Projects and Repositories."},{"line_number":54,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"1f621f24_1be5d6dc","line":51,"updated":"2020-11-08 18:03:29.000000000","message":"docs: Unknown target name: \"article https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/\".","commit_id":"35b67cc5cfa8b687d5c8672a95debce4389d3307"}],"tests/base.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"eaaa120cb2444722c3e2ee89bf756f699a3bf585","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        self.registerGithubProjects(connection)"},{"line_number":262,"context_line":"        return connection"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"class BitbucketCloudDriverMock(BitbucketCloudDriver):"},{"line_number":265,"context_line":"    def __init__(self, registry, changes: Dict[str, Dict[str, Change]],"},{"line_number":266,"context_line":"                 config: ConfigParser, upstream_root: str,"},{"line_number":267,"context_line":"                 additional_event_queues, rpcclient: RPCClient,):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_f20973dd","line":264,"updated":"2020-11-01 21:01:02.000000000","message":"linters: E302 expected 2 blank lines, found 1","commit_id":"f6a225b5bbacc821be2e428a65e7e53563fef9a3"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"eaaa120cb2444722c3e2ee89bf756f699a3bf585","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        self.registerGithubProjects(connection)"},{"line_number":262,"context_line":"        return connection"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"class BitbucketCloudDriverMock(BitbucketCloudDriver):"},{"line_number":265,"context_line":"    def __init__(self, registry, changes: Dict[str, Dict[str, Change]],"},{"line_number":266,"context_line":"                 config: ConfigParser, upstream_root: str,"},{"line_number":267,"context_line":"                 additional_event_queues, rpcclient: RPCClient,):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_520f87e0","line":264,"updated":"2020-11-01 21:01:02.000000000","message":"linters: F821 undefined name \u0027BitbucketCloudDriver\u0027","commit_id":"f6a225b5bbacc821be2e428a65e7e53563fef9a3"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"eaaa120cb2444722c3e2ee89bf756f699a3bf585","unresolved":false,"context_lines":[{"line_number":276,"context_line":"    def getConnection(self, name, config):"},{"line_number":277,"context_line":"        server \u003d config.get(\u0027server\u0027, \u0027github.com\u0027)"},{"line_number":278,"context_line":"        db \u003d self.changes.setdefault(server, {})"},{"line_number":279,"context_line":"        connection \u003d FakeBitbucketCloudConnection("},{"line_number":280,"context_line":"            self, name, config, self.rpcclient,"},{"line_number":281,"context_line":"            changes_db\u003ddb,"},{"line_number":282,"context_line":"            upstream_root\u003dself.upstream_root,)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_32148bf5","line":279,"updated":"2020-11-01 21:01:02.000000000","message":"linters: F821 undefined name \u0027FakeBitbucketCloudConnection\u0027","commit_id":"f6a225b5bbacc821be2e428a65e7e53563fef9a3"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"eaaa120cb2444722c3e2ee89bf756f699a3bf585","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"class PagureDriverMock(PagureDriver):"},{"line_number":291,"context_line":"    def __init__(self, registry, changes: Dict[str, Dict[str, Change]],"},{"line_number":292,"context_line":"                 upstream_root: str, additional_event_queues,"},{"line_number":293,"context_line":"                 rpcclient: RPCClient):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_92f8ffc4","line":290,"updated":"2020-11-01 21:01:02.000000000","message":"linters: E303 too many blank lines (3)","commit_id":"f6a225b5bbacc821be2e428a65e7e53563fef9a3"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"44976100f50c363e320655c7ac7aae2f88c9f91a","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        self.registerGithubProjects(connection)"},{"line_number":262,"context_line":"        return connection"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"class BitbucketCloudDriverMock(BitbucketCloudDriver):"},{"line_number":265,"context_line":"    def __init__(self, registry, changes: Dict[str, Dict[str, Change]],"},{"line_number":266,"context_line":"                 config: ConfigParser, upstream_root: str,"},{"line_number":267,"context_line":"                 additional_event_queues, rpcclient: RPCClient,):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_375ab5f2","line":264,"updated":"2020-11-02 12:09:50.000000000","message":"linters: E302 expected 2 blank lines, found 1","commit_id":"aa7d6229798966a2ed225922c3308807e70f88e2"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"44976100f50c363e320655c7ac7aae2f88c9f91a","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        self.registerGithubProjects(connection)"},{"line_number":262,"context_line":"        return connection"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"class BitbucketCloudDriverMock(BitbucketCloudDriver):"},{"line_number":265,"context_line":"    def __init__(self, registry, changes: Dict[str, Dict[str, Change]],"},{"line_number":266,"context_line":"                 config: ConfigParser, upstream_root: str,"},{"line_number":267,"context_line":"                 additional_event_queues, rpcclient: RPCClient,):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_175fb9e2","line":264,"updated":"2020-11-02 12:09:50.000000000","message":"linters: F821 undefined name \u0027BitbucketCloudDriver\u0027","commit_id":"aa7d6229798966a2ed225922c3308807e70f88e2"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"44976100f50c363e320655c7ac7aae2f88c9f91a","unresolved":false,"context_lines":[{"line_number":276,"context_line":"    def getConnection(self, name, config):"},{"line_number":277,"context_line":"        server \u003d config.get(\u0027server\u0027, \u0027github.com\u0027)"},{"line_number":278,"context_line":"        db \u003d self.changes.setdefault(server, {})"},{"line_number":279,"context_line":"        connection \u003d FakeBitbucketCloudConnection("},{"line_number":280,"context_line":"            self, name, config, self.rpcclient,"},{"line_number":281,"context_line":"            changes_db\u003ddb,"},{"line_number":282,"context_line":"            upstream_root\u003dself.upstream_root,)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_77738d81","line":279,"updated":"2020-11-02 12:09:50.000000000","message":"linters: F821 undefined name \u0027FakeBitbucketCloudConnection\u0027","commit_id":"aa7d6229798966a2ed225922c3308807e70f88e2"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"44976100f50c363e320655c7ac7aae2f88c9f91a","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"class PagureDriverMock(PagureDriver):"},{"line_number":291,"context_line":"    def __init__(self, registry, changes: Dict[str, Dict[str, Change]],"},{"line_number":292,"context_line":"                 upstream_root: str, additional_event_queues,"},{"line_number":293,"context_line":"                 rpcclient: RPCClient):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_57701173","line":290,"updated":"2020-11-02 12:09:50.000000000","message":"linters: E303 too many blank lines (3)","commit_id":"aa7d6229798966a2ed225922c3308807e70f88e2"}],"zuul/cmd/web.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                                 zuul.driver.github.GithubDriver,"},{"line_number":126,"context_line":"                                 zuul.driver.pagure.PagureDriver,"},{"line_number":127,"context_line":"                                 zuul.driver.gitlab.GitlabDriver,"},{"line_number":128,"context_line":"                                 zuul.driver.bitbucketcloud.BitbucketCloudDriver])"},{"line_number":129,"context_line":"            self.configure_authenticators()"},{"line_number":130,"context_line":"            self._run()"},{"line_number":131,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_699dad58","line":128,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (82 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5c500ce94893d9e19699d8e069bdb8fd44342520","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                 zuul.driver.pagure.PagureDriver,"},{"line_number":127,"context_line":"                                 zuul.driver.gitlab.GitlabDriver,"},{"line_number":128,"context_line":"                                 (zuul.driver.bitbucketcloud."},{"line_number":129,"context_line":"                                 BitbucketCloudDriver)])"},{"line_number":130,"context_line":"            self.configure_authenticators()"},{"line_number":131,"context_line":"            self._run()"},{"line_number":132,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f621f24_720f232e","line":129,"updated":"2020-11-01 19:43:06.000000000","message":"linters: E128 continuation line under-indented for visual indent","commit_id":"2052bd20e1285bb3e4745cc29a4dac4843d40f8b"}],"zuul/driver/bitbucketcloud/bitbucketcloudconnection.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from zuul.connection import BaseConnection"},{"line_number":16,"context_line":"from zuul.model import Project, Branch, Ref"},{"line_number":17,"context_line":"from zuul.driver.bitbucketcloud.bitbucketcloudmodel import BitbucketCloudTriggerEvent, PullRequest"},{"line_number":18,"context_line":"from zuul.web.handler import BaseWebController"},{"line_number":19,"context_line":"from zuul.driver.bitbucketcloud.bitbucketcloudsource import BitbucketCloudSource"},{"line_number":20,"context_line":"from zuul.lib.gearworker import ZuulGearWorker"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_a9c7c545","line":17,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (98 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from zuul.model import Project, Branch, Ref"},{"line_number":17,"context_line":"from zuul.driver.bitbucketcloud.bitbucketcloudmodel import BitbucketCloudTriggerEvent, PullRequest"},{"line_number":18,"context_line":"from zuul.web.handler import BaseWebController"},{"line_number":19,"context_line":"from zuul.driver.bitbucketcloud.bitbucketcloudsource import BitbucketCloudSource"},{"line_number":20,"context_line":"from zuul.lib.gearworker import ZuulGearWorker"},{"line_number":21,"context_line":"from zuul.lib.logutil import get_annotated_logger"},{"line_number":22,"context_line":"from zuul.exceptions import MergeFailure"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_09c5193d","line":19,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (80 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from zuul.driver.bitbucketcloud.bitbucketcloudsource import BitbucketCloudSource"},{"line_number":20,"context_line":"from zuul.lib.gearworker import ZuulGearWorker"},{"line_number":21,"context_line":"from zuul.lib.logutil import get_annotated_logger"},{"line_number":22,"context_line":"from zuul.exceptions import MergeFailure"},{"line_number":23,"context_line":"import queue"},{"line_number":24,"context_line":"import logging"},{"line_number":25,"context_line":"import requests"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_e9c1bd30","line":22,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F401 \u0027zuul.exceptions.MergeFailure\u0027 imported but unused","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":25,"context_line":"import requests"},{"line_number":26,"context_line":"from requests.auth import HTTPBasicAuth"},{"line_number":27,"context_line":"from urllib.parse import urlparse"},{"line_number":28,"context_line":"from datetime import datetime"},{"line_number":29,"context_line":"import threading"},{"line_number":30,"context_line":"import time"},{"line_number":31,"context_line":"import json"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_49dc3118","line":28,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F401 \u0027datetime.datetime\u0027 imported but unused","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    # Used by reporter to report commit statuses"},{"line_number":259,"context_line":"    def setCommitStatus(self, project, sha, state, url\u003d\u0027\u0027, description\u003d\u0027\u0027,"},{"line_number":260,"context_line":"                        context\u003d\u0027\u0027, zuul_event_id\u003dNone):"},{"line_number":261,"context_line":"        log \u003d get_annotated_logger(self.log, zuul_event_id)"},{"line_number":262,"context_line":"        client \u003d self._getBitbucketCloudClient()"},{"line_number":263,"context_line":"        status_json \u003d {"},{"line_number":264,"context_line":"            \"state\": state,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_29e1f5d1","line":261,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F841 local variable \u0027log\u0027 is assigned to but never used","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            \"key\": context"},{"line_number":268,"context_line":"        }"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        status_endpoint \u003d \"/2.0/repositories/{}/commit/{}/statuses/build\".format("},{"line_number":271,"context_line":"            project, sha)"},{"line_number":272,"context_line":"        client.post(status_endpoint, status_json)"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_89e649e8","line":270,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (81 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        client.post(status_endpoint, status_json)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def commentPull(self, project, pr_number, message, zuul_event_id\u003dNone):"},{"line_number":275,"context_line":"        log \u003d get_annotated_logger(self.log, zuul_event_id)"},{"line_number":276,"context_line":"        client \u003d self._getBitbucketCloudClient()"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        comment_endpoint \u003d \"/2.0/repositories/{}/pullrequests/{}/comments\".format("}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_69ebedaf","line":275,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F841 local variable \u0027log\u0027 is assigned to but never used","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        log \u003d get_annotated_logger(self.log, zuul_event_id)"},{"line_number":276,"context_line":"        client \u003d self._getBitbucketCloudClient()"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        comment_endpoint \u003d \"/2.0/repositories/{}/pullrequests/{}/comments\".format("},{"line_number":279,"context_line":"            project, pr_number)"},{"line_number":280,"context_line":"        comment_json \u003d {\"content\":"},{"line_number":281,"context_line":"                        {\"raw\": message}"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_c9cfa155","line":278,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (82 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        client \u003d self._getBitbucketCloudClient()"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        if review \u003d\u003d \"approve\":"},{"line_number":290,"context_line":"            review_endpoint \u003d \"/2.0/repositories/{}/pullrequests/{}/approve\".format("},{"line_number":291,"context_line":"                project, pr_number)"},{"line_number":292,"context_line":"            client.post(review_endpoint)"},{"line_number":293,"context_line":"        elif review \u003d\u003d \"unapprove\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_a9cce561","line":290,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (84 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":292,"context_line":"            client.post(review_endpoint)"},{"line_number":293,"context_line":"        elif review \u003d\u003d \"unapprove\":"},{"line_number":294,"context_line":"            # unapprove removes an approval"},{"line_number":295,"context_line":"            review_endpoint \u003d \"/2.0/repositories/{}/pullrequests/{}/approve\".format("},{"line_number":296,"context_line":"                project, pr_number)"},{"line_number":297,"context_line":"            client.delete(review_endpoint)"},{"line_number":298,"context_line":"        elif review \u003d\u003d \"decline\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_09da3916","line":295,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (84 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            client.delete(review_endpoint)"},{"line_number":298,"context_line":"        elif review \u003d\u003d \"decline\":"},{"line_number":299,"context_line":"            # decline closes the pull request"},{"line_number":300,"context_line":"            review_endpoint \u003d \"/2.0/repositories/{}/pullrequests/{}/decline\".format("},{"line_number":301,"context_line":"                project, pr_number)"},{"line_number":302,"context_line":"            client.post(review_endpoint)"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_e9d6ddf1","line":300,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (84 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        return change"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def _updateChange(self, change, event):"},{"line_number":363,"context_line":"        log \u003d get_annotated_logger(self.log, event)"},{"line_number":364,"context_line":"        change.pr \u003d self.getPR("},{"line_number":365,"context_line":"            change.project.name, change.number)"},{"line_number":366,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_4905517a","line":363,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F841 local variable \u0027log\u0027 is assigned to but never used","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        change.pr \u003d self.getPR("},{"line_number":365,"context_line":"            change.project.name, change.number)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        # Note: Bitbucket Cloud does not support refspecs on pull requests currently,"},{"line_number":368,"context_line":"        # so we have to generate them ourselfs"},{"line_number":369,"context_line":"        # https://jira.atlassian.com/browse/BCLOUD-5814"},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_290a9589","line":367,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (85 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        self.zuul_web \u003d zuul_web"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    def _validate_bitbucket_webhook(self, headers):"},{"line_number":414,"context_line":"        # # Bitbucket cloud does not support any auth method for their webhooks,"},{"line_number":415,"context_line":"        # # they advise to lock down sufficiently to bitbucket ip\u0027s"},{"line_number":416,"context_line":"        try:"},{"line_number":417,"context_line":"            event_token \u003d headers[\u0027x-event-key\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_89ff6966","line":414,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (80 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":414,"context_line":"        # # Bitbucket cloud does not support any auth method for their webhooks,"},{"line_number":415,"context_line":"        # # they advise to lock down sufficiently to bitbucket ip\u0027s"},{"line_number":416,"context_line":"        try:"},{"line_number":417,"context_line":"            event_token \u003d headers[\u0027x-event-key\u0027]"},{"line_number":418,"context_line":"        except KeyError:"},{"line_number":419,"context_line":"            raise cherrypy.HTTPError(401, \u0027Missing X-Event-Key header\u0027)"},{"line_number":420,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_69048d7c","line":417,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F841 local variable \u0027event_token\u0027 is assigned to but never used","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":597,"context_line":"        self.log.debug(\"Received event: %s\" % str(event_type))"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"        if event_name not in self.event_handler_mapping:"},{"line_number":600,"context_line":"            message \u003d \"Unhandled BitbucketCloud event: %s\" % event_name"},{"line_number":601,"context_line":"            return"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":"        if event_name in self.event_handler_mapping:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_c9f8417e","line":600,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F841 local variable \u0027message\u0027 is assigned to but never used","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5c500ce94893d9e19699d8e069bdb8fd44342520","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                self.log.warning(\"Got no files of PR.\")"},{"line_number":389,"context_line":"            elif len(change.files) \u003c change.pr.get(\u0027changed_files\u0027, 0):"},{"line_number":390,"context_line":"                self.log.warning(\"Got only %s files but PR has %s files.\","},{"line_number":391,"context_line":"                    len(change.files),"},{"line_number":392,"context_line":"                    change.pr.get(\u0027changed_files\u0027, 0))"},{"line_number":393,"context_line":"                change.files \u003d None"},{"line_number":394,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f621f24_5209472a","line":391,"updated":"2020-11-01 19:43:06.000000000","message":"linters: E128 continuation line under-indented for visual indent","commit_id":"2052bd20e1285bb3e4745cc29a4dac4843d40f8b"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5c500ce94893d9e19699d8e069bdb8fd44342520","unresolved":false,"context_lines":[{"line_number":393,"context_line":"                change.files \u003d None"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"            event.changed_files"},{"line_number":397,"context_line":"            change.files \u003d event.changed_files"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        change.url \u003d change.pr[\u0027links\u0027][\u0027html\u0027][\u0027href\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f621f24_320e4b34","line":396,"updated":"2020-11-01 19:43:06.000000000","message":"linters: E303 too many blank lines (2)","commit_id":"2052bd20e1285bb3e4745cc29a4dac4843d40f8b"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5c500ce94893d9e19699d8e069bdb8fd44342520","unresolved":false,"context_lines":[{"line_number":431,"context_line":"                        \u0027x-attempt-number\u0027]):"},{"line_number":432,"context_line":"            if header not in headers:"},{"line_number":433,"context_line":"                raise cherrypy.HTTPError(401,"},{"line_number":434,"context_line":"                    \u0027Missing event header: {}\u0027.format(header))"},{"line_number":435,"context_line":"        return True"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    @cherrypy.expose"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f621f24_9212bf57","line":434,"updated":"2020-11-01 19:43:06.000000000","message":"linters: E128 continuation line under-indented for visual indent","commit_id":"2052bd20e1285bb3e4745cc29a4dac4843d40f8b"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"eaaa120cb2444722c3e2ee89bf756f699a3bf585","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                self.log.warning(\"Got no files of PR.\")"},{"line_number":389,"context_line":"            elif len(change.files) \u003c change.pr.get(\u0027changed_files\u0027, 0):"},{"line_number":390,"context_line":"                self.log.warning(\"Got only %s files but PR has %s files.\","},{"line_number":391,"context_line":"                        len(change.files),"},{"line_number":392,"context_line":"                        change.pr.get(\u0027changed_files\u0027, 0))"},{"line_number":393,"context_line":"                change.files \u003d None"},{"line_number":394,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_72f563cb","line":391,"updated":"2020-11-01 21:01:02.000000000","message":"linters: E128 continuation line under-indented for visual indent","commit_id":"f6a225b5bbacc821be2e428a65e7e53563fef9a3"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"eaaa120cb2444722c3e2ee89bf756f699a3bf585","unresolved":false,"context_lines":[{"line_number":389,"context_line":"            elif len(change.files) \u003c change.pr.get(\u0027changed_files\u0027, 0):"},{"line_number":390,"context_line":"                self.log.warning(\"Got only %s files but PR has %s files.\","},{"line_number":391,"context_line":"                        len(change.files),"},{"line_number":392,"context_line":"                        change.pr.get(\u0027changed_files\u0027, 0))"},{"line_number":393,"context_line":"                change.files \u003d None"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"            event.changed_files"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_d20277b4","line":392,"updated":"2020-11-01 21:01:02.000000000","message":"linters: E126 continuation line over-indented for hanging indent","commit_id":"f6a225b5bbacc821be2e428a65e7e53563fef9a3"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"eaaa120cb2444722c3e2ee89bf756f699a3bf585","unresolved":false,"context_lines":[{"line_number":430,"context_line":"                        \u0027x-attempt-number\u0027]):"},{"line_number":431,"context_line":"            if header not in headers:"},{"line_number":432,"context_line":"                raise cherrypy.HTTPError(401,"},{"line_number":433,"context_line":"                            \u0027Missing header: {}\u0027.format(header))"},{"line_number":434,"context_line":"        return True"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"    @cherrypy.expose"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_b2fffba8","line":433,"updated":"2020-11-01 21:01:02.000000000","message":"linters: E128 continuation line under-indented for visual indent","commit_id":"f6a225b5bbacc821be2e428a65e7e53563fef9a3"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"44976100f50c363e320655c7ac7aae2f88c9f91a","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                self.log.warning(\"Got no files of PR.\")"},{"line_number":389,"context_line":"            elif len(change.files) \u003c change.pr.get(\u0027changed_files\u0027, 0):"},{"line_number":390,"context_line":"                self.log.warning(\"Got only %s files but PR has %s files.\","},{"line_number":391,"context_line":"                                    len(change.files),"},{"line_number":392,"context_line":"                                    change.pr.get(\u0027changed_files\u0027, 0))"},{"line_number":393,"context_line":"                change.files \u003d None"},{"line_number":394,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_b76d259a","line":391,"updated":"2020-11-02 12:09:50.000000000","message":"linters: E127 continuation line over-indented for visual indent","commit_id":"aa7d6229798966a2ed225922c3308807e70f88e2"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"44976100f50c363e320655c7ac7aae2f88c9f91a","unresolved":false,"context_lines":[{"line_number":389,"context_line":"            elif len(change.files) \u003c change.pr.get(\u0027changed_files\u0027, 0):"},{"line_number":390,"context_line":"                self.log.warning(\"Got only %s files but PR has %s files.\","},{"line_number":391,"context_line":"                                    len(change.files),"},{"line_number":392,"context_line":"                                    change.pr.get(\u0027changed_files\u0027, 0))"},{"line_number":393,"context_line":"                change.files \u003d None"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"            event.changed_files"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_976aa97d","line":392,"updated":"2020-11-02 12:09:50.000000000","message":"linters: E127 continuation line over-indented for visual indent","commit_id":"aa7d6229798966a2ed225922c3308807e70f88e2"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"44976100f50c363e320655c7ac7aae2f88c9f91a","unresolved":false,"context_lines":[{"line_number":429,"context_line":"                        \u0027x-request-uuid\u0027,"},{"line_number":430,"context_line":"                        \u0027x-attempt-number\u0027]):"},{"line_number":431,"context_line":"            if header not in headers:"},{"line_number":432,"context_line":"                raise cherrypy.HTTPError(401,\u0027Missing: {}\u0027.format(header))"},{"line_number":433,"context_line":"        return True"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    @cherrypy.expose"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_f704bdc8","line":432,"updated":"2020-11-02 12:09:50.000000000","message":"linters: E231 missing whitespace after \u0027,\u0027","commit_id":"aa7d6229798966a2ed225922c3308807e70f88e2"},{"author":{"_account_id":31905,"name":"Guillaume Chauvel","email":"guillaume.chauvel@gmail.com","username":"gchauvel"},"change_message_id":"4218da55b0c28963450c258602aacfa7b7a2d1da","unresolved":true,"context_lines":[{"line_number":386,"context_line":"            change.files \u003d change.pr.get(\u0027files\u0027)"},{"line_number":387,"context_line":"            if change.files is None:"},{"line_number":388,"context_line":"                self.log.warning(\"Got no files of PR.\")"},{"line_number":389,"context_line":"            elif len(change.files) \u003c change.pr.get(\u0027changed_files\u0027, 0):"},{"line_number":390,"context_line":"                self.log.warning(\"Got only %s files but PR has %s files.\","},{"line_number":391,"context_line":"                                 len(change.files),"},{"line_number":392,"context_line":"                                 change.pr.get(\u0027changed_files\u0027, 0))"}],"source_content_type":"text/x-python","patch_set":10,"id":"cf84f7f9_0c5bb7ba","line":389,"range":{"start_line":389,"start_character":12,"end_line":389,"end_character":71},"updated":"2020-12-14 11:05:37.000000000","message":"It looks like changed_files is not part of the API\nlooking at getPR() line 211,  you generated change.pr.get(\u0027files\u0027) using the local variable changed_files, if that was the idea then this is always false (equals)\n\nAPI: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/diffstat/%7Bspec%7D\n\nI made a test with 50000 new files in a single commit with a pullrequest and got:\n{\n  \"pagelen\": 500,\n  \"next\": \"https://api.bitbucket.org/2.0/repositories/......\",\n  \"values\": []\n  \"page\": 1,\n  \"size\": 50000\n}\nIt would take size/pagelen requests to get all files.\n\nIMO,\nif \u0027next\u0027 is present in the answer, set files to None\nif \u0027next\u0027 is absent, set files to file list","commit_id":"95be299dafb61b04d4960039d525dff800e91d7f"},{"author":{"_account_id":31905,"name":"Guillaume Chauvel","email":"guillaume.chauvel@gmail.com","username":"gchauvel"},"change_message_id":"4218da55b0c28963450c258602aacfa7b7a2d1da","unresolved":true,"context_lines":[{"line_number":392,"context_line":"                                 change.pr.get(\u0027changed_files\u0027, 0))"},{"line_number":393,"context_line":"                change.files \u003d None"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"            event.changed_files"},{"line_number":396,"context_line":"            change.files \u003d event.changed_files"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"        change.url \u003d change.pr[\u0027links\u0027][\u0027html\u0027][\u0027href\u0027]"},{"line_number":399,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"89d17ec7_f3c03a09","line":396,"range":{"start_line":395,"start_character":0,"end_line":396,"end_character":46},"updated":"2020-12-14 11:05:37.000000000","message":"feels like those should be removed","commit_id":"95be299dafb61b04d4960039d525dff800e91d7f"},{"author":{"_account_id":31905,"name":"Guillaume Chauvel","email":"guillaume.chauvel@gmail.com","username":"gchauvel"},"change_message_id":"4218da55b0c28963450c258602aacfa7b7a2d1da","unresolved":true,"context_lines":[{"line_number":575,"context_line":"        old \u003d push.get(\u0027old\u0027, None)"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"        if new is None:"},{"line_number":578,"context_line":"            event.branch_deleted \u003d True"},{"line_number":579,"context_line":"        else:"},{"line_number":580,"context_line":"            event.branch \u003d new[\u0027name\u0027]"},{"line_number":581,"context_line":"            event.newrev \u003d new[\u0027target\u0027][\u0027hash\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"533fe0e1_f6ea7cc3","line":578,"range":{"start_line":578,"start_character":12,"end_line":578,"end_character":39},"updated":"2020-12-14 11:05:37.000000000","message":"might be nice to set event.newrev \u003d \u00270\u0027 * 40 also","commit_id":"95be299dafb61b04d4960039d525dff800e91d7f"},{"author":{"_account_id":31905,"name":"Guillaume Chauvel","email":"guillaume.chauvel@gmail.com","username":"gchauvel"},"change_message_id":"4218da55b0c28963450c258602aacfa7b7a2d1da","unresolved":true,"context_lines":[{"line_number":580,"context_line":"            event.branch \u003d new[\u0027name\u0027]"},{"line_number":581,"context_line":"            event.newrev \u003d new[\u0027target\u0027][\u0027hash\u0027]"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"        if push[\u0027old\u0027] is None:"},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"            event.branch_created \u003d True"},{"line_number":586,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7decbfee_6f0550e2","line":583,"range":{"start_line":583,"start_character":8,"end_line":583,"end_character":31},"updated":"2020-12-14 11:05:37.000000000","message":"if old is None: ?","commit_id":"95be299dafb61b04d4960039d525dff800e91d7f"},{"author":{"_account_id":31905,"name":"Guillaume Chauvel","email":"guillaume.chauvel@gmail.com","username":"gchauvel"},"change_message_id":"4218da55b0c28963450c258602aacfa7b7a2d1da","unresolved":true,"context_lines":[{"line_number":582,"context_line":""},{"line_number":583,"context_line":"        if push[\u0027old\u0027] is None:"},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"            event.branch_created \u003d True"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"        else:"},{"line_number":588,"context_line":"            event.branch \u003d old[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"ac305013_081c84b4","line":585,"range":{"start_line":585,"start_character":12,"end_line":585,"end_character":39},"updated":"2020-12-14 11:05:37.000000000","message":"might be nice to set event.oldrev \u003d \u00270\u0027 * 40 also","commit_id":"95be299dafb61b04d4960039d525dff800e91d7f"},{"author":{"_account_id":31905,"name":"Guillaume Chauvel","email":"guillaume.chauvel@gmail.com","username":"gchauvel"},"change_message_id":"4218da55b0c28963450c258602aacfa7b7a2d1da","unresolved":true,"context_lines":[{"line_number":588,"context_line":"            event.branch \u003d old[\u0027name\u0027]"},{"line_number":589,"context_line":"            event.oldrev \u003d old[\u0027target\u0027][\u0027hash\u0027]"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        if push[\u0027new\u0027] is not None and push[\u0027old\u0027] is not None:"},{"line_number":592,"context_line":"            event.branch_updated \u003d True"},{"line_number":593,"context_line":"        event.type \u003d \u0027bc_push\u0027"},{"line_number":594,"context_line":"        return event"}],"source_content_type":"text/x-python","patch_set":10,"id":"23c83fb6_7eaebbd9","line":591,"range":{"start_line":591,"start_character":8,"end_line":591,"end_character":63},"updated":"2020-12-14 11:05:37.000000000","message":"if new is not None and old is not None: ?","commit_id":"95be299dafb61b04d4960039d525dff800e91d7f"},{"author":{"_account_id":33571,"name":"Braden Schmidt","email":"braden.schmidt@justeattakeaway.com"},"change_message_id":"ee9c54551426aca9d121bbcb3c637228961892ef","unresolved":true,"context_lines":[{"line_number":215,"context_line":"        )"},{"line_number":216,"context_line":"        changed_files \u003d self._getBitbucketCloudClient().get("},{"line_number":217,"context_line":"            pr[\u0027links\u0027][\u0027diffstat\u0027][\u0027href\u0027])"},{"line_number":218,"context_line":"        pr[\u0027files\u0027] \u003d [f[\u0027new\u0027][\u0027path\u0027] for f in changed_files[\u0027values\u0027]]"},{"line_number":219,"context_line":"        return pr"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def getPRs(self, project_name):"}],"source_content_type":"text/x-python","patch_set":13,"id":"7404d46f_d7a22c53","line":218,"range":{"start_line":218,"start_character":23,"end_line":218,"end_character":31},"updated":"2021-09-03 22:44:33.000000000","message":"If a file was deleted in a PR `new` will be `null` here in the json body and only the `old` will have any information. \n\nHere\u0027s what `f` looks like:\n\n```\n{\n  \"status\": \"removed\",\n  \"old\": {\n    \"path\": \"file/path\",\n    \"escaped_path\": \"file/path\",\n    \"type\": \"commit_file\",\n    \"links\": {\n      \"self\": {\n        \"href\": \"https://api.bitbucket.org/2.0/repositories/org_name/repo/src/hash/file/path\"\n      }\n    }\n  },\n  \"lines_removed\": 1,\n  \"lines_added\": 0,\n  \"new\": null,\n  \"type\": \"diffstat\"\n}\n```","commit_id":"3a72f0485636750ceaf18f01274927f763be700d"},{"author":{"_account_id":33571,"name":"Braden Schmidt","email":"braden.schmidt@justeattakeaway.com"},"change_message_id":"2218ddedc539675e79ca06f82aa7e1c85ad29e44","unresolved":true,"context_lines":[{"line_number":575,"context_line":"        new \u003d push.get(\u0027new\u0027, None)"},{"line_number":576,"context_line":"        old \u003d push.get(\u0027old\u0027, None)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        event.url \u003d push[\u0027links\u0027][\u0027html\u0027][\u0027href\u0027]"},{"line_number":579,"context_line":"        if new is None:"},{"line_number":580,"context_line":"            event.newrev \u003d \u00270\u0027 * 40"},{"line_number":581,"context_line":"            event.branch_deleted \u003d True"}],"source_content_type":"text/x-python","patch_set":13,"id":"8e5c3bed_cbe6d4df","line":578,"updated":"2021-06-02 23:19:12.000000000","message":"Closing a branch (deleting it, having the PR automatically close the branch, etc) does not include `push.links`. All you get is a structure like the below:\n\n {\n  \"push\": {\n    \"changes\": [\n      {\n        \"forced\": false,\n        \"old\": {},\n        \"created\": false,\n        \"truncated\": false,\n        \"closed\": true,\n        \"new\": null\n      }\n    ]\n  },\n  \"actor\": {},\n  \"repository\": {}\n }\n\nI don\u0027t see that documented though: https://support.atlassian.com/bitbucket-cloud/docs/event-payloads/\n\nI suspect in these cases you\u0027d want to use the `old.links.html.href` which is the reference to the closed branch.","commit_id":"3a72f0485636750ceaf18f01274927f763be700d"},{"author":{"_account_id":33571,"name":"Braden Schmidt","email":"braden.schmidt@justeattakeaway.com"},"change_message_id":"ee9c54551426aca9d121bbcb3c637228961892ef","unresolved":true,"context_lines":[{"line_number":575,"context_line":"        new \u003d push.get(\u0027new\u0027, None)"},{"line_number":576,"context_line":"        old \u003d push.get(\u0027old\u0027, None)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        event.url \u003d push[\u0027links\u0027][\u0027html\u0027][\u0027href\u0027]"},{"line_number":579,"context_line":"        if new is None:"},{"line_number":580,"context_line":"            event.newrev \u003d \u00270\u0027 * 40"},{"line_number":581,"context_line":"            event.branch_deleted \u003d True"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff45922a_71aab381","line":578,"in_reply_to":"8e5c3bed_cbe6d4df","updated":"2021-09-03 22:44:33.000000000","message":"Had another look at this. \n\nDeletion of a branch triggers a single `repo:push` webhook like the above (note that `old` is a full object not just `{}`).\n\nMerging a PR triggers two `repo:push` webhooks at the same moment. One, exactly like the above with the `old` referring to the branch in PR and a `null` `new`. The second referring to the branch receiving the merged PR as the `old` and the `new`.","commit_id":"3a72f0485636750ceaf18f01274927f763be700d"}],"zuul/driver/bitbucketcloud/bitbucketcloudmodel.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            if event.comment is not None and comment_re.search(event.comment):"},{"line_number":103,"context_line":"                matches_comment_re \u003d True"},{"line_number":104,"context_line":"                break"},{"line_number":105,"context_line":"        if (event.action \u003d\u003d \u0027comment\u0027 and not matches_comment_re) or not self.comments:"},{"line_number":106,"context_line":"            return FalseWithReason(\"Comments %s doesn\u0027t match %s\" % ("},{"line_number":107,"context_line":"                self.comments, event.comment))"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_a9f50586","line":105,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (87 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5c500ce94893d9e19699d8e069bdb8fd44342520","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def matches(self, event, change):"},{"line_number":63,"context_line":"        self.log.info("},{"line_number":64,"context_line":"                    \"Running matcher for event type: {}, action: {}\".format("},{"line_number":65,"context_line":"                        event.type, event.action))"},{"line_number":66,"context_line":"        self.log.info("},{"line_number":67,"context_line":"                    \"Type list: {}\".format("}],"source_content_type":"text/x-python","patch_set":3,"id":"1f621f24_12ffcf01","line":64,"updated":"2020-11-01 19:43:06.000000000","message":"linters: E126 continuation line over-indented for hanging indent","commit_id":"2052bd20e1285bb3e4745cc29a4dac4843d40f8b"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5c500ce94893d9e19699d8e069bdb8fd44342520","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                    \"Running matcher for event type: {}, action: {}\".format("},{"line_number":65,"context_line":"                        event.type, event.action))"},{"line_number":66,"context_line":"        self.log.info("},{"line_number":67,"context_line":"                    \"Type list: {}\".format("},{"line_number":68,"context_line":"                        self.types))"},{"line_number":69,"context_line":"        matches_type \u003d False"},{"line_number":70,"context_line":"        for etype in self.types:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f621f24_f203330c","line":67,"updated":"2020-11-01 19:43:06.000000000","message":"linters: E126 continuation line over-indented for hanging indent","commit_id":"2052bd20e1285bb3e4745cc29a4dac4843d40f8b"}],"zuul/driver/bitbucketcloud/bitbucketcloudreporter.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import json"},{"line_number":16,"context_line":"import logging"},{"line_number":17,"context_line":"import voluptuous as v"},{"line_number":18,"context_line":"import time"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_a99ea551","line":15,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F401 \u0027json\u0027 imported but unused","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import json"},{"line_number":16,"context_line":"import logging"},{"line_number":17,"context_line":"import voluptuous as v"},{"line_number":18,"context_line":"import time"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from zuul.lib.logutil import get_annotated_logger"},{"line_number":21,"context_line":"from zuul.reporter import BaseReporter"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_09acf98a","line":18,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F401 \u0027time\u0027 imported but unused","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from zuul.lib.logutil import get_annotated_logger"},{"line_number":21,"context_line":"from zuul.reporter import BaseReporter"},{"line_number":22,"context_line":"from zuul.exceptions import MergeFailure"},{"line_number":23,"context_line":"from zuul.driver.util import scalar_or_list"},{"line_number":24,"context_line":"from zuul.driver.bitbucketcloud.bitbucketcloudsource import BitbucketCloudSource"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_e9a89d78","line":22,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F401 \u0027zuul.exceptions.MergeFailure\u0027 imported but unused","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from zuul.lib.logutil import get_annotated_logger"},{"line_number":21,"context_line":"from zuul.reporter import BaseReporter"},{"line_number":22,"context_line":"from zuul.exceptions import MergeFailure"},{"line_number":23,"context_line":"from zuul.driver.util import scalar_or_list"},{"line_number":24,"context_line":"from zuul.driver.bitbucketcloud.bitbucketcloudsource import BitbucketCloudSource"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_49b711da","line":23,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F401 \u0027zuul.driver.util.scalar_or_list\u0027 imported but unused","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from zuul.reporter import BaseReporter"},{"line_number":22,"context_line":"from zuul.exceptions import MergeFailure"},{"line_number":23,"context_line":"from zuul.driver.util import scalar_or_list"},{"line_number":24,"context_line":"from zuul.driver.bitbucketcloud.bitbucketcloudsource import BitbucketCloudSource"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class BitbucketCloudReporter(BaseReporter):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_29bc55ba","line":24,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (80 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        if not isinstance(item.change.project.source, BitbucketCloudSource):"},{"line_number":51,"context_line":"            return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # TODO For supporting several BitbucketCloud connections we\u0027ll also need to filter by"},{"line_number":54,"context_line":"        # the canonical hostname + workspace, as differentiating repos would use"},{"line_number":55,"context_line":"        # bitbucket.org/\u003cworkspace\u003e/\u003crepo\u003e, where workspace is the \"target\""},{"line_number":56,"context_line":"        if item.change.project.source.connection.canonical_hostname !\u003d \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_89b129e5","line":53,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (93 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # TODO For supporting several BitbucketCloud connections we\u0027ll also need to filter by"},{"line_number":54,"context_line":"        # the canonical hostname + workspace, as differentiating repos would use"},{"line_number":55,"context_line":"        # bitbucket.org/\u003cworkspace\u003e/\u003crepo\u003e, where workspace is the \"target\""},{"line_number":56,"context_line":"        if item.change.project.source.connection.canonical_hostname !\u003d \\"},{"line_number":57,"context_line":"                self.connection.canonical_hostname:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_69b64ddc","line":54,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (80 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        elif hasattr(item.change, \u0027newrev\u0027):"},{"line_number":102,"context_line":"            sha \u003d item.change.newrev"},{"line_number":103,"context_line":"        state \u003d self._commit_status"},{"line_number":104,"context_line":"        key \u003d self.context"},{"line_number":105,"context_line":"        url \u003d item.formatStatusUrl()"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        description \u003d \u0027%s status: %s\u0027 % (item.pipeline.name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_c9ca014e","line":104,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F841 local variable \u0027key\u0027 is assigned to but never used","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5c500ce94893d9e19699d8e069bdb8fd44342520","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            self._review,"},{"line_number":126,"context_line":"            zuul_event_id\u003ditem.event)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"def getSchema():"},{"line_number":129,"context_line":"    BitbucketCloud_reporter \u003d v.Schema({"},{"line_number":130,"context_line":"        \u0027status\u0027: v.Any(\u0027INPROGRESS\u0027, \u0027SUCCESSFUL\u0027, \u0027FAILED\u0027, \u0027STOPPED\u0027),"},{"line_number":131,"context_line":"        \u0027status-url\u0027: str,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f621f24_be04e718","line":128,"updated":"2020-11-01 19:43:06.000000000","message":"linters: E302 expected 2 blank lines, found 1","commit_id":"2052bd20e1285bb3e4745cc29a4dac4843d40f8b"}],"zuul/driver/bitbucketcloud/bitbucketcloudsource.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from zuul.source import BaseSource"},{"line_number":16,"context_line":"from zuul.driver.bitbucketcloud.bitbucketcloudmodel import PullRequest"},{"line_number":17,"context_line":"import re2"},{"line_number":18,"context_line":"import urllib"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_09f359a0","line":16,"updated":"2020-10-21 12:23:36.000000000","message":"linters: F401 \u0027zuul.driver.bitbucketcloud.bitbucketcloudmodel.PullRequest\u0027 imported but unused","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"}],"zuul/driver/bitbucketcloud/bitbucketcloudtrigger.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"248381b33b5ce2b0c420d8cc74ab9e78a467c4d2","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from zuul.trigger import BaseTrigger"},{"line_number":19,"context_line":"from zuul.driver.util import scalar_or_list, to_list"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from zuul.driver.bitbucketcloud.bitbucketcloudmodel import BitbucketCloudEventFilter"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class BitbucketCloudTrigger(BaseTrigger):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_c9a16198","line":21,"updated":"2020-10-21 12:23:36.000000000","message":"linters: E501 line too long (84 \u003e 79 characters)","commit_id":"6beb8c310a47e19e2c135d3cdc20ba1923250465"}]}
