GitHubKitOwner
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| BaseOwner githarbor.core.base Base class for repository owners. |
â‹” Inheritance diagram¶
graph TD
498046126["owner.GitHubKitOwner"]
697273899["base.BaseOwner"]
2751680898["builtins.object"]
697273899 --> 498046126
2751680898 --> 697273899
🛈 DocStrings¶
Bases: BaseOwner
Owner implementation using GitHubKit.
Source code in src/githarbor/providers/githubkit_provider/owner.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
__init__
¶
Initialize GitHub API client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Username of the owner |
required |
token
|
str | None
|
GitHub access token |
None
|
Source code in src/githarbor/providers/githubkit_provider/owner.py
create_repository_async
async
¶
create_repository_async(name: str, description: str = '', private: bool = False) -> BaseRepository
Create a new repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Repository name |
required |
description
|
str
|
Repository description |
''
|
private
|
bool
|
Whether to create a private repository |
False
|
Returns:
| Type | Description |
|---|---|
BaseRepository
|
Newly created repository |
Source code in src/githarbor/providers/githubkit_provider/owner.py
delete_repository_async
async
¶
Delete a repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of repository to delete |
required |
Source code in src/githarbor/providers/githubkit_provider/owner.py
from_url
classmethod
¶
from_url(url: str, **kwargs: Any) -> GitHubKitOwner
Create instance from URL.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
URL like "https://github.com/octocat" |
required |
**kwargs
|
Any
|
Additional arguments including token |
{}
|
Source code in src/githarbor/providers/githubkit_provider/owner.py
get_user_async
async
¶
get_user_async() -> User
Get user information.
Source code in src/githarbor/providers/githubkit_provider/owner.py
list_repos_owned_by_user
async
¶
List repositories owned by user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
headers
|
dict[str, str] | None
|
Optional additional headers to pass |
None
|
Returns:
| Type | Description |
|---|---|
list[dict[str, Any]]
|
List of repository data |
Source code in src/githarbor/providers/githubkit_provider/owner.py
list_repositories_async
async
¶
list_repositories_async() -> list[BaseRepository]
List all repositories owned by this user.