mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Fix/types for repo topic team (#2341)
Co-authored-by: Liuyang Wan <tsfdye@gmail.com>
This commit is contained in:
co-authored by
Liuyang Wan
parent
a71cd37a86
commit
db9337a4ee
+19
-5
@@ -106,8 +106,8 @@ class Repository(CompletableGithubObject):
|
||||
def contributors_url(self) -> str: ...
|
||||
def create_check_run(
|
||||
self,
|
||||
name: str = ...,
|
||||
head_sha: str = ...,
|
||||
name: str,
|
||||
head_sha: str,
|
||||
details_url: Union[_NotSetType, str] = ...,
|
||||
external_id: Union[_NotSetType, str] = ...,
|
||||
status: Union[_NotSetType, str] = ...,
|
||||
@@ -214,7 +214,9 @@ class Repository(CompletableGithubObject):
|
||||
description: Union[str, _NotSetType] = ...,
|
||||
due_on: Union[date, _NotSetType] = ...,
|
||||
) -> Milestone: ...
|
||||
def create_project(self, name: str, body: str = ...) -> Project: ...
|
||||
def create_project(
|
||||
self, name: str, body: Union[str, _NotSetType] = ...
|
||||
) -> Project: ...
|
||||
@overload
|
||||
def create_pull(
|
||||
self,
|
||||
@@ -237,7 +239,7 @@ class Repository(CompletableGithubObject):
|
||||
issue: Issue,
|
||||
) -> PullRequest: ...
|
||||
def create_repository_dispatch(
|
||||
self, event_type: str, client_payload: Dict[str, Any]
|
||||
self, event_type: str, client_payload: Union[Dict[str, Any], _NotSetType] = ...
|
||||
) -> bool: ...
|
||||
def create_secret(self, secret_name: str, unencrypted_value: str) -> bool: ...
|
||||
def delete_secret(self, secret_name: str) -> bool: ...
|
||||
@@ -466,7 +468,13 @@ class Repository(CompletableGithubObject):
|
||||
def get_workflow(self, id_or_name: Union[str, int]) -> Workflow: ...
|
||||
def get_workflows(self) -> PaginatedList[Workflow]: ...
|
||||
def get_workflow_run(self, id_: int) -> WorkflowRun: ...
|
||||
def get_workflow_runs(self) -> PaginatedList[WorkflowRun]: ...
|
||||
def get_workflow_runs(
|
||||
self,
|
||||
actor: Union[NamedUser, _NotSetType] = ...,
|
||||
branch: Union[Branch, _NotSetType] = ...,
|
||||
event: Union[str, _NotSetType] = ...,
|
||||
status: Union[str, _NotSetType] = ...,
|
||||
) -> PaginatedList[WorkflowRun]: ...
|
||||
def update_check_suites_preferences(
|
||||
self, auto_trigger_checks: List[Dict[str, Union[bool, int]]]
|
||||
) -> RepositoryPreferences: ...
|
||||
@@ -499,6 +507,8 @@ class Repository(CompletableGithubObject):
|
||||
@property
|
||||
def id(self) -> int: ...
|
||||
@property
|
||||
def is_template(self) -> bool: ...
|
||||
@property
|
||||
def issue_comment_url(self) -> str: ...
|
||||
@property
|
||||
def issue_events_url(self) -> str: ...
|
||||
@@ -587,6 +597,8 @@ class Repository(CompletableGithubObject):
|
||||
@property
|
||||
def teams_url(self) -> str: ...
|
||||
@property
|
||||
def topics(self) -> List[str]: ...
|
||||
@property
|
||||
def trees_url(self) -> str: ...
|
||||
def unsubscribe_from_hub(self, event: str, callback: str) -> None: ...
|
||||
def update_file(
|
||||
@@ -604,6 +616,8 @@ class Repository(CompletableGithubObject):
|
||||
@property
|
||||
def url(self) -> str: ...
|
||||
@property
|
||||
def visibility(self) -> str: ...
|
||||
@property
|
||||
def watchers(self) -> int: ...
|
||||
@property
|
||||
def watchers_count(self) -> int: ...
|
||||
|
||||
@@ -5,6 +5,7 @@ from github.NamedUser import NamedUser
|
||||
from github.Organization import Organization
|
||||
from github.Membership import Membership
|
||||
from github.PaginatedList import PaginatedList
|
||||
from github.Permissions import Permissions
|
||||
from github.Repository import Repository
|
||||
from github.TeamDiscussion import TeamDiscussion
|
||||
|
||||
@@ -20,6 +21,10 @@ class Team(CompletableGithubObject):
|
||||
def add_to_members(self, member: NamedUser) -> None: ...
|
||||
def get_team_membership(self, member: Union[str, NamedUser]) -> Membership: ...
|
||||
def add_to_repos(self, repo: Repository) -> None: ...
|
||||
def get_repo_permission(
|
||||
self, repo: Repository
|
||||
) -> Union[Permissions, _NotSetType]: ...
|
||||
def update_team_repository(self, repo: Repository, permission: str) -> bool: ...
|
||||
def delete(self) -> None: ...
|
||||
@property
|
||||
def description(self) -> str: ...
|
||||
@@ -30,6 +35,7 @@ class Team(CompletableGithubObject):
|
||||
permission: Union[str, _NotSetType] = ...,
|
||||
privacy: Union[str, _NotSetType] = ...,
|
||||
) -> None: ...
|
||||
def get_teams(self) -> PaginatedList[Team]: ...
|
||||
def get_discussions(self) -> PaginatedList[TeamDiscussion]: ...
|
||||
def get_members(
|
||||
self, role: Union[str, _NotSetType] = ...
|
||||
@@ -65,4 +71,6 @@ class Team(CompletableGithubObject):
|
||||
@property
|
||||
def url(self) -> str: ...
|
||||
@property
|
||||
def parent(self) -> Union[Team, _NotSetType]: ...
|
||||
@property
|
||||
def html_url(self) -> str: ...
|
||||
|
||||
+19
-3
@@ -1,3 +1,5 @@
|
||||
import datetime
|
||||
|
||||
from typing import Any, Dict
|
||||
|
||||
from github.GithubObject import NonCompletableGithubObject
|
||||
@@ -7,10 +9,24 @@ class Topic(NonCompletableGithubObject):
|
||||
def _initAttributes(self) -> None: ...
|
||||
def _useAttributes(self, attributes: Dict[str, Any]) -> None: ...
|
||||
@property
|
||||
def description(self) -> str: ...
|
||||
def name(self) -> str: ...
|
||||
@property
|
||||
def display_name(self) -> str: ...
|
||||
@property
|
||||
def name(self) -> str: ...
|
||||
@property
|
||||
def short_description(self) -> str: ...
|
||||
@property
|
||||
def description(self) -> str: ...
|
||||
@property
|
||||
def created_by(self) -> str: ...
|
||||
@property
|
||||
def released(self) -> str: ...
|
||||
@property
|
||||
def created_at(self) -> datetime.datetime: ...
|
||||
@property
|
||||
def updated_at(self) -> datetime.datetime: ...
|
||||
@property
|
||||
def featured(self) -> bool: ...
|
||||
@property
|
||||
def curated(self) -> bool: ...
|
||||
@property
|
||||
def score(self) -> float: ...
|
||||
|
||||
Reference in New Issue
Block a user