From c77c06760eb2634bffba2cc762a93202fda5bcb4 Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Thu, 19 Nov 2020 08:59:04 +0530 Subject: [PATCH] Add Support for Check Runs (#1727) * Add CheckRun object and stub file * Add list of check runs endpoint for Commit * Add get check run endpoint for Repository * Add CheckRun test file and replay data files * Add CheckRunAnnotation object and stub file * Add create CheckRun API endpoint to Repository * Update and add new tests for CheckRun endpoint: --- github/CheckRun.py | 330 +++++++++++++++++ github/CheckRun.pyi | 62 ++++ github/CheckRunAnnotation.py | 131 +++++++ github/CheckRunAnnotation.pyi | 26 ++ github/CheckRunOutput.py | 90 +++++ github/CheckRunOutput.pyi | 18 + github/Commit.py | 35 ++ github/Commit.pyi | 7 + github/Repository.py | 93 +++++ github/Repository.pyi | 15 + tests/CheckRun.py | 343 ++++++++++++++++++ tests/ReplayData/CheckRun.setUp.txt | 44 +++ ...ckRun.testCheckRunAnnotationAttributes.txt | 22 ++ .../CheckRun.testCheckRunOutputAttributes.txt | 11 + .../CheckRun.testCreateCheckRunCompleted.txt | 11 + .../CheckRun.testCreateCheckRunInProgress.txt | 22 ++ .../CheckRun.testGetCheckRunsForRef.txt | 22 ++ ...estGetCheckRunsForRefFilterByCheckName.txt | 22 ++ ...n.testGetCheckRunsForRefFilterByFilter.txt | 44 +++ ...n.testGetCheckRunsForRefFilterByStatus.txt | 44 +++ .../CheckRun.testListCheckRunAnnotations.txt | 33 ++ .../CheckRun.testUpdateCheckRunAll.txt | 22 ++ .../CheckRun.testUpdateCheckRunFailure.txt | 22 ++ .../CheckRun.testUpdateCheckRunSuccess.txt | 22 ++ 24 files changed, 1491 insertions(+) create mode 100644 github/CheckRun.py create mode 100644 github/CheckRun.pyi create mode 100644 github/CheckRunAnnotation.py create mode 100644 github/CheckRunAnnotation.pyi create mode 100644 github/CheckRunOutput.py create mode 100644 github/CheckRunOutput.pyi create mode 100644 tests/CheckRun.py create mode 100644 tests/ReplayData/CheckRun.setUp.txt create mode 100644 tests/ReplayData/CheckRun.testCheckRunAnnotationAttributes.txt create mode 100644 tests/ReplayData/CheckRun.testCheckRunOutputAttributes.txt create mode 100644 tests/ReplayData/CheckRun.testCreateCheckRunCompleted.txt create mode 100644 tests/ReplayData/CheckRun.testCreateCheckRunInProgress.txt create mode 100644 tests/ReplayData/CheckRun.testGetCheckRunsForRef.txt create mode 100644 tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByCheckName.txt create mode 100644 tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByFilter.txt create mode 100644 tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByStatus.txt create mode 100644 tests/ReplayData/CheckRun.testListCheckRunAnnotations.txt create mode 100644 tests/ReplayData/CheckRun.testUpdateCheckRunAll.txt create mode 100644 tests/ReplayData/CheckRun.testUpdateCheckRunFailure.txt create mode 100644 tests/ReplayData/CheckRun.testUpdateCheckRunSuccess.txt diff --git a/github/CheckRun.py b/github/CheckRun.py new file mode 100644 index 00000000..18403130 --- /dev/null +++ b/github/CheckRun.py @@ -0,0 +1,330 @@ +# -*- coding: utf-8 -*- + +############################ Copyrights and license ############################ +# # +# Copyright 2020 Dhruv Manilawala # +# # +# This file is part of PyGithub. # +# http://pygithub.readthedocs.io/ # +# # +# PyGithub is free software: you can redistribute it and/or modify it under # +# the terms of the GNU Lesser General Public License as published by the Free # +# Software Foundation, either version 3 of the License, or (at your option) # +# any later version. # +# # +# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # +# details. # +# # +# You should have received a copy of the GNU Lesser General Public License # +# along with PyGithub. If not, see . # +# # +################################################################################ + +import datetime + +import github.CheckRunAnnotation +import github.CheckRunOutput +import github.GithubApp +import github.GithubObject +import github.PaginatedList +import github.PullRequest + + +class CheckRun(github.GithubObject.CompletableGithubObject): + """ + This class represents check runs. + The reference can be found here https://docs.github.com/en/rest/reference/checks#check-runs + """ + + def __repr__(self): + return self.get__repr__( + {"id": self._id.value, "conclusion": self._conclusion.value} + ) + + @property + def app(self): + """ + :type: :class:`github.GithubApp.GithubApp` + """ + self._completeIfNotSet(self._app) + return self._app.value + + @property + def check_suite_id(self): + """ + :type: integer + """ + self._completeIfNotSet(self._check_suite_id) + return self._check_suite_id.value + + @property + def completed_at(self): + """ + :type: datetime.datetime + """ + self._completeIfNotSet(self._completed_at) + return self._completed_at.value + + @property + def conclusion(self): + """ + :type: string + """ + self._completeIfNotSet(self._conclusion) + return self._conclusion.value + + @property + def details_url(self): + """ + :type: string + """ + self._completeIfNotSet(self._details_url) + return self._details_url.value + + @property + def external_id(self): + """ + :type: string + """ + self._completeIfNotSet(self._external_id) + return self._external_id.value + + @property + def head_sha(self): + """ + :type: string + """ + self._completeIfNotSet(self._head_sha) + return self._head_sha.value + + @property + def html_url(self): + """ + :type: string + """ + self._completeIfNotSet(self._html_url) + return self._html_url.value + + @property + def id(self): + """ + :type: integer + """ + self._completeIfNotSet(self._id) + return self._id.value + + @property + def name(self): + """ + :type: string + """ + self._completeIfNotSet(self._name) + return self._name.value + + @property + def node_id(self): + """ + :type: string + """ + self._completeIfNotSet(self._node_id) + return self._node_id.value + + @property + def output(self): + """ + :type: :class:`github.CheckRunOutput.CheckRunOutput` + """ + self._completeIfNotSet(self._output) + return self._output.value + + @property + def pull_requests(self): + """ + :type: list of :class:`github.PullRequest.PullRequest` + """ + self._completeIfNotSet(self._pull_requests) + return self._pull_requests.value + + @property + def started_at(self): + """ + :type: datetime.datetime + """ + self._completeIfNotSet(self._started_at) + return self._started_at.value + + @property + def status(self): + """ + :type: string + """ + self._completeIfNotSet(self._status) + return self._status.value + + @property + def url(self): + """ + :type: string + """ + self._completeIfNotSet(self._url) + return self._url.value + + def get_annotations(self): + """ + :calls: `GET /repos/:owner/:repo/check-runs/:check_run_id/annotations `_ + :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CheckRunAnnotation.CheckRunAnnotation` + """ + return github.PaginatedList.PaginatedList( + github.CheckRunAnnotation.CheckRunAnnotation, + self._requester, + self.url + "/annotations", + None, + headers={"Accept": "application/vnd.github.v3+json"}, + ) + + def edit( + self, + name=github.GithubObject.NotSet, + head_sha=github.GithubObject.NotSet, + details_url=github.GithubObject.NotSet, + external_id=github.GithubObject.NotSet, + status=github.GithubObject.NotSet, + started_at=github.GithubObject.NotSet, + conclusion=github.GithubObject.NotSet, + completed_at=github.GithubObject.NotSet, + output=github.GithubObject.NotSet, + actions=github.GithubObject.NotSet, + ): + """ + :calls: `PATCH /repos/:owner/:repo/check-runs/:check_run_id `_ + :param name: string + :param head_sha: string + :param details_url: string + :param external_id: string + :param status: string + :param started_at: datetime.datetime + :param conclusion: string + :param completed_at: datetime.datetime + :param output: dict + :param actions: list of dict + :rtype: None + """ + assert name is github.GithubObject.NotSet or isinstance(name, str), name + assert head_sha is github.GithubObject.NotSet or isinstance( + head_sha, str + ), head_sha + assert details_url is github.GithubObject.NotSet or isinstance( + details_url, str + ), details_url + assert external_id is github.GithubObject.NotSet or isinstance( + external_id, str + ), external_id + assert status is github.GithubObject.NotSet or isinstance(status, str), status + assert started_at is github.GithubObject.NotSet or isinstance( + started_at, datetime.datetime + ), started_at + assert conclusion is github.GithubObject.NotSet or isinstance( + conclusion, str + ), conclusion + assert completed_at is github.GithubObject.NotSet or isinstance( + completed_at, datetime.datetime + ), completed_at + assert output is github.GithubObject.NotSet or isinstance(output, dict), output + assert actions is github.GithubObject.NotSet or all( + isinstance(element, dict) for element in actions + ), actions + + post_parameters = dict() + if name is not github.GithubObject.NotSet: + post_parameters["name"] = name + if head_sha is not github.GithubObject.NotSet: + post_parameters["head_sha"] = head_sha + if details_url is not github.GithubObject.NotSet: + post_parameters["details_url"] = details_url + if external_id is not github.GithubObject.NotSet: + post_parameters["external_id"] = external_id + if status is not github.GithubObject.NotSet: + post_parameters["status"] = status + if started_at is not github.GithubObject.NotSet: + post_parameters["started_at"] = started_at.strftime("%Y-%m-%dT%H:%M:%SZ") + if completed_at is not github.GithubObject.NotSet: + post_parameters["completed_at"] = completed_at.strftime( + "%Y-%m-%dT%H:%M:%SZ" + ) + if conclusion is not github.GithubObject.NotSet: + post_parameters["conclusion"] = conclusion + if output is not github.GithubObject.NotSet: + post_parameters["output"] = output + if actions is not github.GithubObject.NotSet: + post_parameters["actions"] = actions + + headers, data = self._requester.requestJsonAndCheck( + "PATCH", self.url, input=post_parameters + ) + self._useAttributes(data) + + def _initAttributes(self): + self._app = github.GithubObject.NotSet + self._check_suite_id = github.GithubObject.NotSet + self._completed_at = github.GithubObject.NotSet + self._conclusion = github.GithubObject.NotSet + self._details_url = github.GithubObject.NotSet + self._external_id = github.GithubObject.NotSet + self._head_sha = github.GithubObject.NotSet + self._html_url = github.GithubObject.NotSet + self._id = github.GithubObject.NotSet + self._name = github.GithubObject.NotSet + self._node_id = github.GithubObject.NotSet + self._output = github.GithubObject.NotSet + self._output = github.GithubObject.NotSet + self._pull_requests = github.GithubObject.NotSet + self._started_at = github.GithubObject.NotSet + self._status = github.GithubObject.NotSet + self._url = github.GithubObject.NotSet + + def _useAttributes(self, attributes): + if "app" in attributes: # pragma no branch + self._app = self._makeClassAttribute( + github.GithubApp.GithubApp, attributes["app"] + ) + # This only gives us a dictionary with `id` attribute of `check_suite` + if ( + "check_suite" in attributes and "id" in attributes["check_suite"] + ): # pragma no branch + self._check_suite_id = self._makeIntAttribute( + attributes["check_suite"]["id"] + ) + if "completed_at" in attributes: # pragma no branch + self._completed_at = self._makeDatetimeAttribute(attributes["completed_at"]) + if "conclusion" in attributes: # pragma no branch + self._conclusion = self._makeStringAttribute(attributes["conclusion"]) + if "details_url" in attributes: # pragma no branch + self._details_url = self._makeStringAttribute(attributes["details_url"]) + if "external_id" in attributes: # pragma no branch + self._external_id = self._makeStringAttribute(attributes["external_id"]) + if "head_sha" in attributes: # pragma no branch + self._head_sha = self._makeStringAttribute(attributes["head_sha"]) + if "html_url" in attributes: # pragma no branch + self._html_url = self._makeStringAttribute(attributes["html_url"]) + if "id" in attributes: # pragma no branch + self._id = self._makeIntAttribute(attributes["id"]) + if "name" in attributes: # pragma no branch + self._name = self._makeStringAttribute(attributes["name"]) + if "node_id" in attributes: # pragma no branch + self._node_id = self._makeStringAttribute(attributes["node_id"]) + if "output" in attributes: # pragma no branch + self._output = self._makeClassAttribute( + github.CheckRunOutput.CheckRunOutput, attributes["output"] + ) + if "pull_requests" in attributes: # pragma no branch + self._pull_requests = self._makeListOfClassesAttribute( + github.PullRequest.PullRequest, attributes["pull_requests"] + ) + if "started_at" in attributes: # pragma no branch + self._started_at = self._makeDatetimeAttribute(attributes["started_at"]) + if "status" in attributes: # pragma no branch + self._status = self._makeStringAttribute(attributes["status"]) + if "url" in attributes: # pragma no branch + self._url = self._makeStringAttribute(attributes["url"]) diff --git a/github/CheckRun.pyi b/github/CheckRun.pyi new file mode 100644 index 00000000..10cfda8d --- /dev/null +++ b/github/CheckRun.pyi @@ -0,0 +1,62 @@ +from datetime import datetime +from typing import Any, Dict, List, Union + +from github.CheckRunAnnotation import CheckRunAnnotation +from github.CheckRunOutput import CheckRunOutput +from github.GithubApp import GithubApp +from github.GithubObject import CompletableGithubObject, _NotSetType +from github.PaginatedList import PaginatedList +from github.PullRequest import PullRequest + +class CheckRun(CompletableGithubObject): + def __repr__(self) -> str: ... + def _initAttributes(self) -> None: ... + def _useAttributes(self, attributes: Dict[str, Any]) -> None: ... + def get_annotations(self) -> PaginatedList[CheckRunAnnotation]: ... + def edit( + self, + name: Union[_NotSetType, str] = ..., + head_sha: Union[_NotSetType, str] = ..., + details_url: Union[_NotSetType, str] = ..., + external_id: Union[_NotSetType, str] = ..., + status: Union[_NotSetType, str] = ..., + started_at: Union[_NotSetType, datetime] = ..., + conclusion: Union[_NotSetType, str] = ..., + completed_at: Union[_NotSetType, datetime] = ..., + output: Union[ + _NotSetType, Dict[str, Union[str, List[Dict[str, Union[str, int]]]]] + ] = ..., + actions: Union[_NotSetType, List[Dict[str, str]]] = ..., + ) -> None: ... + @property + def app(self) -> GithubApp: ... + @property + def check_suite_id(self) -> int: ... + @property + def completed_at(self) -> datetime: ... + @property + def conclusion(self) -> str: ... + @property + def details_url(self) -> str: ... + @property + def external_id(self) -> str: ... + @property + def head_sha(self) -> str: ... + @property + def html_url(self) -> str: ... + @property + def id(self) -> int: ... + @property + def name(self) -> str: ... + @property + def node_id(self) -> str: ... + @property + def output(self) -> CheckRunOutput: ... + @property + def pull_requests(self) -> List[PullRequest]: ... + @property + def started_at(self) -> datetime: ... + @property + def status(self) -> str: ... + @property + def url(self) -> str: ... diff --git a/github/CheckRunAnnotation.py b/github/CheckRunAnnotation.py new file mode 100644 index 00000000..a1e833d4 --- /dev/null +++ b/github/CheckRunAnnotation.py @@ -0,0 +1,131 @@ +# -*- coding: utf-8 -*- + +############################ Copyrights and license ############################ +# # +# Copyright 2020 Dhruv Manilawala # +# # +# This file is part of PyGithub. # +# http://pygithub.readthedocs.io/ # +# # +# PyGithub is free software: you can redistribute it and/or modify it under # +# the terms of the GNU Lesser General Public License as published by the Free # +# Software Foundation, either version 3 of the License, or (at your option) # +# any later version. # +# # +# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # +# details. # +# # +# You should have received a copy of the GNU Lesser General Public License # +# along with PyGithub. If not, see . # +# # +################################################################################ + +import github.GithubObject + + +class CheckRunAnnotation(github.GithubObject.NonCompletableGithubObject): + """ + This class represents check run annotations. + The reference can be found here: https://docs.github.com/en/rest/reference/checks#list-check-run-annotations + """ + + def __repr__(self): + return self.get__repr__({"title": self._title.value}) + + @property + def annotation_level(self): + """ + :type: string + """ + return self._annotation_level.value + + @property + def end_column(self): + """ + :type: integer + """ + return self._end_column.value + + @property + def end_line(self): + """ + :type: integer + """ + return self._end_line.value + + @property + def message(self): + """ + :type: string + """ + return self._message.value + + @property + def path(self): + """ + :type: string + """ + return self._path.value + + @property + def raw_details(self): + """ + :type: string + """ + return self._raw_details.value + + @property + def start_column(self): + """ + :type: integer + """ + return self._start_column.value + + @property + def start_line(self): + """ + :type: integer + """ + return self._start_line.value + + @property + def title(self): + """ + :type: string + """ + return self._title.value + + def _initAttributes(self): + self._annotation_level = github.GithubObject.NotSet + self._end_column = github.GithubObject.NotSet + self._end_line = github.GithubObject.NotSet + self._message = github.GithubObject.NotSet + self._path = github.GithubObject.NotSet + self._raw_details = github.GithubObject.NotSet + self._start_column = github.GithubObject.NotSet + self._start_line = github.GithubObject.NotSet + self._title = github.GithubObject.NotSet + + def _useAttributes(self, attributes): + if "annotation_level" in attributes: # pragma no branch + self._annotation_level = self._makeStringAttribute( + attributes["annotation_level"] + ) + if "end_column" in attributes: # pragma no branch + self._end_column = self._makeIntAttribute(attributes["end_column"]) + if "end_line" in attributes: # pragma no branch + self._end_line = self._makeIntAttribute(attributes["end_line"]) + if "message" in attributes: # pragma no branch + self._message = self._makeStringAttribute(attributes["message"]) + if "path" in attributes: # pragma no branch + self._path = self._makeStringAttribute(attributes["path"]) + if "raw_details" in attributes: # pragma no branch + self._raw_details = self._makeStringAttribute(attributes["raw_details"]) + if "start_column" in attributes: # pragma no branch + self._start_column = self._makeIntAttribute(attributes["start_column"]) + if "start_line" in attributes: # pragma no branch + self._start_line = self._makeIntAttribute(attributes["start_line"]) + if "title" in attributes: # pragma no branch + self._title = self._makeStringAttribute(attributes["title"]) diff --git a/github/CheckRunAnnotation.pyi b/github/CheckRunAnnotation.pyi new file mode 100644 index 00000000..263f5abb --- /dev/null +++ b/github/CheckRunAnnotation.pyi @@ -0,0 +1,26 @@ +from typing import Any, Dict + +from github.GithubObject import NonCompletableGithubObject + +class CheckRunAnnotation(NonCompletableGithubObject): + def __repr__(self) -> str: ... + def _initAttributes(self) -> None: ... + def _useAttributes(self, attributes: Dict[str, Any]) -> None: ... + @property + def annotation_level(self) -> str: ... + @property + def end_column(self) -> int: ... + @property + def end_line(self) -> int: ... + @property + def message(self) -> str: ... + @property + def path(self) -> str: ... + @property + def raw_details(self) -> str: ... + @property + def start_column(self) -> int: ... + @property + def start_line(self) -> int: ... + @property + def title(self) -> str: ... diff --git a/github/CheckRunOutput.py b/github/CheckRunOutput.py new file mode 100644 index 00000000..35cd9ed7 --- /dev/null +++ b/github/CheckRunOutput.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- + +############################ Copyrights and license ############################ +# # +# Copyright 2020 Dhruv Manilawala # +# # +# This file is part of PyGithub. # +# http://pygithub.readthedocs.io/ # +# # +# PyGithub is free software: you can redistribute it and/or modify it under # +# the terms of the GNU Lesser General Public License as published by the Free # +# Software Foundation, either version 3 of the License, or (at your option) # +# any later version. # +# # +# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # +# details. # +# # +# You should have received a copy of the GNU Lesser General Public License # +# along with PyGithub. If not, see . # +# # +################################################################################ + +import github.GithubObject + + +class CheckRunOutput(github.GithubObject.NonCompletableGithubObject): + """This class represents the output of check run.""" + + def __repr__(self): + return self.get__repr__({"title": self._title.value}) + + @property + def annotations_count(self): + """ + :type: integer + """ + return self._annotations_count.value + + @property + def annotations_url(self): + """ + :type: string + """ + return self._annotations_url.value + + @property + def summary(self): + """ + :type: string + """ + return self._summary.value + + @property + def text(self): + """ + :type: string + """ + return self._text.value + + @property + def title(self): + """ + :type: string + """ + return self._title.value + + def _initAttributes(self): + self._annotations_count = github.GithubObject.NotSet + self._annotations_url = github.GithubObject.NotSet + self._summary = github.GithubObject.NotSet + self._text = github.GithubObject.NotSet + self._title = github.GithubObject.NotSet + + def _useAttributes(self, attributes): + if "annotations_count" in attributes: # pragma no branch + self._annotations_count = self._makeIntAttribute( + attributes["annotations_count"] + ) + if "annotations_url" in attributes: # pragma no branch + self._annotations_url = self._makeStringAttribute( + attributes["annotations_url"] + ) + if "summary" in attributes: # pragma no branch + self._summary = self._makeStringAttribute(attributes["summary"]) + if "text" in attributes: # pragma no branch + self._text = self._makeStringAttribute(attributes["text"]) + if "title" in attributes: # pragma no branch + self._title = self._makeStringAttribute(attributes["title"]) diff --git a/github/CheckRunOutput.pyi b/github/CheckRunOutput.pyi new file mode 100644 index 00000000..1ab8763e --- /dev/null +++ b/github/CheckRunOutput.pyi @@ -0,0 +1,18 @@ +from typing import Any, Dict + +from github.GithubObject import NonCompletableGithubObject + +class CheckRunOutput(NonCompletableGithubObject): + def __repr__(self) -> str: ... + def _initAttributes(self) -> None: ... + def _useAttributes(self, attributes: Dict[str, Any]) -> None: ... + @property + def annotations_count(self) -> int: ... + @property + def annotations_url(self) -> str: ... + @property + def summary(self) -> str: ... + @property + def text(self) -> str: ... + @property + def title(self) -> str: ... diff --git a/github/Commit.py b/github/Commit.py index b3c691d5..cb738586 100644 --- a/github/Commit.py +++ b/github/Commit.py @@ -32,6 +32,7 @@ # # ################################################################################ +import github.CheckRun import github.CommitCombinedStatus import github.CommitComment import github.CommitStats @@ -258,6 +259,40 @@ class Commit(github.GithubObject.CompletableGithubObject): headers={"Accept": "application/vnd.github.groot-preview+json"}, ) + def get_check_runs( + self, + check_name=github.GithubObject.NotSet, + status=github.GithubObject.NotSet, + filter=github.GithubObject.NotSet, + ): + """ + :calls: `GET /repos/:owner/:repo/commits/:sha/check-runs `_ + :param check_name: string + :param status: string + :param filter: string + :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CheckRun.CheckRun` + """ + assert check_name is github.GithubObject.NotSet or isinstance( + check_name, str + ), check_name + assert status is github.GithubObject.NotSet or isinstance(status, str), status + assert filter is github.GithubObject.NotSet or isinstance(filter, str), filter + url_parameters = dict() + if check_name is not github.GithubObject.NotSet: + url_parameters["check_name"] = check_name + if status is not github.GithubObject.NotSet: + url_parameters["status"] = status + if status is not github.GithubObject.NotSet: + url_parameters["filter"] = filter + return github.PaginatedList.PaginatedList( + github.CheckRun.CheckRun, + self._requester, + self.url + "/check-runs", + url_parameters, + headers={"Accept": "application/vnd.github.v3+json"}, + list_item="check_runs", + ) + @property def _identity(self): return self.sha diff --git a/github/Commit.pyi b/github/Commit.pyi index 56f88b0b..a57ff6e2 100644 --- a/github/Commit.pyi +++ b/github/Commit.pyi @@ -1,5 +1,6 @@ from typing import Any, Dict, List, Union +from github.CheckRun import CheckRun from github.CommitCombinedStatus import CommitCombinedStatus from github.CommitComment import CommitComment from github.CommitStats import CommitStats @@ -43,6 +44,12 @@ class Commit(CompletableGithubObject): def get_combined_status(self) -> CommitCombinedStatus: ... def get_comments(self) -> PaginatedList[GitCommit]: ... def get_statuses(self) -> PaginatedList[CommitStatus]: ... + def get_check_runs( + self, + check_name: Union[_NotSetType, str] = ..., + status: Union[_NotSetType, str] = ..., + filter: Union[_NotSetType, str] = ..., + ) -> PaginatedList[CheckRun]: ... @property def html_url(self) -> str: ... @property diff --git a/github/Repository.py b/github/Repository.py index d211188f..59a3f9f1 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -93,6 +93,7 @@ from base64 import b64encode from deprecated import deprecated import github.Branch +import github.CheckRun import github.Clones import github.Commit import github.CommitComment @@ -3453,6 +3454,98 @@ class Repository(github.GithubObject.CompletableGithubObject): self._requester, resp_headers, data, completed=True ) + def create_check_run( + self, + name, + head_sha, + details_url=github.GithubObject.NotSet, + external_id=github.GithubObject.NotSet, + status=github.GithubObject.NotSet, + started_at=github.GithubObject.NotSet, + conclusion=github.GithubObject.NotSet, + completed_at=github.GithubObject.NotSet, + output=github.GithubObject.NotSet, + actions=github.GithubObject.NotSet, + ): + """ + :calls: `POST /repos/:owner/:repo/check-runs `_ + :param name: string + :param head_sha: string + :param details_url: string + :param external_id: string + :param status: string + :param started_at: datetime.datetime + :param conclusion: string + :param completed_at: datetime.datetime + :param output: dict + :param actions: list of dict + :rtype: :class:`github.CheckRun.CheckRun` + """ + assert isinstance(name, str), name + assert isinstance(head_sha, str), head_sha + assert details_url is github.GithubObject.NotSet or isinstance( + details_url, str + ), details_url + assert external_id is github.GithubObject.NotSet or isinstance( + external_id, str + ), external_id + assert status is github.GithubObject.NotSet or isinstance(status, str), status + assert started_at is github.GithubObject.NotSet or isinstance( + started_at, datetime.datetime + ), started_at + assert conclusion is github.GithubObject.NotSet or isinstance( + conclusion, str + ), conclusion + assert completed_at is github.GithubObject.NotSet or isinstance( + completed_at, datetime.datetime + ), completed_at + assert output is github.GithubObject.NotSet or isinstance(output, dict), output + assert actions is github.GithubObject.NotSet or all( + isinstance(element, dict) for element in actions + ), actions + + post_parameters = { + "name": name, + "head_sha": head_sha, + } + if details_url is not github.GithubObject.NotSet: + post_parameters["details_url"] = details_url + if external_id is not github.GithubObject.NotSet: + post_parameters["external_id"] = external_id + if status is not github.GithubObject.NotSet: + post_parameters["status"] = status + if started_at is not github.GithubObject.NotSet: + post_parameters["started_at"] = started_at.strftime("%Y-%m-%dT%H:%M:%SZ") + if completed_at is not github.GithubObject.NotSet: + post_parameters["completed_at"] = completed_at.strftime( + "%Y-%m-%dT%H:%M:%SZ" + ) + if conclusion is not github.GithubObject.NotSet: + post_parameters["conclusion"] = conclusion + if output is not github.GithubObject.NotSet: + post_parameters["output"] = output + if actions is not github.GithubObject.NotSet: + post_parameters["actions"] = actions + + headers, data = self._requester.requestJsonAndCheck( + "POST", + self.url + "/check-runs", + input=post_parameters, + ) + return github.CheckRun.CheckRun(self._requester, headers, data, completed=True) + + def get_check_run(self, check_run_id): + """ + :calls: `GET /repos/:owner/:repo/check-runs/:check_run_id `_ + :param check_run_id: int + :rtype: :class:`github.CheckRun.CheckRun` + """ + assert isinstance(check_run_id, int), check_run_id + headers, data = self._requester.requestJsonAndCheck( + "GET", self.url + "/check-runs/" + str(check_run_id) + ) + return github.CheckRun.CheckRun(self._requester, headers, data, completed=True) + def _initAttributes(self): self._allow_merge_commit = github.GithubObject.NotSet self._allow_rebase_merge = github.GithubObject.NotSet diff --git a/github/Repository.pyi b/github/Repository.pyi index 32947f90..8a3aab9b 100644 --- a/github/Repository.pyi +++ b/github/Repository.pyi @@ -3,6 +3,7 @@ from typing import Any, Dict, List, Optional, Union, overload from github.AuthenticatedUser import AuthenticatedUser from github.Branch import Branch +from github.CheckRun import CheckRun from github.Clones import Clones from github.Commit import Commit from github.CommitComment import CommitComment @@ -98,6 +99,19 @@ class Repository(CompletableGithubObject): def contents_url(self) -> str: ... @property def contributors_url(self) -> str: ... + def create_check_run( + self, + name: str = ..., + head_sha: str = ..., + details_url: Union[_NotSetType, str] = ..., + external_id: Union[_NotSetType, str] = ..., + status: Union[_NotSetType, str] = ..., + started_at: Union[_NotSetType, datetime] = ..., + conclusion: Union[_NotSetType, str] = ..., + completed_at: Union[_NotSetType, datetime] = ..., + output: Union[_NotSetType, Dict[str, Union[str, List[Dict[str, Union[str, int]]]]]] = ..., + actions: Union[_NotSetType, List[Dict[str, str]]] = ..., + ) -> CheckRun: ... def create_file( self, path: str, @@ -254,6 +268,7 @@ class Repository(CompletableGithubObject): def get_assignees(self) -> PaginatedList[NamedUser]: ... def get_branch(self, branch: str) -> Branch: ... def get_branches(self) -> PaginatedList[Branch]: ... + def get_check_run(self, check_run_id: int) -> CheckRun: ... def get_clones_traffic( self, per: Union[str, _NotSetType] = ... ) -> Dict[str, Union[int, List[Clones]]]: ... diff --git a/tests/CheckRun.py b/tests/CheckRun.py new file mode 100644 index 00000000..50b586fc --- /dev/null +++ b/tests/CheckRun.py @@ -0,0 +1,343 @@ +# -*- coding: utf-8 -*- + +############################ Copyrights and license ############################ +# # +# Copyright 2020 Dhruv Manilawala # +# # +# This file is part of PyGithub. # +# http://pygithub.readthedocs.io/ # +# # +# PyGithub is free software: you can redistribute it and/or modify it under # +# the terms of the GNU Lesser General Public License as published by the Free # +# Software Foundation, either version 3 of the License, or (at your option) # +# any later version. # +# # +# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # +# details. # +# # +# You should have received a copy of the GNU Lesser General Public License # +# along with PyGithub. If not, see . # +# # +################################################################################ + +import datetime + +from . import Framework + + +class CheckRun(Framework.TestCase): + def setUp(self): + super().setUp() + self.repo = self.g.get_repo("PyGithub/PyGithub") + self.testrepo = self.g.get_repo("dhruvmanila/pygithub-testing") + self.check_run_id = 1039891953 + self.check_run_ref = "6bc9ecc8c849df4e45e60c1e6a5df8876180a20a" + self.check_run = self.repo.get_check_run(self.check_run_id) + self.commit = self.repo.get_commit(self.check_run_ref) + + def testAttributes(self): + self.assertEqual(self.check_run.app.id, 15368) + self.assertEqual(self.check_run.app.slug, "github-actions") + self.assertEqual(self.check_run.check_suite_id, 1110219217) + self.assertEqual( + self.check_run.completed_at, datetime.datetime(2020, 8, 28, 4, 21, 21) + ) + self.assertEqual(self.check_run.conclusion, "success") + self.assertEqual( + self.check_run.details_url, + "https://github.com/PyGithub/PyGithub/runs/1039891953", + ) + self.assertEqual( + self.check_run.external_id, "6b512fe7-587c-5ecc-c4a3-03b7358c152d" + ) + self.assertEqual( + self.check_run.head_sha, "6bc9ecc8c849df4e45e60c1e6a5df8876180a20a" + ) + self.assertEqual( + self.check_run.html_url, + "https://github.com/PyGithub/PyGithub/runs/1039891953", + ) + self.assertEqual(self.check_run.id, 1039891953) + self.assertEqual(self.check_run.name, "test (Python 3.8)") + self.assertEqual(self.check_run.node_id, "MDg6Q2hlY2tSdW4xMDM5ODkxOTUz") + self.assertEqual(self.check_run.output.annotations_count, 0) + self.assertEqual(len(self.check_run.pull_requests), 0) + self.assertEqual( + self.check_run.started_at, datetime.datetime(2020, 8, 28, 4, 20, 27) + ) + self.assertEqual(self.check_run.status, "completed") + self.assertEqual( + self.check_run.url, + "https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953", + ) + self.assertEqual( + repr(self.check_run), 'CheckRun(id=1039891953, conclusion="success")' + ) + + def testCheckRunOutputAttributes(self): + check_run_output = self.repo.get_check_run(1039891917).output + self.assertEqual(check_run_output.title, "test (Python 3.6)") + self.assertEqual( + check_run_output.summary, + "There are 1 failures, 0 warnings, and 0 notices.", + ) + self.assertIsNone(check_run_output.text) + self.assertEqual(check_run_output.annotations_count, 1) + self.assertEqual( + check_run_output.annotations_url, + "https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917/annotations", + ) + self.assertEqual( + repr(check_run_output), 'CheckRunOutput(title="test (Python 3.6)")' + ) + + def testGetCheckRunsForRef(self): + check_runs = self.commit.get_check_runs() + self.assertEqual(check_runs.totalCount, 4) + self.assertListEqual( + [check_run.id for check_run in check_runs], + [1039891953, 1039891931, 1039891917, 1039891902], + ) + + def testGetCheckRunsForRefFilterByCheckName(self): + check_runs = self.commit.get_check_runs(check_name="test (Python 3.6)") + self.assertEqual(check_runs.totalCount, 1) + self.assertListEqual([check_run.id for check_run in check_runs], [1039891917]) + + def testGetCheckRunsForRefFilterByStatus(self): + completed_check_runs = self.commit.get_check_runs(status="completed") + self.assertEqual(completed_check_runs.totalCount, 4) + self.assertListEqual( + [check_run.id for check_run in completed_check_runs], + [1039891953, 1039891931, 1039891917, 1039891902], + ) + queued_check_runs = self.commit.get_check_runs(status="queued") + self.assertEqual(queued_check_runs.totalCount, 0) + in_progress_check_runs = self.commit.get_check_runs(status="in_progress") + self.assertEqual(in_progress_check_runs.totalCount, 0) + + def testGetCheckRunsForRefFilterByFilter(self): + latest_check_runs = self.commit.get_check_runs(filter="latest") + all_check_runs = self.commit.get_check_runs(filter="all") + self.assertEqual(latest_check_runs.totalCount, 4) + self.assertListEqual( + [check_run.id for check_run in latest_check_runs], + [1039891953, 1039891931, 1039891917, 1039891902], + ) + self.assertEqual(all_check_runs.totalCount, 4) + self.assertListEqual( + [check_run.id for check_run in all_check_runs], + [1039891953, 1039891931, 1039891917, 1039891902], + ) + + def testCreateCheckRunInProgress(self): + check_run = self.testrepo.create_check_run( + name="basic_check_run", + head_sha="0283d46537193f1fed7d46859f15c5304b9836f9", + status="in_progress", + external_id="50", + details_url="https://www.example.com", + started_at=datetime.datetime(2020, 9, 4, 1, 14, 52), + output={"title": "PyGithub Check Run Test", "summary": "Test summary"}, + ) + self.assertEqual(check_run.name, "basic_check_run") + self.assertEqual(check_run.head_sha, "0283d46537193f1fed7d46859f15c5304b9836f9") + self.assertEqual(check_run.status, "in_progress") + self.assertEqual(check_run.external_id, "50") + self.assertEqual(check_run.started_at, datetime.datetime(2020, 9, 4, 1, 14, 52)) + self.assertEqual(check_run.output.title, "PyGithub Check Run Test") + self.assertEqual(check_run.output.summary, "Test summary") + self.assertIsNone(check_run.output.text) + self.assertEqual(check_run.output.annotations_count, 0) + # We don't want to keep this hanging + check_run.edit(conclusion="success") + self.assertEqual(check_run.conclusion, "success") + self.assertEqual(check_run.status, "completed") + + def testCreateCheckRunCompleted(self): + check_run = self.testrepo.create_check_run( + name="completed_check_run", + head_sha="0283d46537193f1fed7d46859f15c5304b9836f9", + status="completed", + started_at=datetime.datetime(2020, 10, 20, 10, 30, 29), + conclusion="success", + completed_at=datetime.datetime(2020, 10, 20, 11, 30, 50), + output={ + "title": "Readme report", + "summary": "There are 0 failures, 2 warnings, and 1 notices.", + "text": "You may have some misspelled words on lines 2 and 4.", + "annotations": [ + { + "path": "README.md", + "annotation_level": "warning", + "title": "Spell Checker", + "message": "Check your spelling for 'banaas'.", + "raw_details": "Do you mean 'bananas' or 'banana'?", + "start_line": 2, + "end_line": 2, + }, + { + "path": "README.md", + "annotation_level": "warning", + "title": "Spell Checker", + "message": "Check your spelling for 'aples'", + "raw_details": "Do you mean 'apples' or 'Naples'", + "start_line": 4, + "end_line": 4, + }, + ], + "images": [ + { + "alt": "Test Image", + "image_url": "http://example.com/images/42", + } + ], + }, + actions=[ + { + "label": "Fix", + "identifier": "fix_errors", + "description": "Allow us to fix these errors for you", + } + ], + ) + self.assertEqual(check_run.name, "completed_check_run") + self.assertEqual(check_run.head_sha, "0283d46537193f1fed7d46859f15c5304b9836f9") + self.assertEqual(check_run.status, "completed") + self.assertEqual( + check_run.started_at, datetime.datetime(2020, 10, 20, 10, 30, 29) + ), + self.assertEqual(check_run.conclusion, "success") + self.assertEqual( + check_run.completed_at, datetime.datetime(2020, 10, 20, 11, 30, 50) + ), + self.assertEqual(check_run.output.annotations_count, 2) + + def testUpdateCheckRunSuccess(self): + # This is a different check run created for this test + check_run = self.testrepo.create_check_run( + name="edit_check_run", + head_sha="0283d46537193f1fed7d46859f15c5304b9836f9", + status="in_progress", + external_id="100", + started_at=datetime.datetime(2020, 10, 20, 14, 24, 31), + output={"title": "Check run for testing edit method", "summary": ""}, + ) + self.assertEqual(check_run.name, "edit_check_run") + self.assertEqual(check_run.status, "in_progress") + check_run.edit( + status="completed", + conclusion="success", + output={ + "title": "Check run for testing edit method", + "summary": "This is the summary of editing check run as completed.", + }, + ) + self.assertEqual(check_run.name, "edit_check_run") + self.assertEqual(check_run.status, "completed") + self.assertEqual(check_run.conclusion, "success") + self.assertEqual(check_run.output.title, "Check run for testing edit method") + self.assertEqual( + check_run.output.summary, + "This is the summary of editing check run as completed.", + ) + self.assertEqual(check_run.output.annotations_count, 0) + + def testUpdateCheckRunFailure(self): + # This is a different check run created for this test + check_run = self.testrepo.create_check_run( + name="fail_check_run", + head_sha="0283d46537193f1fed7d46859f15c5304b9836f9", + status="in_progress", + external_id="101", + started_at=datetime.datetime(2020, 10, 20, 10, 14, 51), + output={"title": "Check run for testing failure", "summary": ""}, + ) + self.assertEqual(check_run.name, "fail_check_run") + self.assertEqual(check_run.status, "in_progress") + check_run.edit( + status="completed", + conclusion="failure", + output={ + "title": "Check run for testing failure", + "summary": "There is 1 whitespace error.", + "text": "You may have a whitespace error in the file 'test.py'", + "annotations": [ + { + "path": "test.py", + "annotation_level": "failure", + "title": "whitespace checker", + "message": "Remove the unnecessary whitespace from the file.", + "start_line": 2, + "end_line": 2, + "start_column": 17, + "end_column": 18, + } + ], + }, + actions=[ + { + "label": "Fix", + "identifier": "fix_errors", + "description": "Allow us to fix these errors for you", + } + ], + ) + self.assertEqual(check_run.status, "completed") + self.assertEqual(check_run.conclusion, "failure") + self.assertEqual(check_run.output.annotations_count, 1) + + def testUpdateCheckRunAll(self): + check_run = self.testrepo.get_check_run(1279259090) + check_run.edit( + name="update_all_params", + head_sha="0283d46537193f1fed7d46859f15c5304b9836f9", + details_url="https://www.example-url.com", + external_id="49", + started_at=datetime.datetime(2020, 10, 20, 1, 10, 20), + completed_at=datetime.datetime(2020, 10, 20, 2, 20, 30), + actions=[ + { + "label": "Hello World!", + "identifier": "identity", + "description": "Hey! This is a test", + } + ], + ) + self.assertEqual(check_run.name, "update_all_params") + self.assertEqual(check_run.head_sha, "0283d46537193f1fed7d46859f15c5304b9836f9") + self.assertEqual(check_run.details_url, "https://www.example-url.com") + self.assertEqual(check_run.external_id, "49") + self.assertEqual( + check_run.started_at, datetime.datetime(2020, 10, 20, 1, 10, 20) + ) + self.assertEqual( + check_run.completed_at, datetime.datetime(2020, 10, 20, 2, 20, 30) + ) + + def testCheckRunAnnotationAttributes(self): + check_run = self.testrepo.get_check_run(1280914700) + self.assertEqual(check_run.name, "annotations") + annotation = check_run.get_annotations()[0] + self.assertEqual(annotation.annotation_level, "warning") + self.assertIsNone(annotation.end_column) + self.assertEqual(annotation.end_line, 2) + self.assertEqual(annotation.message, "Check your spelling for 'banaas'.") + self.assertEqual(annotation.path, "README.md") + self.assertEqual(annotation.raw_details, "Do you mean 'bananas' or 'banana'?") + self.assertIsNone(annotation.start_column) + self.assertEqual(annotation.start_line, 2) + self.assertEqual(annotation.title, "Spell Checker") + self.assertEqual(repr(annotation), 'CheckRunAnnotation(title="Spell Checker")') + + def testListCheckRunAnnotations(self): + check_run = self.testrepo.get_check_run(1280914700) + self.assertEqual(check_run.name, "annotations") + self.assertEqual(check_run.status, "completed") + annotation_list = check_run.get_annotations() + self.assertEqual(annotation_list.totalCount, 2) + self.assertListEqual( + [annotation.start_line for annotation in annotation_list], [2, 4] + ) diff --git a/tests/ReplayData/CheckRun.setUp.txt b/tests/ReplayData/CheckRun.setUp.txt new file mode 100644 index 00000000..89c5fe9b --- /dev/null +++ b/tests/ReplayData/CheckRun.setUp.txt @@ -0,0 +1,44 @@ +https +GET +api.github.com +None +/repos/PyGithub/PyGithub +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:29 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"3b6fa569ece26515a5a427bfd936d8b231c9e7e70f979ed93ec65b4e9a92dfe0"'), ('Last-Modified', 'Fri, 23 Oct 2020 01:43:15 GMT'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4847'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '153'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF5E:0A11:F41419:14F889A:5F924879')] +{"id":3544490,"node_id":"MDEwOlJlcG9zaXRvcnkzNTQ0NDkw","name":"PyGithub","full_name":"PyGithub/PyGithub","private":false,"owner":{"login":"PyGithub","id":11288996,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjg4OTk2","avatar_url":"https://avatars0.githubusercontent.com/u/11288996?v=4","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PyGithub/PyGithub","description":"Typed interactions with the GitHub API v3","fork":false,"url":"https://api.github.com/repos/PyGithub/PyGithub","forks_url":"https://api.github.com/repos/PyGithub/PyGithub/forks","keys_url":"https://api.github.com/repos/PyGithub/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PyGithub/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PyGithub/PyGithub/teams","hooks_url":"https://api.github.com/repos/PyGithub/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/PyGithub/PyGithub/events","assignees_url":"https://api.github.com/repos/PyGithub/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/PyGithub/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/PyGithub/PyGithub/tags","blobs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PyGithub/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/PyGithub/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PyGithub/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/PyGithub/PyGithub/languages","stargazers_url":"https://api.github.com/repos/PyGithub/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/PyGithub/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/PyGithub/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/PyGithub/PyGithub/subscription","commits_url":"https://api.github.com/repos/PyGithub/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/PyGithub/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/PyGithub/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/PyGithub/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PyGithub/PyGithub/merges","archive_url":"https://api.github.com/repos/PyGithub/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PyGithub/PyGithub/downloads","issues_url":"https://api.github.com/repos/PyGithub/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/PyGithub/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/PyGithub/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PyGithub/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/PyGithub/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/PyGithub/PyGithub/deployments","created_at":"2012-02-25T12:53:47Z","updated_at":"2020-10-23T01:43:15Z","pushed_at":"2020-10-22T19:14:07Z","git_url":"git://github.com/PyGithub/PyGithub.git","ssh_url":"git@github.com:PyGithub/PyGithub.git","clone_url":"https://github.com/PyGithub/PyGithub.git","svn_url":"https://github.com/PyGithub/PyGithub","homepage":"https://pygithub.readthedocs.io/","size":13024,"stargazers_count":3825,"watchers_count":3825,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1212,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":75,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":1212,"open_issues":75,"watchers":3825,"default_branch":"master","permissions":{"admin":false,"push":false,"pull":false},"temp_clone_token":"","organization":{"login":"PyGithub","id":11288996,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjg4OTk2","avatar_url":"https://avatars0.githubusercontent.com/u/11288996?v=4","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","site_admin":false},"network_count":1212,"subscribers_count":104} + +https +GET +api.github.com +None +/repos/dhruvmanila/pygithub-testing +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:29 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"0de7aded85e6a22a09013b0d210fad42df83268d23eaf29e9e6baa17308b2122"'), ('Last-Modified', 'Wed, 21 Oct 2020 17:12:01 GMT'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4846'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '154'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF5F:09F2:EC7EB1:1442E84:5F924879')] +{"id":305573836,"node_id":"MDEwOlJlcG9zaXRvcnkzMDU1NzM4MzY=","name":"pygithub-testing","full_name":"dhruvmanila/pygithub-testing","private":false,"owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dhruvmanila/pygithub-testing","description":"This repository is a hot bed for testing GitHub API endpoints for PyGithub.","fork":false,"url":"https://api.github.com/repos/dhruvmanila/pygithub-testing","forks_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/forks","keys_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/teams","hooks_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/hooks","issue_events_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/issues/events{/number}","events_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/events","assignees_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/assignees{/user}","branches_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/branches{/branch}","tags_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/tags","blobs_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/statuses/{sha}","languages_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/languages","stargazers_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/stargazers","contributors_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/contributors","subscribers_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/subscribers","subscription_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/subscription","commits_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/contents/{+path}","compare_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/merges","archive_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/downloads","issues_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/issues{/number}","pulls_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/pulls{/number}","milestones_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/milestones{/number}","notifications_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/labels{/name}","releases_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/releases{/id}","deployments_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/deployments","created_at":"2020-10-20T02:59:36Z","updated_at":"2020-10-21T17:12:01Z","pushed_at":"2020-10-20T02:59:38Z","git_url":"git://github.com/dhruvmanila/pygithub-testing.git","ssh_url":"git@github.com:dhruvmanila/pygithub-testing.git","clone_url":"https://github.com/dhruvmanila/pygithub-testing.git","svn_url":"https://github.com/dhruvmanila/pygithub-testing","homepage":null,"size":1,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"main","permissions":{"admin":false,"push":false,"pull":false},"temp_clone_token":"","network_count":0,"subscribers_count":1} + +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/check-runs/1039891953 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:30 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"7bd9e7cebc68da0d1818bc0cc91f78162e552ee14fdc0ebf7c960546a5f4fd08"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4845'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '155'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF60:66AD:C722F3:1125A6B:5F924879')] +{"id":1039891953,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTUz","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"6b512fe7-587c-5ecc-c4a3-03b7358c152d","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:21:21Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953/annotations"},"name":"test (Python 3.8)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]} + +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:30 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"e1285aae8d5d64943c72eb70a505f3accbb906a496ce25d54fb97f0c979b5a01"'), ('Last-Modified', 'Fri, 28 Aug 2020 04:20:12 GMT'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4844'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '156'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF61:6561:C6782F:110B51E:5F92487A')] +{"sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","node_id":"MDY6Q29tbWl0MzU0NDQ5MDo2YmM5ZWNjOGM4NDlkZjRlNDVlNjBjMWU2YTVkZjg4NzYxODBhMjBh","commit":{"author":{"name":"Neil Williams","email":"spladug@users.noreply.github.com","date":"2020-08-28T04:20:12Z"},"committer":{"name":"GitHub","email":"noreply@github.com","date":"2020-08-28T04:20:12Z"},"message":"Add get_timeline() to Issue's type stubs (#1663)\n\nAdd get_timeline() to Issue's type stubs","tree":{"sha":"196dc01e06f7bb631c18f76d620d7fac981194b5","url":"https://api.github.com/repos/PyGithub/PyGithub/git/trees/196dc01e06f7bb631c18f76d620d7fac981194b5"},"url":"https://api.github.com/repos/PyGithub/PyGithub/git/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","comment_count":0,"verification":{"verified":true,"reason":"valid","signature":"-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJfSIX8CRBK7hj4Ov3rIwAAdHIIAC7ARR4daWuDXZoA41Bk6QJC\nLwgikiCrNulUp0VYmrLoEE/sBY3YlVbQdYgS9ulYJcKyInd8hWQ31TG/SSyz1SRd\ncp8SD9bAu8SbqX4DWa6tV2XxopsabwQgWqGtJWzYIyuVFvdSuXGaZIjAo3VvWAuo\nZE+z5LJ99EHlnT2utyG4SyU3yZ+G8AHPB3X+9gkXq1jLpqBP2eGeWGRyEf7MqxQz\nQOPSQ/dtn4VmDt+p7TpfmZL87/t6/gol8bFKxxbtmNckDjoWTdFxf3CHTCNgZ+fW\nm2OgJc2UOttcAvegAFs5vAKpf4WABa+nEBG8qaG+Lg9IO3twYgYJ7WXW/YuSEPU=\n=O4Ol\n-----END PGP SIGNATURE-----\n","payload":"tree 196dc01e06f7bb631c18f76d620d7fac981194b5\nparent 743f5a58b0bce91c4eab744ff7e39dfca9e6e8a5\nauthor Neil Williams 1598588412 -0700\ncommitter GitHub 1598588412 +1000\n\nAdd get_timeline() to Issue's type stubs (#1663)\n\nAdd get_timeline() to Issue's type stubs"}},"url":"https://api.github.com/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","html_url":"https://github.com/PyGithub/PyGithub/commit/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/comments","author":{"login":"spladug","id":338853,"node_id":"MDQ6VXNlcjMzODg1Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/338853?v=4","gravatar_id":"","url":"https://api.github.com/users/spladug","html_url":"https://github.com/spladug","followers_url":"https://api.github.com/users/spladug/followers","following_url":"https://api.github.com/users/spladug/following{/other_user}","gists_url":"https://api.github.com/users/spladug/gists{/gist_id}","starred_url":"https://api.github.com/users/spladug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spladug/subscriptions","organizations_url":"https://api.github.com/users/spladug/orgs","repos_url":"https://api.github.com/users/spladug/repos","events_url":"https://api.github.com/users/spladug/events{/privacy}","received_events_url":"https://api.github.com/users/spladug/received_events","type":"User","site_admin":false},"committer":{"login":"web-flow","id":19864447,"node_id":"MDQ6VXNlcjE5ODY0NDQ3","avatar_url":"https://avatars3.githubusercontent.com/u/19864447?v=4","gravatar_id":"","url":"https://api.github.com/users/web-flow","html_url":"https://github.com/web-flow","followers_url":"https://api.github.com/users/web-flow/followers","following_url":"https://api.github.com/users/web-flow/following{/other_user}","gists_url":"https://api.github.com/users/web-flow/gists{/gist_id}","starred_url":"https://api.github.com/users/web-flow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/web-flow/subscriptions","organizations_url":"https://api.github.com/users/web-flow/orgs","repos_url":"https://api.github.com/users/web-flow/repos","events_url":"https://api.github.com/users/web-flow/events{/privacy}","received_events_url":"https://api.github.com/users/web-flow/received_events","type":"User","site_admin":false},"parents":[{"sha":"743f5a58b0bce91c4eab744ff7e39dfca9e6e8a5","url":"https://api.github.com/repos/PyGithub/PyGithub/commits/743f5a58b0bce91c4eab744ff7e39dfca9e6e8a5","html_url":"https://github.com/PyGithub/PyGithub/commit/743f5a58b0bce91c4eab744ff7e39dfca9e6e8a5"}],"stats":{"total":2,"additions":2,"deletions":0},"files":[{"sha":"b1290df61bbcf8340f0752649358ec7f080b77fd","filename":"github/Issue.pyi","status":"modified","additions":2,"deletions":0,"changes":2,"blob_url":"https://github.com/PyGithub/PyGithub/blob/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/github/Issue.pyi","raw_url":"https://github.com/PyGithub/PyGithub/raw/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/github/Issue.pyi","contents_url":"https://api.github.com/repos/PyGithub/PyGithub/contents/github/Issue.pyi?ref=6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","patch":"@@ -12,6 +12,7 @@ from github.PaginatedList import PaginatedList\n from github.PullRequest import PullRequest\n from github.Reaction import Reaction\n from github.Repository import Repository\n+from github.TimelineEvent import TimelineEvent\n \n class Issue(CompletableGithubObject):\n def __repr__(self) -> str: ...\n@@ -40,6 +41,7 @@ class Issue(CompletableGithubObject):\n def comments_url(self) -> str: ...\n def create_comment(self, body: str) -> IssueComment: ...\n def create_reaction(self, reaction_type: str) -> Reaction: ...\n+ def get_timeline(self) -> PaginatedList[TimelineEvent]: ...\n @property\n def created_at(self) -> datetime: ...\n def delete_labels(self) -> None: ..."}]} + diff --git a/tests/ReplayData/CheckRun.testCheckRunAnnotationAttributes.txt b/tests/ReplayData/CheckRun.testCheckRunAnnotationAttributes.txt new file mode 100644 index 00000000..ca2607dc --- /dev/null +++ b/tests/ReplayData/CheckRun.testCheckRunAnnotationAttributes.txt @@ -0,0 +1,22 @@ +https +GET +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs/1280914700 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:04:57 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"3b36d1f6627dd72cb179d9f623bb650ad1d8e4235fe273b73bd87fb9b687a99a"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4912'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '88'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF1D:66AD:C720DE:11257AA:5F924859')] +{"id":1280914700,"node_id":"MDg6Q2hlY2tSdW4xMjgwOTE0NzAw","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"102","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1280914700","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1280914700","details_url":"https://github.com/dhruvmanila/pygithub-testing","status":"completed","conclusion":"success","started_at":"2020-10-20T10:34:15Z","completed_at":"2020-10-20T12:31:28Z","output":{"title":"Check run for testing list of annotations","summary":"This is test to get the list of annotations.","text":null,"annotations_count":2,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1280914700/annotations"},"name":"annotations","check_suite":{"id":1366665055},"app":{"id":85429,"slug":"test-pygithub","node_id":"MDM6QXBwODU0Mjk=","owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"name":"Test PyGithub","description":"This app is made only for testing GitHub API endpoints for PyGithub.","external_url":"https://github.com/dhruvmanila/pygithub-testing","html_url":"https://github.com/apps/test-pygithub","created_at":"2020-10-19T16:18:54Z","updated_at":"2020-10-20T03:52:02Z","permissions":{"actions":"write","checks":"write","metadata":"read","workflows":"write"},"events":["check_run","check_suite"]},"pull_requests":[]} + +https +GET +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs/1280914700/annotations +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:04:57 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"047a28107e6c7cccaea233850af8c84a6c36a7eddfe08d6e1b78f3d435bdef2d"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4911'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '89'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF1E:095B:3B5C6F:52DEE7:5F924859')] +[{"path":"README.md","blob_href":"https://github.com/dhruvmanila/pygithub-testing/blob/0283d46537193f1fed7d46859f15c5304b9836f9/README.md","start_line":2,"start_column":null,"end_line":2,"end_column":null,"annotation_level":"warning","title":"Spell Checker","message":"Check your spelling for 'banaas'.","raw_details":"Do you mean 'bananas' or 'banana'?"},{"path":"README.md","blob_href":"https://github.com/dhruvmanila/pygithub-testing/blob/0283d46537193f1fed7d46859f15c5304b9836f9/README.md","start_line":4,"start_column":null,"end_line":4,"end_column":null,"annotation_level":"warning","title":"Spell Checker","message":"Check your spelling for 'aples'","raw_details":"Do you mean 'apples' or 'Naples'"}] + diff --git a/tests/ReplayData/CheckRun.testCheckRunOutputAttributes.txt b/tests/ReplayData/CheckRun.testCheckRunOutputAttributes.txt new file mode 100644 index 00000000..45b9bea3 --- /dev/null +++ b/tests/ReplayData/CheckRun.testCheckRunOutputAttributes.txt @@ -0,0 +1,11 @@ +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/check-runs/1039891917 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:00 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"f9cc9072c36d45bce89bde08d78c37bd463290dc6ee98938b4251c2f642a9594"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4906'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '94'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF23:66AD:C720EC:11257BC:5F92485B')] +{"id":1039891917,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTE3","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"ced8afa2-0de1-5007-330b-c6fb982580f9","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","status":"completed","conclusion":"failure","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:22:35Z","output":{"title":"test (Python 3.6)","summary":"There are 1 failures, 0 warnings, and 0 notices.","text":null,"annotations_count":1,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917/annotations"},"name":"test (Python 3.6)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]} + diff --git a/tests/ReplayData/CheckRun.testCreateCheckRunCompleted.txt b/tests/ReplayData/CheckRun.testCreateCheckRunCompleted.txt new file mode 100644 index 00000000..8fbcbf22 --- /dev/null +++ b/tests/ReplayData/CheckRun.testCreateCheckRunCompleted.txt @@ -0,0 +1,11 @@ +https +POST +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"name": "completed_check_run", "head_sha": "0283d46537193f1fed7d46859f15c5304b9836f9", "status": "completed", "started_at": "2020-10-20T10:30:29Z", "completed_at": "2020-10-20T11:30:50Z", "conclusion": "success", "output": {"title": "Readme report", "summary": "There are 0 failures, 2 warnings, and 1 notices.", "text": "You may have some misspelled words on lines 2 and 4.", "annotations": [{"path": "README.md", "annotation_level": "warning", "title": "Spell Checker", "message": "Check your spelling for 'banaas'.", "raw_details": "Do you mean 'bananas' or 'banana'?", "start_line": 2, "end_line": 2}, {"path": "README.md", "annotation_level": "warning", "title": "Spell Checker", "message": "Check your spelling for 'aples'", "raw_details": "Do you mean 'apples' or 'Naples'", "start_line": 4, "end_line": 4}], "images": [{"alt": "Test Image", "image_url": "http://example.com/images/42"}]}, "actions": [{"label": "Fix", "identifier": "fix_errors", "description": "Allow us to fix these errors for you"}]} +201 +[('Date', 'Fri, 23 Oct 2020 03:05:03 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '2294'), ('Server', 'GitHub.com'), ('Status', '201 Created'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', '"0969dd43d8b7a32b9635309969175f3de6993ae3001283331b47a553a0df5978"'), ('Location', 'https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296027873'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4901'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '99'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', 'CF28:24B4:15A7929:1D6C7DF:5F92485E')] +{"id":1296027873,"node_id":"MDg6Q2hlY2tSdW4xMjk2MDI3ODcz","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296027873","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1296027873","details_url":"https://github.com/dhruvmanila/pygithub-testing","status":"completed","conclusion":"success","started_at":"2020-10-20T10:30:29Z","completed_at":"2020-10-20T11:30:50Z","output":{"title":"Readme report","summary":"There are 0 failures, 2 warnings, and 1 notices.","text":"You may have some misspelled words on lines 2 and 4.","annotations_count":2,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296027873/annotations"},"name":"completed_check_run","check_suite":{"id":1366665055},"app":{"id":85429,"slug":"test-pygithub","node_id":"MDM6QXBwODU0Mjk=","owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"name":"Test PyGithub","description":"This app is made only for testing GitHub API endpoints for PyGithub.","external_url":"https://github.com/dhruvmanila/pygithub-testing","html_url":"https://github.com/apps/test-pygithub","created_at":"2020-10-19T16:18:54Z","updated_at":"2020-10-20T03:52:02Z","permissions":{"actions":"write","checks":"write","metadata":"read","workflows":"write"},"events":["check_run","check_suite"]},"pull_requests":[]} + diff --git a/tests/ReplayData/CheckRun.testCreateCheckRunInProgress.txt b/tests/ReplayData/CheckRun.testCreateCheckRunInProgress.txt new file mode 100644 index 00000000..54f41e7f --- /dev/null +++ b/tests/ReplayData/CheckRun.testCreateCheckRunInProgress.txt @@ -0,0 +1,22 @@ +https +POST +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"name": "basic_check_run", "head_sha": "0283d46537193f1fed7d46859f15c5304b9836f9", "details_url": "https://www.example.com", "external_id": "50", "status": "in_progress", "started_at": "2020-09-04T01:14:52Z", "output": {"title": "PyGithub Check Run Test", "summary": "Test summary"}} +201 +[('Date', 'Fri, 23 Oct 2020 03:05:05 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '2171'), ('Server', 'GitHub.com'), ('Status', '201 Created'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', '"5c8b10b95fabf5ee27162fa3e6e5284658efba49e83c740a8480fa9bc0b6fbea"'), ('Location', 'https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296028076'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4896'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '104'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', 'CF2D:6561:C67695:110B31F:5F924860')] +{"id":1296028076,"node_id":"MDg6Q2hlY2tSdW4xMjk2MDI4MDc2","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"50","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296028076","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1296028076","details_url":"https://www.example.com","status":"in_progress","conclusion":null,"started_at":"2020-09-04T01:14:52Z","completed_at":null,"output":{"title":"PyGithub Check Run Test","summary":"Test summary","text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296028076/annotations"},"name":"basic_check_run","check_suite":{"id":1366665055},"app":{"id":85429,"slug":"test-pygithub","node_id":"MDM6QXBwODU0Mjk=","owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"name":"Test PyGithub","description":"This app is made only for testing GitHub API endpoints for PyGithub.","external_url":"https://github.com/dhruvmanila/pygithub-testing","html_url":"https://github.com/apps/test-pygithub","created_at":"2020-10-19T16:18:54Z","updated_at":"2020-10-20T03:52:02Z","permissions":{"actions":"write","checks":"write","metadata":"read","workflows":"write"},"events":["check_run","check_suite"]},"pull_requests":[]} + +https +PATCH +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs/1296028076 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"conclusion": "success"} +200 +[('Date', 'Fri, 23 Oct 2020 03:05:06 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"938525593c35bfe916a2c12bdf95943b7134b1442e867584a722bcece448c925"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4895'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '105'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF2E:6DFC:1520D35:1CD42AC:5F924861')] +{"id":1296028076,"node_id":"MDg6Q2hlY2tSdW4xMjk2MDI4MDc2","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"50","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296028076","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1296028076","details_url":"https://www.example.com","status":"completed","conclusion":"success","started_at":"2020-09-04T01:14:52Z","completed_at":"2020-10-23T03:05:06Z","output":{"title":"PyGithub Check Run Test","summary":"Test summary","text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296028076/annotations"},"name":"basic_check_run","check_suite":{"id":1366665055},"app":{"id":85429,"slug":"test-pygithub","node_id":"MDM6QXBwODU0Mjk=","owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"name":"Test PyGithub","description":"This app is made only for testing GitHub API endpoints for PyGithub.","external_url":"https://github.com/dhruvmanila/pygithub-testing","html_url":"https://github.com/apps/test-pygithub","created_at":"2020-10-19T16:18:54Z","updated_at":"2020-10-20T03:52:02Z","permissions":{"actions":"write","checks":"write","metadata":"read","workflows":"write"},"events":["check_run","check_suite"]},"pull_requests":[]} + diff --git a/tests/ReplayData/CheckRun.testGetCheckRunsForRef.txt b/tests/ReplayData/CheckRun.testGetCheckRunsForRef.txt new file mode 100644 index 00000000..3a3fd50d --- /dev/null +++ b/tests/ReplayData/CheckRun.testGetCheckRunsForRef.txt @@ -0,0 +1,22 @@ +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs?per_page=1 +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:08 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"23899cd4213d4493f54600e530f4a43575402b503586eeb8d9c7340e56cf8b8a"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Link', '; rel="next", ; rel="last"'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4890'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '110'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF33:6DFC:1520D6C:1CD42FE:5F924864')] +{"total_count":4,"check_runs":[{"id":1039891953,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTUz","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"6b512fe7-587c-5ecc-c4a3-03b7358c152d","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:21:21Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953/annotations"},"name":"test (Python 3.8)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]}]} + +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:09 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"12597e85447ab058b30dc5520ecbf8e3a8d7623a4c0bfe53dfc235b1da5297d5"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4889'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '111'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF34:0A11:F412F2:14F8735:5F924865')] +{"total_count":4,"check_runs":[{"id":1039891953,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTUz","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"6b512fe7-587c-5ecc-c4a3-03b7358c152d","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:21:21Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953/annotations"},"name":"test (Python 3.8)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891931,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTMx","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"02f808e0-98fe-55de-7c6a-7b611811c378","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891931","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891931","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891931","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:26Z","completed_at":"2020-08-28T04:21:32Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891931/annotations"},"name":"test (Python 3.7)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891917,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTE3","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"ced8afa2-0de1-5007-330b-c6fb982580f9","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","status":"completed","conclusion":"failure","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:22:35Z","output":{"title":"test (Python 3.6)","summary":"There are 1 failures, 0 warnings, and 0 notices.","text":null,"annotations_count":1,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917/annotations"},"name":"test (Python 3.6)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891902,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTAy","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"faa62fff-0a61-5a65-b80e-0b42a7456be1","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891902","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891902","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891902","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:26Z","completed_at":"2020-08-28T04:21:34Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891902/annotations"},"name":"test (Python 3.5)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]}]} + diff --git a/tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByCheckName.txt b/tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByCheckName.txt new file mode 100644 index 00000000..d0354ba4 --- /dev/null +++ b/tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByCheckName.txt @@ -0,0 +1,22 @@ +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs?check_name=test+%28Python+3.6%29&per_page=1 +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:11 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"0cfd4fd6b16162ce7ee38ef08f9c65f2673b52557d1ed9107cb550b5eba06e8a"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4884'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '116'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF39:2DDD:170E4F7:1EB98D4:5F924867')] +{"total_count":1,"check_runs":[{"id":1039891917,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTE3","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"ced8afa2-0de1-5007-330b-c6fb982580f9","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","status":"completed","conclusion":"failure","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:22:35Z","output":{"title":"test (Python 3.6)","summary":"There are 1 failures, 0 warnings, and 0 notices.","text":null,"annotations_count":1,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917/annotations"},"name":"test (Python 3.6)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]}]} + +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs?check_name=test+%28Python+3.6%29 +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:12 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"0cfd4fd6b16162ce7ee38ef08f9c65f2673b52557d1ed9107cb550b5eba06e8a"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4883'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '117'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF3A:0A11:F4133D:14F8791:5F924867')] +{"total_count":1,"check_runs":[{"id":1039891917,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTE3","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"ced8afa2-0de1-5007-330b-c6fb982580f9","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","status":"completed","conclusion":"failure","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:22:35Z","output":{"title":"test (Python 3.6)","summary":"There are 1 failures, 0 warnings, and 0 notices.","text":null,"annotations_count":1,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917/annotations"},"name":"test (Python 3.6)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]}]} + diff --git a/tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByFilter.txt b/tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByFilter.txt new file mode 100644 index 00000000..4061d393 --- /dev/null +++ b/tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByFilter.txt @@ -0,0 +1,44 @@ +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs?per_page=1 +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:14 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"23899cd4213d4493f54600e530f4a43575402b503586eeb8d9c7340e56cf8b8a"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Link', '; rel="next", ; rel="last"'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4878'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '122'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF3F:66AD:C72225:1125962:5F92486A')] +{"total_count":4,"check_runs":[{"id":1039891953,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTUz","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"6b512fe7-587c-5ecc-c4a3-03b7358c152d","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:21:21Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953/annotations"},"name":"test (Python 3.8)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]}]} + +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:15 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"12597e85447ab058b30dc5520ecbf8e3a8d7623a4c0bfe53dfc235b1da5297d5"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4877'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '123'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF40:6561:C67756:110B418:5F92486A')] +{"total_count":4,"check_runs":[{"id":1039891953,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTUz","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"6b512fe7-587c-5ecc-c4a3-03b7358c152d","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:21:21Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953/annotations"},"name":"test (Python 3.8)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891931,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTMx","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"02f808e0-98fe-55de-7c6a-7b611811c378","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891931","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891931","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891931","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:26Z","completed_at":"2020-08-28T04:21:32Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891931/annotations"},"name":"test (Python 3.7)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891917,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTE3","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"ced8afa2-0de1-5007-330b-c6fb982580f9","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","status":"completed","conclusion":"failure","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:22:35Z","output":{"title":"test (Python 3.6)","summary":"There are 1 failures, 0 warnings, and 0 notices.","text":null,"annotations_count":1,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917/annotations"},"name":"test (Python 3.6)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891902,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTAy","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"faa62fff-0a61-5a65-b80e-0b42a7456be1","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891902","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891902","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891902","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:26Z","completed_at":"2020-08-28T04:21:34Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891902/annotations"},"name":"test (Python 3.5)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]}]} + +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs?per_page=1 +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:15 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"23899cd4213d4493f54600e530f4a43575402b503586eeb8d9c7340e56cf8b8a"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Link', '; rel="next", ; rel="last"'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4876'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '124'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF41:6DFC:1520DB8:1CD436A:5F92486B')] +{"total_count":4,"check_runs":[{"id":1039891953,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTUz","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"6b512fe7-587c-5ecc-c4a3-03b7358c152d","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:21:21Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953/annotations"},"name":"test (Python 3.8)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]}]} + +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:16 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"12597e85447ab058b30dc5520ecbf8e3a8d7623a4c0bfe53dfc235b1da5297d5"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4875'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '125'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF42:09FD:FF0C23:159564F:5F92486B')] +{"total_count":4,"check_runs":[{"id":1039891953,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTUz","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"6b512fe7-587c-5ecc-c4a3-03b7358c152d","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:21:21Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953/annotations"},"name":"test (Python 3.8)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891931,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTMx","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"02f808e0-98fe-55de-7c6a-7b611811c378","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891931","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891931","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891931","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:26Z","completed_at":"2020-08-28T04:21:32Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891931/annotations"},"name":"test (Python 3.7)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891917,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTE3","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"ced8afa2-0de1-5007-330b-c6fb982580f9","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","status":"completed","conclusion":"failure","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:22:35Z","output":{"title":"test (Python 3.6)","summary":"There are 1 failures, 0 warnings, and 0 notices.","text":null,"annotations_count":1,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917/annotations"},"name":"test (Python 3.6)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891902,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTAy","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"faa62fff-0a61-5a65-b80e-0b42a7456be1","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891902","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891902","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891902","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:26Z","completed_at":"2020-08-28T04:21:34Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891902/annotations"},"name":"test (Python 3.5)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]}]} + diff --git a/tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByStatus.txt b/tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByStatus.txt new file mode 100644 index 00000000..c478557c --- /dev/null +++ b/tests/ReplayData/CheckRun.testGetCheckRunsForRefFilterByStatus.txt @@ -0,0 +1,44 @@ +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs?status=completed&filter=NotSet&per_page=1 +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:18 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"23899cd4213d4493f54600e530f4a43575402b503586eeb8d9c7340e56cf8b8a"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Link', '; rel="next", ; rel="last"'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4870'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '130'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF47:09FB:3C04A8:537318:5F92486E')] +{"total_count":4,"check_runs":[{"id":1039891953,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTUz","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"6b512fe7-587c-5ecc-c4a3-03b7358c152d","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:21:21Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953/annotations"},"name":"test (Python 3.8)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]}]} + +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs?status=completed&filter=NotSet +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:18 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"12597e85447ab058b30dc5520ecbf8e3a8d7623a4c0bfe53dfc235b1da5297d5"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4869'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '131'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF48:6DFC:1520DD9:1CD439B:5F92486E')] +{"total_count":4,"check_runs":[{"id":1039891953,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTUz","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"6b512fe7-587c-5ecc-c4a3-03b7358c152d","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891953","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:21:21Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891953/annotations"},"name":"test (Python 3.8)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891931,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTMx","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"02f808e0-98fe-55de-7c6a-7b611811c378","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891931","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891931","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891931","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:26Z","completed_at":"2020-08-28T04:21:32Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891931/annotations"},"name":"test (Python 3.7)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891917,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTE3","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"ced8afa2-0de1-5007-330b-c6fb982580f9","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891917","status":"completed","conclusion":"failure","started_at":"2020-08-28T04:20:27Z","completed_at":"2020-08-28T04:22:35Z","output":{"title":"test (Python 3.6)","summary":"There are 1 failures, 0 warnings, and 0 notices.","text":null,"annotations_count":1,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891917/annotations"},"name":"test (Python 3.6)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]},{"id":1039891902,"node_id":"MDg6Q2hlY2tSdW4xMDM5ODkxOTAy","head_sha":"6bc9ecc8c849df4e45e60c1e6a5df8876180a20a","external_id":"faa62fff-0a61-5a65-b80e-0b42a7456be1","url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891902","html_url":"https://github.com/PyGithub/PyGithub/runs/1039891902","details_url":"https://github.com/PyGithub/PyGithub/runs/1039891902","status":"completed","conclusion":"success","started_at":"2020-08-28T04:20:26Z","completed_at":"2020-08-28T04:21:34Z","output":{"title":null,"summary":null,"text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/PyGithub/PyGithub/check-runs/1039891902/annotations"},"name":"test (Python 3.5)","check_suite":{"id":1110219217},"app":{"id":15368,"slug":"github-actions","node_id":"MDM6QXBwMTUzNjg=","owner":{"login":"github","id":9919,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9919?v=4","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"name":"GitHub Actions","description":"Automate your workflow from idea to production","external_url":"https://help.github.com/en/actions","html_url":"https://github.com/apps/github-actions","created_at":"2018-07-30T09:30:17Z","updated_at":"2019-12-10T19:04:12Z","permissions":{"actions":"write","checks":"write","contents":"write","deployments":"write","issues":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"write","repository_hooks":"write","repository_projects":"write","security_events":"write","statuses":"write","vulnerability_alerts":"read"},"events":["check_run","check_suite","create","delete","deployment","deployment_status","fork","gollum","issues","issue_comment","label","milestone","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","push","registry_package","release","repository","repository_dispatch","status","watch","workflow_dispatch","workflow_run"]},"pull_requests":[]}]} + +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs?status=queued&filter=NotSet&per_page=1 +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:19 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"20bba17842cc0b475a74d27f0093cc4eeeb3b2d6db159c77d9eb6f8ec6acc182"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4868'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '132'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF49:2DDC:580A9D:7AE636:5F92486F')] +{"total_count":0,"check_runs":[]} + +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/6bc9ecc8c849df4e45e60c1e6a5df8876180a20a/check-runs?status=in_progress&filter=NotSet&per_page=1 +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:19 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"20bba17842cc0b475a74d27f0093cc4eeeb3b2d6db159c77d9eb6f8ec6acc182"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4867'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '133'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF4A:66AD:C72278:11259CA:5F92486F')] +{"total_count":0,"check_runs":[]} + diff --git a/tests/ReplayData/CheckRun.testListCheckRunAnnotations.txt b/tests/ReplayData/CheckRun.testListCheckRunAnnotations.txt new file mode 100644 index 00000000..51b54317 --- /dev/null +++ b/tests/ReplayData/CheckRun.testListCheckRunAnnotations.txt @@ -0,0 +1,33 @@ +https +GET +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs/1280914700 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:22 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"3b36d1f6627dd72cb179d9f623bb650ad1d8e4235fe273b73bd87fb9b687a99a"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4862'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '138'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF4F:0A11:F413D1:14F8840:5F924871')] +{"id":1280914700,"node_id":"MDg6Q2hlY2tSdW4xMjgwOTE0NzAw","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"102","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1280914700","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1280914700","details_url":"https://github.com/dhruvmanila/pygithub-testing","status":"completed","conclusion":"success","started_at":"2020-10-20T10:34:15Z","completed_at":"2020-10-20T12:31:28Z","output":{"title":"Check run for testing list of annotations","summary":"This is test to get the list of annotations.","text":null,"annotations_count":2,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1280914700/annotations"},"name":"annotations","check_suite":{"id":1366665055},"app":{"id":85429,"slug":"test-pygithub","node_id":"MDM6QXBwODU0Mjk=","owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"name":"Test PyGithub","description":"This app is made only for testing GitHub API endpoints for PyGithub.","external_url":"https://github.com/dhruvmanila/pygithub-testing","html_url":"https://github.com/apps/test-pygithub","created_at":"2020-10-19T16:18:54Z","updated_at":"2020-10-20T03:52:02Z","permissions":{"actions":"write","checks":"write","metadata":"read","workflows":"write"},"events":["check_run","check_suite"]},"pull_requests":[]} + +https +GET +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs/1280914700/annotations?per_page=1 +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:22 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"d252069dc25ba5dc416e6aa0caef8f15558d24ca2a82dbf3bb03ceedfd324a0e"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Link', '; rel="next", ; rel="last"'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4861'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '139'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF50:0A11:F413D6:14F8847:5F924872')] +[{"path":"README.md","blob_href":"https://github.com/dhruvmanila/pygithub-testing/blob/0283d46537193f1fed7d46859f15c5304b9836f9/README.md","start_line":2,"start_column":null,"end_line":2,"end_column":null,"annotation_level":"warning","title":"Spell Checker","message":"Check your spelling for 'banaas'.","raw_details":"Do you mean 'bananas' or 'banana'?"}] + +https +GET +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs/1280914700/annotations +{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:22 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"047a28107e6c7cccaea233850af8c84a6c36a7eddfe08d6e1b78f3d435bdef2d"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4860'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '140'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF51:24B4:15A7A9D:1D6C9C1:5F924872')] +[{"path":"README.md","blob_href":"https://github.com/dhruvmanila/pygithub-testing/blob/0283d46537193f1fed7d46859f15c5304b9836f9/README.md","start_line":2,"start_column":null,"end_line":2,"end_column":null,"annotation_level":"warning","title":"Spell Checker","message":"Check your spelling for 'banaas'.","raw_details":"Do you mean 'bananas' or 'banana'?"},{"path":"README.md","blob_href":"https://github.com/dhruvmanila/pygithub-testing/blob/0283d46537193f1fed7d46859f15c5304b9836f9/README.md","start_line":4,"start_column":null,"end_line":4,"end_column":null,"annotation_level":"warning","title":"Spell Checker","message":"Check your spelling for 'aples'","raw_details":"Do you mean 'apples' or 'Naples'"}] + diff --git a/tests/ReplayData/CheckRun.testUpdateCheckRunAll.txt b/tests/ReplayData/CheckRun.testUpdateCheckRunAll.txt new file mode 100644 index 00000000..c2222b98 --- /dev/null +++ b/tests/ReplayData/CheckRun.testUpdateCheckRunAll.txt @@ -0,0 +1,22 @@ +https +GET +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs/1279259090 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('Date', 'Fri, 23 Oct 2020 03:05:25 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"a1dcda96e0191f36ff25916c095f9fa5d15e76c38a8a8b6076a5857f28fe2b3f"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4855'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '145'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF56:6561:C677EB:110B4D0:5F924874')] +{"id":1279259090,"node_id":"MDg6Q2hlY2tSdW4xMjc5MjU5MDkw","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"49","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1279259090","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1279259090","details_url":"https://www.example-url.com","status":"completed","conclusion":"success","started_at":"2020-10-20T01:10:20Z","completed_at":"2020-10-20T02:20:30Z","output":{"title":"Mighty Readme report","summary":"There are 0 failures, 2 warnings, and 1 notices.","text":null,"annotations_count":2,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1279259090/annotations"},"name":"update_all_params","check_suite":{"id":1366665055},"app":{"id":85429,"slug":"test-pygithub","node_id":"MDM6QXBwODU0Mjk=","owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"name":"Test PyGithub","description":"This app is made only for testing GitHub API endpoints for PyGithub.","external_url":"https://github.com/dhruvmanila/pygithub-testing","html_url":"https://github.com/apps/test-pygithub","created_at":"2020-10-19T16:18:54Z","updated_at":"2020-10-20T03:52:02Z","permissions":{"actions":"write","checks":"write","metadata":"read","workflows":"write"},"events":["check_run","check_suite"]},"pull_requests":[]} + +https +PATCH +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs/1279259090 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"name": "update_all_params", "head_sha": "0283d46537193f1fed7d46859f15c5304b9836f9", "details_url": "https://www.example-url.com", "external_id": "49", "started_at": "2020-10-20T01:10:20Z", "completed_at": "2020-10-20T02:20:30Z", "actions": [{"label": "Hello World!", "identifier": "identity", "description": "Hey! This is a test"}]} +200 +[('Date', 'Fri, 23 Oct 2020 03:05:25 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"a1dcda96e0191f36ff25916c095f9fa5d15e76c38a8a8b6076a5857f28fe2b3f"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4854'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '146'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF57:24B4:15A7ACF:1D6C9FD:5F924875')] +{"id":1279259090,"node_id":"MDg6Q2hlY2tSdW4xMjc5MjU5MDkw","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"49","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1279259090","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1279259090","details_url":"https://www.example-url.com","status":"completed","conclusion":"success","started_at":"2020-10-20T01:10:20Z","completed_at":"2020-10-20T02:20:30Z","output":{"title":"Mighty Readme report","summary":"There are 0 failures, 2 warnings, and 1 notices.","text":null,"annotations_count":2,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1279259090/annotations"},"name":"update_all_params","check_suite":{"id":1366665055},"app":{"id":85429,"slug":"test-pygithub","node_id":"MDM6QXBwODU0Mjk=","owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"name":"Test PyGithub","description":"This app is made only for testing GitHub API endpoints for PyGithub.","external_url":"https://github.com/dhruvmanila/pygithub-testing","html_url":"https://github.com/apps/test-pygithub","created_at":"2020-10-19T16:18:54Z","updated_at":"2020-10-20T03:52:02Z","permissions":{"actions":"write","checks":"write","metadata":"read","workflows":"write"},"events":["check_run","check_suite"]},"pull_requests":[]} + diff --git a/tests/ReplayData/CheckRun.testUpdateCheckRunFailure.txt b/tests/ReplayData/CheckRun.testUpdateCheckRunFailure.txt new file mode 100644 index 00000000..595a059b --- /dev/null +++ b/tests/ReplayData/CheckRun.testUpdateCheckRunFailure.txt @@ -0,0 +1,22 @@ +https +POST +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"name": "fail_check_run", "head_sha": "0283d46537193f1fed7d46859f15c5304b9836f9", "external_id": "101", "status": "in_progress", "started_at": "2020-10-20T10:14:51Z", "output": {"title": "Check run for testing failure", "summary": ""}} +201 +[('Date', 'Fri, 23 Oct 2020 03:05:28 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '2189'), ('Server', 'GitHub.com'), ('Status', '201 Created'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', '"db85c7fc5214880ce830f219d130de091283a1d689b84b9181611321ceadab49"'), ('Location', 'https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296029378'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4849'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '151'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', 'CF5C:6DFC:1520E31:1CD4410:5F924877')] +{"id":1296029378,"node_id":"MDg6Q2hlY2tSdW4xMjk2MDI5Mzc4","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"101","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296029378","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1296029378","details_url":"https://github.com/dhruvmanila/pygithub-testing","status":"in_progress","conclusion":null,"started_at":"2020-10-20T10:14:51Z","completed_at":null,"output":{"title":"Check run for testing failure","summary":"","text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296029378/annotations"},"name":"fail_check_run","check_suite":{"id":1366665055},"app":{"id":85429,"slug":"test-pygithub","node_id":"MDM6QXBwODU0Mjk=","owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"name":"Test PyGithub","description":"This app is made only for testing GitHub API endpoints for PyGithub.","external_url":"https://github.com/dhruvmanila/pygithub-testing","html_url":"https://github.com/apps/test-pygithub","created_at":"2020-10-19T16:18:54Z","updated_at":"2020-10-20T03:52:02Z","permissions":{"actions":"write","checks":"write","metadata":"read","workflows":"write"},"events":["check_run","check_suite"]},"pull_requests":[]} + +https +PATCH +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs/1296029378 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"status": "completed", "conclusion": "failure", "output": {"title": "Check run for testing failure", "summary": "There is 1 whitespace error.", "text": "You may have a whitespace error in the file 'test.py'", "annotations": [{"path": "test.py", "annotation_level": "failure", "title": "whitespace checker", "message": "Remove the unnecessary whitespace from the file.", "start_line": 2, "end_line": 2, "start_column": 17, "end_column": 18}]}, "actions": [{"label": "Fix", "identifier": "fix_errors", "description": "Allow us to fix these errors for you"}]} +200 +[('Date', 'Fri, 23 Oct 2020 03:05:28 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"190b6a62c177d880d2516d65d81f449089e885590b78b2c87c1fb3f7a1a04288"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4848'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '152'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF5D:09F2:EC7E9A:1442E6A:5F924878')] +{"id":1296029378,"node_id":"MDg6Q2hlY2tSdW4xMjk2MDI5Mzc4","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"101","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296029378","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1296029378","details_url":"https://github.com/dhruvmanila/pygithub-testing","status":"completed","conclusion":"failure","started_at":"2020-10-20T10:14:51Z","completed_at":"2020-10-23T03:05:28Z","output":{"title":"Check run for testing failure","summary":"There is 1 whitespace error.","text":"You may have a whitespace error in the file 'test.py'","annotations_count":1,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296029378/annotations"},"name":"fail_check_run","check_suite":{"id":1366665055},"app":{"id":85429,"slug":"test-pygithub","node_id":"MDM6QXBwODU0Mjk=","owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"name":"Test PyGithub","description":"This app is made only for testing GitHub API endpoints for PyGithub.","external_url":"https://github.com/dhruvmanila/pygithub-testing","html_url":"https://github.com/apps/test-pygithub","created_at":"2020-10-19T16:18:54Z","updated_at":"2020-10-20T03:52:02Z","permissions":{"actions":"write","checks":"write","metadata":"read","workflows":"write"},"events":["check_run","check_suite"]},"pull_requests":[]} + diff --git a/tests/ReplayData/CheckRun.testUpdateCheckRunSuccess.txt b/tests/ReplayData/CheckRun.testUpdateCheckRunSuccess.txt new file mode 100644 index 00000000..d333a88b --- /dev/null +++ b/tests/ReplayData/CheckRun.testUpdateCheckRunSuccess.txt @@ -0,0 +1,22 @@ +https +POST +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"name": "edit_check_run", "head_sha": "0283d46537193f1fed7d46859f15c5304b9836f9", "external_id": "100", "status": "in_progress", "started_at": "2020-10-20T14:24:31Z", "output": {"title": "Check run for testing edit method", "summary": ""}} +201 +[('Date', 'Fri, 23 Oct 2020 03:05:31 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '2193'), ('Server', 'GitHub.com'), ('Status', '201 Created'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', '"c0cc2ab1fa68641cd589a9cf66348046f2c939eef5c832fd142062acfdb63c96"'), ('Location', 'https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296029552'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4843'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '157'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', 'CF62:24B3:579235:799DFB:5F92487A')] +{"id":1296029552,"node_id":"MDg6Q2hlY2tSdW4xMjk2MDI5NTUy","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"100","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296029552","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1296029552","details_url":"https://github.com/dhruvmanila/pygithub-testing","status":"in_progress","conclusion":null,"started_at":"2020-10-20T14:24:31Z","completed_at":null,"output":{"title":"Check run for testing edit method","summary":"","text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296029552/annotations"},"name":"edit_check_run","check_suite":{"id":1366665055},"app":{"id":85429,"slug":"test-pygithub","node_id":"MDM6QXBwODU0Mjk=","owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"name":"Test PyGithub","description":"This app is made only for testing GitHub API endpoints for PyGithub.","external_url":"https://github.com/dhruvmanila/pygithub-testing","html_url":"https://github.com/apps/test-pygithub","created_at":"2020-10-19T16:18:54Z","updated_at":"2020-10-20T03:52:02Z","permissions":{"actions":"write","checks":"write","metadata":"read","workflows":"write"},"events":["check_run","check_suite"]},"pull_requests":[]} + +https +PATCH +api.github.com +None +/repos/dhruvmanila/pygithub-testing/check-runs/1296029552 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'} +{"status": "completed", "conclusion": "success", "output": {"title": "Check run for testing edit method", "summary": "This is the summary of editing check run as completed."}} +200 +[('Date', 'Fri, 23 Oct 2020 03:05:32 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Server', 'GitHub.com'), ('Status', '200 OK'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding'), ('ETag', 'W/"c8ddcf778ff05bdc1fdec6a5f0929979377a02ddab45dab465f9b8fc1a73f448"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4842'), ('X-RateLimit-Reset', '1603425766'), ('X-RateLimit-Used', '158'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'CF63:09F2:EC7ED6:1442EAD:5F92487B')] +{"id":1296029552,"node_id":"MDg6Q2hlY2tSdW4xMjk2MDI5NTUy","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"100","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296029552","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1296029552","details_url":"https://github.com/dhruvmanila/pygithub-testing","status":"completed","conclusion":"success","started_at":"2020-10-20T14:24:31Z","completed_at":"2020-10-23T03:05:31Z","output":{"title":"Check run for testing edit method","summary":"This is the summary of editing check run as completed.","text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1296029552/annotations"},"name":"edit_check_run","check_suite":{"id":1366665055},"app":{"id":85429,"slug":"test-pygithub","node_id":"MDM6QXBwODU0Mjk=","owner":{"login":"dhruvmanila","id":67177269,"node_id":"MDQ6VXNlcjY3MTc3MjY5","avatar_url":"https://avatars0.githubusercontent.com/u/67177269?v=4","gravatar_id":"","url":"https://api.github.com/users/dhruvmanila","html_url":"https://github.com/dhruvmanila","followers_url":"https://api.github.com/users/dhruvmanila/followers","following_url":"https://api.github.com/users/dhruvmanila/following{/other_user}","gists_url":"https://api.github.com/users/dhruvmanila/gists{/gist_id}","starred_url":"https://api.github.com/users/dhruvmanila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhruvmanila/subscriptions","organizations_url":"https://api.github.com/users/dhruvmanila/orgs","repos_url":"https://api.github.com/users/dhruvmanila/repos","events_url":"https://api.github.com/users/dhruvmanila/events{/privacy}","received_events_url":"https://api.github.com/users/dhruvmanila/received_events","type":"User","site_admin":false},"name":"Test PyGithub","description":"This app is made only for testing GitHub API endpoints for PyGithub.","external_url":"https://github.com/dhruvmanila/pygithub-testing","html_url":"https://github.com/apps/test-pygithub","created_at":"2020-10-19T16:18:54Z","updated_at":"2020-10-20T03:52:02Z","permissions":{"actions":"write","checks":"write","metadata":"read","workflows":"write"},"events":["check_run","check_suite"]},"pull_requests":[]} +