Add support for Check Suites (#1764)

* Add initial support for Check Suites
* Add API call detail in CheckSuite.rerequest
* Update Accept header with general instead of preview
* Add 'get check runs' endpoint for CheckSuite with stubs
* Add create check suite endpoint with stub
* Update CheckSuite tests with creat check suite endpoint
* Add update check suites preferences endpoint
* Add repository preferences object and stub file
* Add update check suite preferences tests

Needed for #1621

Co-authored-by: Raju Subramanian <coder@mahesh.net>
This commit is contained in:
Dhruv Manilawala
2020-11-30 16:03:07 +11:00
committed by GitHub
co-authored by Raju Subramanian
parent 197e065372
commit 6d501b286e
20 changed files with 956 additions and 5 deletions
+275
View File
@@ -0,0 +1,275 @@
# -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2020 Raju Subramanian <coder@mahesh.net> #
# #
# 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 <http://www.gnu.org/licenses/>. #
# #
################################################################################
import github
class CheckSuite(github.GithubObject.CompletableGithubObject):
"""
This class represents check suites. The reference can be found here https://docs.github.com/en/rest/reference/checks#check-suites
"""
def __repr__(self):
return self.get__repr__({"id": self._id.value, "url": self._url.value})
@property
def after(self):
"""
:type: string
"""
self._completeIfNotSet(self._after)
return self._after.value
@property
def app(self):
"""
:type: :class:`github.GithubApp.GithubApp`
"""
self._completeIfNotSet(self._app)
return self._app.value
@property
def before(self):
"""
:type: string
"""
self._completeIfNotSet(self._before)
return self._before.value
@property
def check_runs_url(self):
"""
:type: string
"""
self._completeIfNotSet(self._check_runs_url)
return self._check_runs_url.value
@property
def conclusion(self):
"""
:type: string
"""
self._completeIfNotSet(self._conclusion)
return self._conclusion.value
@property
def created_at(self):
"""
:type: datetime.datetime
"""
self._completeIfNotSet(self._created_at)
return self._created_at.value
@property
def head_branch(self):
"""
:type: string
"""
self._completeIfNotSet(self._head_branch)
return self._head_branch.value
@property
def head_commit(self):
"""
:type: :class:`github.GitCommit.GitCommit`
"""
self._completeIfNotSet(self._head_commit)
return self._head_commit.value
@property
def head_sha(self):
"""
:type: string
"""
self._completeIfNotSet(self._head_sha)
return self._head_sha.value
@property
def id(self):
"""
:type: int
"""
self._completeIfNotSet(self._id)
return self._id.value
@property
def latest_check_runs_count(self):
"""
:type: int
"""
self._completeIfNotSet(self._latest_check_runs_count)
return self._latest_check_runs_count.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 repository(self):
"""
:type: :class:`github.Repository.Repository`
"""
self._completeIfNotSet(self._repository)
return self._repository.value
@property
def status(self):
"""
:type: string
"""
self._completeIfNotSet(self._status)
return self._status.value
@property
def updated_at(self):
"""
:type: datetime.datetime
"""
self._completeIfNotSet(self._updated_at)
return self._updated_at.value
@property
def url(self):
"""
:type: string
"""
self._completeIfNotSet(self._url)
return self._url.value
def rerequest(self):
"""
:calls: `POST /repos/:owner/:repo/check-suites/:check_suite_id/rerequest <https://docs.github.com/en/rest/reference/checks#rerequest-a-check-suite>`_
:rtype: bool
"""
request_headers = {"Accept": "application/vnd.github.v3+json"}
status, _, _ = self._requester.requestJson(
"POST", self.url + "/rerequest", headers=request_headers
)
return status == 201
def get_check_runs(
self,
check_name=github.GithubObject.NotSet,
status=github.GithubObject.NotSet,
filter=github.GithubObject.NotSet,
):
"""
:calls: `GET /repos/:owner/:repo/check-suites/:check_suite_id/check-runs <https://docs.github.com/en/rest/reference/checks#list-check-runs-in-a-check-suite>`_
: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",
)
def _initAttributes(self):
self._after = github.GithubObject.NotSet
self._app = github.GithubObject.NotSet
self._before = github.GithubObject.NotSet
self._check_runs_url = github.GithubObject.NotSet
self._conclusion = github.GithubObject.NotSet
self._created_at = github.GithubObject.NotSet
self._head_branch = github.GithubObject.NotSet
self._head_commit = github.GithubObject.NotSet
self._head_sha = github.GithubObject.NotSet
self._id = github.GithubObject.NotSet
self._latest_check_runs_count = github.GithubObject.NotSet
self._pull_requests = github.GithubObject.NotSet
self._repository = github.GithubObject.NotSet
self._status = github.GithubObject.NotSet
self._updated_at = github.GithubObject.NotSet
self._url = github.GithubObject.NotSet
def _useAttributes(self, attributes):
if "after" in attributes: # pragma no branch
self._after = self._makeStringAttribute(attributes["after"])
if "app" in attributes: # pragma no branch
self._app = self._makeClassAttribute(
github.GithubApp.GithubApp, attributes["app"]
)
if "before" in attributes: # pragma no branch
self._before = self._makeStringAttribute(attributes["before"])
if "check_runs_url" in attributes: # pragma no branch
self._check_runs_url = self._makeStringAttribute(
attributes["check_runs_url"]
)
if "conclusion" in attributes: # pragma no branch
self._conclusion = self._makeStringAttribute(attributes["conclusion"])
if "created_at" in attributes: # pragma no branch
self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
if "head_branch" in attributes: # pragma no branch
self._head_branch = self._makeStringAttribute(attributes["head_branch"])
if "head_commit" in attributes: # pragma no branch
# This JSON swaps the 'sha' attribute for an 'id' attribute.
# The GitCommit object only looks for 'sha'
if "id" in attributes["head_commit"]:
attributes["head_commit"]["sha"] = attributes["head_commit"]["id"]
self._head_commit = self._makeClassAttribute(
github.GitCommit.GitCommit, attributes["head_commit"]
)
if "head_sha" in attributes: # pragma no branch
self._head_sha = self._makeStringAttribute(attributes["head_sha"])
if "id" in attributes: # pragma no branch
self._id = self._makeIntAttribute(attributes["id"])
if "latest_check_runs_count" in attributes: # pragma no branch
self._latest_check_runs_count = self._makeIntAttribute(
attributes["latest_check_runs_count"]
)
if "pull_requests" in attributes: # pragma no branch
self._pull_requests = self._makeListOfClassesAttribute(
github.PullRequest.PullRequest, attributes["pull_requests"]
)
if "repository" in attributes: # pragma no branch
self._repository = self._makeClassAttribute(
github.Repository.Repository, attributes["repository"]
)
if "status" in attributes: # pragma no branch
self._status = self._makeStringAttribute(attributes["status"])
if "updated_at" in attributes: # pragma no branch
self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
if "url" in attributes: # pragma no branch
self._url = self._makeStringAttribute(attributes["url"])
+51
View File
@@ -0,0 +1,51 @@
from datetime import datetime
from typing import Any, Dict, List
from github.CheckRun import CheckRun
from github.GitCommit import GitCommit
from github.GithubApp import GithubApp
from github.GithubObject import CompletableGithubObject
from github.PaginatedList import PaginatedList
from github.PullRequest import PullRequest
from github.Repository import Repository
class CheckSuite(CompletableGithubObject):
def __repr__(self) -> str: ...
def _initAttributes(self) -> None: ...
def _useAttributes(self, attributes: Dict[str, Any]) -> None: ...
@property
def after(self) -> str: ...
@property
def app(self) -> GithubApp: ...
@property
def before(self) -> str: ...
@property
def check_runs_url(self) -> str: ...
@property
def conclusion(self) -> str: ...
@property
def created_at(self) -> datetime: ...
@property
def head_branch(self) -> str: ...
@property
def head_commit(self) -> GitCommit: ...
@property
def head_sha(self) -> str: ...
@property
def id(self) -> int: ...
@property
def latest_check_runs_count(self) -> int: ...
@property
def pull_requests(self) -> List[PullRequest]: ...
@property
def repository(self) -> Repository: ...
@property
def status(self) -> str: ...
@property
def updated_at(self) -> datetime: ...
@property
def url(self) -> str: ...
def rerequest(self) -> bool: ...
def get_check_runs(
self, check_name: str, status: str, filter: str
) -> PaginatedList[CheckRun]: ...
+29
View File
@@ -33,6 +33,7 @@
################################################################################
import github.CheckRun
import github.CheckSuite
import github.CommitCombinedStatus
import github.CommitComment
import github.CommitStats
@@ -293,6 +294,34 @@ class Commit(github.GithubObject.CompletableGithubObject):
list_item="check_runs",
)
def get_check_suites(
self, app_id=github.GithubObject.NotSet, check_name=github.GithubObject.NotSet
):
"""
:class: `GET /repos/:owner/:repo/commits/:ref/check-suites <https://docs.github.com/en/rest/reference/checks#list-check-suites-for-a-git-reference>`_
:param app_id: int
:param check_name: string
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CheckSuite.CheckSuite`
"""
assert app_id is github.GithubObject.NotSet or isinstance(app_id, int), app_id
assert check_name is github.GithubObject.NotSet or isinstance(
check_name, str
), check_name
parameters = dict()
if app_id is not github.GithubObject.NotSet:
parameters["app_id"] = app_id
if check_name is not github.GithubObject.NotSet:
parameters["check_name"] = check_name
request_headers = {"Accept": "application/vnd.github.v3+json"}
return github.PaginatedList.PaginatedList(
github.CheckSuite.CheckSuite,
self._requester,
self.url + "/check-suites",
parameters,
headers=request_headers,
list_item="check_suites",
)
@property
def _identity(self):
return self.sha
+6
View File
@@ -1,6 +1,7 @@
from typing import Any, Dict, List, Union
from github.CheckRun import CheckRun
from github.CheckSuite import CheckSuite
from github.CommitCombinedStatus import CommitCombinedStatus
from github.CommitComment import CommitComment
from github.CommitStats import CommitStats
@@ -41,6 +42,11 @@ class Commit(CompletableGithubObject):
) -> CommitStatus: ...
@property
def files(self) -> List[File]: ...
def get_check_suites(
self,
app_id: Union[_NotSetType, int],
check_name: Union[_NotSetType, str],
) -> PaginatedList[CheckSuite]: ...
def get_combined_status(self) -> CommitCombinedStatus: ...
def get_comments(self) -> PaginatedList[CommitComment]: ...
def get_statuses(self) -> PaginatedList[CommitStatus]: ...
+53
View File
@@ -95,6 +95,7 @@ from deprecated import deprecated
import github.Branch
import github.CheckRun
import github.CheckSuite
import github.Clones
import github.Commit
import github.CommitComment
@@ -127,6 +128,7 @@ import github.PullRequest
import github.Referrer
import github.Repository
import github.RepositoryKey
import github.RepositoryPreferences
import github.SelfHostedActionsRunner
import github.SourceImport
import github.Stargazer
@@ -3444,6 +3446,57 @@ class Repository(github.GithubObject.CompletableGithubObject):
"""
return self._hub("unsubscribe", event, callback, github.GithubObject.NotSet)
def create_check_suite(self, head_sha):
"""
:calls: `POST /repos/:owner/:repo/check-suites <https://docs.github.com/en/rest/reference/checks#create-a-check-suite>`_
:param head_sha: string
:rtype: :class:`github.CheckSuite.CheckSuite`
"""
assert isinstance(head_sha, str), head_sha
headers, data = self._requester.requestJsonAndCheck(
"POST",
self.url + "/check-suites",
input={"head_sha": head_sha},
)
return github.CheckSuite.CheckSuite(
self._requester, headers, data, completed=True
)
def get_check_suite(self, check_suite_id):
"""
:calls: `GET /repos/:owner/:repo/check-suites/:check_suite_id <https://docs.github.com/en/rest/reference/checks#get-a-check-suite>`_
:param check_suite_id: int
:rtype: :class:`github.CheckSuite.CheckSuite`
"""
assert isinstance(check_suite_id, int), check_suite_id
requestHeaders = {"Accept": "application/vnd.github.v3+json"}
headers, data = self._requester.requestJsonAndCheck(
"GET",
self.url + "/check-suites/" + str(check_suite_id),
headers=requestHeaders,
)
return github.CheckSuite.CheckSuite(
self._requester, headers, data, completed=True
)
def update_check_suites_preferences(self, auto_trigger_checks):
"""
:calls: `PATCH /repos/:owner/:repo/check-suites/preferences <https://docs.github.com/en/rest/reference/checks#update-repository-preferences-for-check-suites>`_
:param auto_trigger_checks: list of dict
:rtype: :class:`github.RepositoryPreferences.RepositoryPreferences`
"""
assert all(
isinstance(element, dict) for element in auto_trigger_checks
), auto_trigger_checks
headers, data = self._requester.requestJsonAndCheck(
"PATCH",
self.url + "/check-suites/preferences",
input={"auto_trigger_checks": auto_trigger_checks},
)
return github.RepositoryPreferences.RepositoryPreferences(
self._requester, headers, data, completed=True
)
def _hub(self, mode, event, callback, secret):
assert isinstance(mode, str), mode
assert isinstance(event, str), event
+33 -5
View File
@@ -4,6 +4,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.CheckSuite import CheckSuite
from github.Clones import Clones
from github.Commit import Commit
from github.CommitComment import CommitComment
@@ -40,6 +41,7 @@ from github.PullRequest import PullRequest
from github.PullRequestComment import PullRequestComment
from github.Referrer import Referrer
from github.RepositoryKey import RepositoryKey
from github.RepositoryPreferences import RepositoryPreferences
from github.SelfHostedActionsRunner import SelfHostedActionsRunner
from github.SourceImport import SourceImport
from github.Stargazer import Stargazer
@@ -110,9 +112,12 @@ class Repository(CompletableGithubObject):
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]]]]]] = ...,
output: Union[
_NotSetType, Dict[str, Union[str, List[Dict[str, Union[str, int]]]]]
] = ...,
actions: Union[_NotSetType, List[Dict[str, str]]] = ...,
) -> CheckRun: ...
def create_check_suite(self, head_sha: str) -> CheckSuite: ...
def create_deployment(
self,
ref: str,
@@ -209,9 +214,26 @@ class Repository(CompletableGithubObject):
) -> Milestone: ...
def create_project(self, name: str, body: str = ...) -> Project: ...
@overload
def create_pull(self, title: str, body: str, base: str, head: str, maintainer_can_modify: Union[bool, _NotSetType] = _NotSetType(), draft: bool = False, issue: _NotSetType = _NotSetType()) -> PullRequest: ...
def create_pull(
self,
title: str,
body: str,
base: str,
head: str,
maintainer_can_modify: Union[bool, _NotSetType] = _NotSetType(),
draft: bool = False,
issue: _NotSetType = _NotSetType(),
) -> PullRequest: ...
@overload
def create_pull(self, title: _NotSetType, body: _NotSetType, base: str, head: str, maintainer_can_modify: _NotSetType, issue: Issue) -> PullRequest: ...
def create_pull(
self,
title: _NotSetType,
body: _NotSetType,
base: str,
head: str,
maintainer_can_modify: _NotSetType,
issue: Issue,
) -> PullRequest: ...
def create_repository_dispatch(
self, event_type: str, client_payload: Dict[str, Any]
) -> bool: ...
@@ -282,6 +304,7 @@ class Repository(CompletableGithubObject):
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_check_suite(self, check_suite_id: int) -> CheckSuite: ...
def get_clones_traffic(
self, per: Union[str, _NotSetType] = ...
) -> Dict[str, Union[int, List[Clones]]]: ...
@@ -408,7 +431,7 @@ class Repository(CompletableGithubObject):
def get_release(self, id: Union[int, str]) -> GitRelease: ...
def get_release_asset(self, id: int) -> GitReleaseAsset: ...
def get_releases(self) -> PaginatedList[GitRelease]: ...
def get_self_hosted_runner(self, runner_id: int) -> SelfHostedActionsRunner: ...
def get_self_hosted_runner(self, runner_id: int) -> SelfHostedActionsRunner: ...
def get_self_hosted_runners(self) -> PaginatedList[SelfHostedActionsRunner]: ...
def get_source_import(self) -> SourceImport: ...
def get_stargazers(self) -> PaginatedList[NamedUser]: ...
@@ -433,6 +456,9 @@ class Repository(CompletableGithubObject):
def get_workflows(self) -> PaginatedList[Workflow]: ...
def get_workflow_run(self, id_: int) -> WorkflowRun: ...
def get_workflow_runs(self) -> PaginatedList[WorkflowRun]: ...
def update_check_suites_preferences(
self, auto_trigger_checks: List[Dict[str, Union[bool, int]]]
) -> RepositoryPreferences: ...
@property
def git_commits_url(self) -> str: ...
@property
@@ -517,7 +543,9 @@ class Repository(CompletableGithubObject):
def remove_from_collaborators(
self, collaborator: Union[str, NamedUser]
) -> None: ...
def remove_self_hosted_runner(self, runner: Union[SelfHostedActionsRunner, int]) -> bool: ...
def remove_self_hosted_runner(
self, runner: Union[SelfHostedActionsRunner, int]
) -> bool: ...
def remove_invitation(self, invite_id: int) -> None: ...
def replace_topics(self, topics: List[str]) -> None: ...
@property
+59
View File
@@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2020 Dhruv Manilawala <dhruvmanila@gmail.com> #
# #
# 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 <http://www.gnu.org/licenses/>. #
# #
################################################################################
import github.GithubObject
import github.Repository
class RepositoryPreferences(github.GithubObject.NonCompletableGithubObject):
"""
This class represents repository preferences.
The reference can be found here https://docs.github.com/en/free-pro-team@latest/rest/reference/checks#update-repository-preferences-for-check-suites
"""
@property
def preferences(self):
"""
:type: dict
"""
return self._preferences.value
@property
def repository(self):
"""
:type: :class:`github.Repository.Repository`
"""
return self._repository.value
def _initAttributes(self):
self._preferences = github.GithubObject.NotSet
self._repository = github.GithubObject.NotSet
def _useAttributes(self, attributes):
if "preferences" in attributes: # pragma no branch
self._preferences = self._makeDictAttribute(attributes["preferences"])
if "repository" in attributes: # pragma no branch
self._repository = self._makeClassAttribute(
github.Repository.Repository, attributes["repository"]
)
+12
View File
@@ -0,0 +1,12 @@
from typing import Any, Dict, List, Union
from github.GithubObject import NonCompletableGithubObject
from github.Repository import Repository
class RepositoryPreferences(NonCompletableGithubObject):
def _initAttributes(self) -> None: ...
def _useAttributes(self, attributes: Dict[str, Any]) -> None: ...
@property
def preferences(self) -> Dict[str, List[Dict[str, Union[bool, int]]]]: ...
@property
def repository(self) -> Repository: ...
+174
View File
@@ -0,0 +1,174 @@
# -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2020 Raju Subramanian <coder@mahesh.net> #
# Copyright 2020 Dhruv Manilawala <dhruvmanila@gmail.com> #
# #
# 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 <http://www.gnu.org/licenses/>. #
# #
################################################################################
from datetime import datetime
from . import Framework
class CheckSuite(Framework.TestCase):
def setUp(self):
super().setUp()
self.check_suite_id = 1004503837
self.test_check_suite_id = 1366665055
self.test_repo = self.g.get_repo("dhruvmanila/pygithub-testing")
self.test_check_suite = self.test_repo.get_check_suite(self.test_check_suite_id)
self.repo = self.g.get_repo("wrecker/PySample")
self.check_suite = self.repo.get_check_suite(self.check_suite_id)
self.check_suite_ref = "fd09d934bcce792176d6b79d6d0387e938b62b7a"
self.commit = self.repo.get_commit("fd09d934bcce792176d6b79d6d0387e938b62b7a")
def testAttributes(self):
cs = self.check_suite
self.assertEqual(cs.after, "fd09d934bcce792176d6b79d6d0387e938b62b7a")
self.assertEqual(cs.app.slug, "github-actions")
self.assertEqual(cs.before, "9ee0caba8648aa0b8b5fc68ebc37c3c1162aa283")
self.assertEqual(
cs.check_runs_url,
"https://api.github.com/repos/wrecker/PySample/check-suites/1004503837/check-runs",
)
self.assertEqual(cs.conclusion, "success")
self.assertEqual(cs.created_at, datetime(2020, 8, 4, 5, 6, 54))
self.assertEqual(cs.head_branch, "wrecker-patch-1")
self.assertEqual(cs.head_commit.sha, "fd09d934bcce792176d6b79d6d0387e938b62b7a")
self.assertEqual(cs.head_sha, "fd09d934bcce792176d6b79d6d0387e938b62b7a")
self.assertEqual(cs.id, self.check_suite_id)
self.assertEqual(cs.latest_check_runs_count, 2)
self.assertEqual(cs.id, self.check_suite_id)
self.assertEqual(len(cs.pull_requests), 1)
self.assertEqual(cs.pull_requests[0].id, 462527907)
self.assertEqual(
cs.repository.url, "https://api.github.com/repos/wrecker/PySample"
)
self.assertEqual(cs.status, "completed")
self.assertEqual(cs.updated_at, datetime(2020, 8, 4, 5, 7, 40))
self.assertEqual(
cs.url,
"https://api.github.com/repos/wrecker/PySample/check-suites/1004503837",
)
def testGetCheckSuitesForRef(self):
check_suites = self.commit.get_check_suites()
self.assertEqual(check_suites.totalCount, 6)
self.assertListEqual(
[cs.id for cs in check_suites],
[1004503392, 1004503393, 1004503395, 1004503397, 1004503837, 1004503857],
)
def testGetCheckSuitesForRefFilterByAppId(self):
check_suites = self.commit.get_check_suites(app_id=29110)
self.assertEqual(check_suites.totalCount, 1)
self.assertListEqual([cs.id for cs in check_suites], [1004503392])
def testGetCheckSuitesForRefFilterByCheckName(self):
check_suites = self.commit.get_check_suites(check_name="Alex")
self.assertEqual(check_suites.totalCount, 1)
self.assertListEqual([cs.id for cs in check_suites], [1004503395])
def testCheckSuiteRerequest(self):
cs = self.repo.get_check_suite(1004503395)
status = cs.rerequest()
self.assertTrue(status)
def testGetCheckRuns(self):
check_runs = self.test_check_suite.get_check_runs()
self.assertEqual(check_runs.totalCount, 8)
self.assertListEqual(
[cr.id for cr in check_runs],
[
1278952206,
1279259090,
1280450752,
1280914700,
1296027873,
1296028076,
1296029378,
1296029552,
],
)
def testGetCheckRunsFilterByCheckName(self):
check_runs = self.test_check_suite.get_check_runs(check_name="Testing")
self.assertEqual(check_runs.totalCount, 1)
self.assertEqual([cr.id for cr in check_runs], [1278952206])
def testGetCheckRunsFilterByStatus(self):
check_runs = self.test_check_suite.get_check_runs(status="completed")
self.assertEqual(check_runs.totalCount, 8)
self.assertListEqual(
[cr.id for cr in check_runs],
[
1278952206,
1279259090,
1280450752,
1280914700,
1296027873,
1296028076,
1296029378,
1296029552,
],
)
def testGetCheckRunsFilterByFilter(self):
check_runs = self.test_check_suite.get_check_runs(filter="all")
self.assertEqual(check_runs.totalCount, 8)
self.assertListEqual(
[cr.id for cr in check_runs],
[
1278952206,
1279259090,
1280450752,
1280914700,
1296027873,
1296028076,
1296029378,
1296029552,
],
)
def testCreateCheckSuite(self):
sha = "e5868bd5a9ccdd65c9c979250e11105f4c88faf4"
check_suite = self.test_repo.create_check_suite(head_sha=sha)
self.assertEqual(check_suite.head_sha, sha)
self.assertEqual(check_suite.status, "queued")
self.assertIsNone(check_suite.conclusion)
def testUpdateCheckSuitesPreferences(self):
data = [{"app_id": 85429, "setting": False}]
repo_preferences = self.test_repo.update_check_suites_preferences(data)
setting = None
for app in repo_preferences.preferences["auto_trigger_checks"]:
if app["app_id"] == data[0]["app_id"]:
setting = app["setting"]
self.assertFalse(setting)
self.assertEqual(
repo_preferences.repository.full_name, "dhruvmanila/pygithub-testing"
)
data = [{"app_id": 85429, "setting": True}]
repo_preferences = self.test_repo.update_check_suites_preferences(data)
for app in repo_preferences.preferences["auto_trigger_checks"]:
if app["app_id"] == data[0]["app_id"]:
setting = app["setting"]
self.assertTrue(setting)
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,22 @@
https
GET
api.github.com
None
/repos/dhruvmanila/pygithub-testing/check-suites/1366665055/check-runs?check_name=Testing&per_page=1
{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
200
[('Date', 'Fri, 27 Nov 2020 18:35:04 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/"5704d63e4d53f67dabee3f79e6a77748afc2e412f1da4b0b1ffdc7008db82256"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4987'), ('X-RateLimit-Reset', '1606505666'), ('X-RateLimit-Used', '13'), ('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', 'D0C9:0AE1:27F673:339262:5FC146D8')]
{"total_count":1,"check_runs":[{"id":1278952206,"node_id":"MDg6Q2hlY2tSdW4xMjc4OTUyMjA2","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1278952206","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1278952206","details_url":"https://github.com/dhruvmanila/pygithub-testing","status":"completed","conclusion":"success","started_at":"2020-10-20T04:22:04Z","completed_at":"2020-10-20T04:22:04Z","output":{"title":"Testing","summary":"This is a test for output dictionary.","text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1278952206/annotations"},"name":"Testing","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","issues":"write","metadata":"read","pull_requests":"write","workflows":"write"},"events":["check_run","check_suite","issues","issue_comment","pull_request","pull_request_review","pull_request_review_comment","workflow_run"]},"pull_requests":[]}]}
https
GET
api.github.com
None
/repos/dhruvmanila/pygithub-testing/check-suites/1366665055/check-runs?check_name=Testing
{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
200
[('Date', 'Fri, 27 Nov 2020 18:35:04 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/"5704d63e4d53f67dabee3f79e6a77748afc2e412f1da4b0b1ffdc7008db82256"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4986'), ('X-RateLimit-Reset', '1606505666'), ('X-RateLimit-Used', '14'), ('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', 'D0CA:1863:26FF7A:325AB0:5FC146D8')]
{"total_count":1,"check_runs":[{"id":1278952206,"node_id":"MDg6Q2hlY2tSdW4xMjc4OTUyMjA2","head_sha":"0283d46537193f1fed7d46859f15c5304b9836f9","external_id":"","url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1278952206","html_url":"https://github.com/dhruvmanila/pygithub-testing/runs/1278952206","details_url":"https://github.com/dhruvmanila/pygithub-testing","status":"completed","conclusion":"success","started_at":"2020-10-20T04:22:04Z","completed_at":"2020-10-20T04:22:04Z","output":{"title":"Testing","summary":"This is a test for output dictionary.","text":null,"annotations_count":0,"annotations_url":"https://api.github.com/repos/dhruvmanila/pygithub-testing/check-runs/1278952206/annotations"},"name":"Testing","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","issues":"write","metadata":"read","pull_requests":"write","workflows":"write"},"events":["check_run","check_suite","issues","issue_comment","pull_request","pull_request_review","pull_request_review_comment","workflow_run"]},"pull_requests":[]}]}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,22 @@
https
PATCH
api.github.com
None
/repos/dhruvmanila/pygithub-testing/check-suites/preferences
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'}
{"auto_trigger_checks": [{"app_id": 85429, "setting": false}]}
200
[('Date', 'Fri, 27 Nov 2020 20:31:49 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/"29056a6c6a03863de1dcb1d31f3b7212c3a460108a1dd923b54f36c006c7cb7a"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4984'), ('X-RateLimit-Reset', '1606511185'), ('X-RateLimit-Used', '16'), ('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', 'D598:2E70:313595:3D6087:5FC16235')]
{"preferences":{"auto_trigger_checks":[{"app_id":67,"setting":true},{"app_id":85429,"setting":false},{"app_id":86183,"setting":true}]},"repository":{"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"}}
https
PATCH
api.github.com
None
/repos/dhruvmanila/pygithub-testing/check-suites/preferences
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'}
{"auto_trigger_checks": [{"app_id": 85429, "setting": true}]}
200
[('Date', 'Fri, 27 Nov 2020 20:31:50 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/"2df2e582a88bdbf265e18c6e813181a1913e6de09e4ff93e1b0c8dcb1deceb05"'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4983'), ('X-RateLimit-Reset', '1606511185'), ('X-RateLimit-Used', '17'), ('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', 'D599:231D:2B289E:375246:5FC16235')]
{"preferences":{"auto_trigger_checks":[{"app_id":67,"setting":true},{"app_id":85429,"setting":true},{"app_id":86183,"setting":true}]},"repository":{"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"}}