mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
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:
This commit is contained in:
@@ -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]]]: ...
|
||||
|
||||
Reference in New Issue
Block a user