Add support for Workflow Runs (#1583)

To build on the previous work supporting querying Workflows for GitHub
Actions, add a class and relevant methods to support querying runs of a
workflow.
This commit is contained in:
Steve Kowalik
2020-06-26 20:47:42 +10:00
committed by GitHub
parent 4ed7aaf8e5
commit 4fb1d23f4d
18 changed files with 784 additions and 2 deletions
+63
View File
@@ -0,0 +1,63 @@
from datetime import datetime
from typing import Any, Dict, NamedTuple, List
from github.GitCommit import GitCommit
from github.GithubObject import CompletableGithubObject
from github.PullRequest import PullRequest
from github.Repository import Repository
class TimingData(NamedTuple):
billable: Dict[str, Dict[str, int]]
run_duration_ms: int
class WorkflowRun(CompletableGithubObject):
def __repr__(self) -> str: ...
def _initAttributes(self) -> None: ...
def _useAttributes(self, attributes: Dict[str, Any]) -> None: ...
@property
def id(self) -> int: ...
@property
def head_branch(self) -> str: ...
@property
def head_sha(self) -> str: ...
@property
def run_number(self) -> int: ...
@property
def event(self) -> str: ...
@property
def status(self) -> str: ...
@property
def conclusion(self) -> str: ...
@property
def url(self) -> str: ...
@property
def html_url(self) -> str: ...
@property
def pull_requests(self) -> List[PullRequest]: ...
@property
def created_at(self) -> datetime: ...
@property
def updated_at(self) -> datetime: ...
@property
def jobs_url(self) -> str: ...
@property
def logs_url(self) -> str: ...
@property
def check_suite_url(self) -> str: ...
@property
def artifacts_url(self) -> str: ...
@property
def cancel_url(self) -> str: ...
@property
def rerun_url(self) -> str: ...
@property
def workflow_url(self) -> str: ...
@property
def head_commit(self) -> GitCommit: ...
@property
def repository(self) -> Repository: ...
@property
def head_repository(self) -> Repository: ...
def cancel(self) -> bool: ...
def rerun(self) -> bool: ...
def timing(self) -> TimingData: ...