)]}'
{"doc/source/reference/drivers/github.rst":[{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"1c4435aa1f030ef23593d0dd2b2f254ca90d045e","unresolved":false,"context_lines":[{"line_number":343,"context_line":"      status. Defaults to the zuul server status_url, or the empty"},{"line_number":344,"context_line":"      string if that is unset."},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"   .. attr:: checks-api"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"      If the reporter should utilize github\u0027s checks API to set the commit"},{"line_number":349,"context_line":"      status, this must be set to ``in_progress``, ``success`` or ``failure``"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa7e38b_3381fda2","line":346,"range":{"start_line":346,"start_character":13,"end_line":346,"end_character":23},"updated":"2020-01-31 13:39:31.000000000","message":"This should be just checks as we\u0027re reporting checks (same as with status).","commit_id":"010357b8897b479612e85168fa742e8917a22432"}],"tests/fixtures/layouts/requirements-github.yaml":[{"author":{"_account_id":27952,"name":"Felix Edel","email":"felix.edel@bmw.de","username":"felix.schmidt"},"change_message_id":"a1ae66bc0cac60fa9dbf8af6c291f87f927fc144","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    manager: independent"},{"line_number":94,"context_line":"    require:"},{"line_number":95,"context_line":"      github:"},{"line_number":96,"context_line":"        status:"},{"line_number":97,"context_line":"          # A check_run will be treated as a status in case of requirements"},{"line_number":98,"context_line":"          - check:tenant-one/check:success"},{"line_number":99,"context_line":"    trigger:"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3fa7e38b_102265a7","line":96,"updated":"2020-02-06 12:20:03.000000000","message":"That\u0027s currently the only place ( that I\u0027m aware of) where the checks API is kind of mixed with the status API. I though about adding a new \"check\" requirement, but the GithubCommonFilter.matchesStatuses() method which evaluates this status is checked in various places. So, adding an equivalent for the checks API might make everything much more complex. If you OK with the rest, we could find a solution for that in a follow-up change.","commit_id":"d8cada3e2d73f6c3abe009dfc3908909b9d096e0"}],"tests/unit/test_github_driver.py":[{"author":{"_account_id":27952,"name":"Felix Edel","email":"felix.edel@bmw.de","username":"felix.schmidt"},"change_message_id":"a1ae66bc0cac60fa9dbf8af6c291f87f927fc144","unresolved":false,"context_lines":[{"line_number":597,"context_line":"        self.assertIn("},{"line_number":598,"context_line":"            A.head_sha, github.repo_from_project(project)._commits.keys())"},{"line_number":599,"context_line":"        check_runs \u003d self.fake_github.getCommitChecks(project, A.head_sha)"},{"line_number":600,"context_line":"        self.assertEqual(0, len(check_runs))"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"    @simple_layout(\u0027layouts/merging-github.yaml\u0027, driver\u003d\u0027github\u0027)"},{"line_number":603,"context_line":"    def test_report_pull_merge(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_d0504d0c","line":600,"updated":"2020-02-06 12:20:03.000000000","message":"That\u0027s kind of a stupid test, but as the GithubReporter currently doesn\u0027t return anything (which would identify an error), I don\u0027t have any idea on how to check that the report failed because of missing app authentication. This test shows at least that the reporter and/or zuul doesn\u0027t crash on this :-)","commit_id":"d8cada3e2d73f6c3abe009dfc3908909b9d096e0"}],"zuul/driver/github/githubconnection.py":[{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"1c4435aa1f030ef23593d0dd2b2f254ca90d045e","unresolved":false,"context_lines":[{"line_number":1693,"context_line":"        # Successful check_runs are listed in Github\u0027s status section below the"},{"line_number":1694,"context_line":"        # comments of a PR, but not listed via its status API. So we have to"},{"line_number":1695,"context_line":"        # retrieve them via the checks API."},{"line_number":1696,"context_line":"        successful.update([cr.name for cr in commit.check_runs()"},{"line_number":1697,"context_line":"                          if cr.conclusion \u003d\u003d \u0027success\u0027])"},{"line_number":1698,"context_line":""},{"line_number":1699,"context_line":"        # Required contexts must be a subset of the successful contexts as"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_33d33dd7","line":1696,"updated":"2020-01-31 13:39:31.000000000","message":"Checks api is exclusively for apps so this will break gating on all deployments that use api token auth.","commit_id":"010357b8897b479612e85168fa742e8917a22432"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"1c4435aa1f030ef23593d0dd2b2f254ca90d045e","unresolved":false,"context_lines":[{"line_number":1944,"context_line":"                statuses.append(\"%s:%s:%s\" % stuple)"},{"line_number":1945,"context_line":"                seen.append(\"%s:%s\" % (stuple[0], stuple[1]))"},{"line_number":1946,"context_line":""},{"line_number":1947,"context_line":"        for check in self.getCommitChecks(project.name, sha, event):"},{"line_number":1948,"context_line":"            ctuple \u003d _check_as_tuple(check)"},{"line_number":1949,"context_line":"            # NOTE (felix): There might be a status and a check_run with the"},{"line_number":1950,"context_line":"            # same name. But as we prefix them internally with the sender\u0027s"},{"line_number":1951,"context_line":"            # login (status) or the app\u0027s slug (check_run), we should always"},{"line_number":1952,"context_line":"            # get disjunct entries for statuses and check_runs (unless those"},{"line_number":1953,"context_line":"            # two values are equal, of course)."},{"line_number":1954,"context_line":"            if \"{}:{}\".format(ctuple[0], ctuple[1]) not in seen:"},{"line_number":1955,"context_line":"                statuses.append(\"{}:{}:{}\".format(*ctuple))"},{"line_number":1956,"context_line":"                seen.append(\"{}:{}\".format(ctuple[0], ctuple[1]))"},{"line_number":1957,"context_line":""},{"line_number":1958,"context_line":"        return statuses"},{"line_number":1959,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_13dac1e5","line":1956,"range":{"start_line":1947,"start_character":0,"end_line":1956,"end_character":65},"updated":"2020-01-31 13:39:31.000000000","message":"This must be guarded based on the auth method as the checks api is unavailable for non-apps.","commit_id":"010357b8897b479612e85168fa742e8917a22432"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"4d00aee3bf63d0324eef07d44138a1f37e41fb7d","unresolved":false,"context_lines":[{"line_number":1695,"context_line":"            # Successful check_runs are listed in Github\u0027s status section below"},{"line_number":1696,"context_line":"            # the comments of a PR, but not listed via its status API. So we"},{"line_number":1697,"context_line":"            # have to retrieve them via the checks API."},{"line_number":1698,"context_line":"            successful.update([cr.name for cr in commit.check_runs()"},{"line_number":1699,"context_line":"                              if cr.conclusion \u003d\u003d \u0027success\u0027])"},{"line_number":1700,"context_line":""},{"line_number":1701,"context_line":"        # Required contexts must be a subset of the successful contexts as"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_d00dad40","line":1698,"updated":"2020-02-06 13:23:47.000000000","message":"Current deployments probably need the documented additional access rights to access checks. So we need to prepare ourselves that this might fail with 401 and handle this gracefully. This is needed for a proper upgrade path as it\u0027s necessary to not just update the permissions of the app but the users of the app must acknowledge the new permissions.","commit_id":"d8cada3e2d73f6c3abe009dfc3908909b9d096e0"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"4d00aee3bf63d0324eef07d44138a1f37e41fb7d","unresolved":false,"context_lines":[{"line_number":1811,"context_line":"        headers \u003d {\u0027Accept\u0027: \u0027application/vnd.github.antiope-preview+json\u0027}"},{"line_number":1812,"context_line":"        params \u003d {\"per_page\": 100}"},{"line_number":1813,"context_line":"        resp \u003d github.session.get(url, params\u003dparams, headers\u003dheaders)"},{"line_number":1814,"context_line":"        resp.raise_for_status()"},{"line_number":1815,"context_line":""},{"line_number":1816,"context_line":"        log.debug(\"Got commit checks for sha %s on %s\", sha, project_name)"},{"line_number":1817,"context_line":"        return resp.json().get(\"check_runs\", [])"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_ab3a06c2","line":1814,"updated":"2020-02-06 13:23:47.000000000","message":"We need to guard this as well against permission denied.","commit_id":"d8cada3e2d73f6c3abe009dfc3908909b9d096e0"}]}
