mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
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:
co-authored by
Raju Subramanian
parent
197e065372
commit
6d501b286e
+33
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user