Skip to content

base

Class info

Classes

Name Children Inherits
BaseOwner
githarbor.core.base
Base class for repository owners.
BaseRepository
githarbor.core.base
Base repository class. All methods raise FeatureNotSupportedError by default.

🛈 DocStrings

Base repository class. All methods raise FeatureNotSupportedError by default.

BaseOwner

Base class for repository owners.

Source code in src/githarbor/core/base.py
class BaseOwner:
    """Base class for repository owners."""

    is_async: ClassVar[bool] = False
    url_patterns: ClassVar[list[str]] = []
    _name: str = ""

    def list_repositories(self) -> list[BaseRepository]:
        msg = f"{self.__class__.__name__} does not implement list_repositories"
        raise FeatureNotSupportedError(msg)

    @property
    def name(self) -> str:
        """The name of the repository."""
        return self._name

    def create_repository(
        self,
        name: str,
        description: str = "",
        private: bool = False,
    ) -> BaseRepository:
        msg = f"{self.__class__.__name__} does not implement create_repository"
        raise FeatureNotSupportedError(msg)

    def get_user(self) -> User:
        msg = f"{self.__class__.__name__} does not implement get_user"
        raise FeatureNotSupportedError(msg)

    def delete_repository(self, name: str) -> None:
        msg = f"{self.__class__.__name__} does not implement delete_repository"
        raise FeatureNotSupportedError(msg)

    async def list_repositories_async(self) -> list[BaseRepository]:
        """List repositories asynchronously."""
        msg = f"{self.__class__.__name__} does not implement list_repositories_async"
        raise FeatureNotSupportedError(msg)

    async def create_repository_async(
        self,
        name: str,
        description: str = "",
        private: bool = False,
    ) -> BaseRepository:
        """Create repository asynchronously."""
        msg = f"{self.__class__.__name__} does not implement create_repository_async"
        raise FeatureNotSupportedError(msg)

    async def get_user_async(self) -> User:
        """Get user information asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_user_async"
        raise FeatureNotSupportedError(msg)

    async def delete_repository_async(self, name: str) -> None:
        """Delete repository asynchronously."""
        msg = f"{self.__class__.__name__} does not implement delete_repository_async"
        raise FeatureNotSupportedError(msg)

    @classmethod
    def supports_url(cls, url: str) -> bool:
        return any(pattern in url for pattern in cls.url_patterns)

    @classmethod
    def from_url(cls, url: str, **kwargs: Any) -> BaseOwner:
        msg = f"{cls.__name__} does not implement from_url"
        raise FeatureNotSupportedError(msg)

name property

name: str

The name of the repository.

create_repository_async async

create_repository_async(name: str, description: str = '', private: bool = False) -> BaseRepository

Create repository asynchronously.

Source code in src/githarbor/core/base.py
async def create_repository_async(
    self,
    name: str,
    description: str = "",
    private: bool = False,
) -> BaseRepository:
    """Create repository asynchronously."""
    msg = f"{self.__class__.__name__} does not implement create_repository_async"
    raise FeatureNotSupportedError(msg)

delete_repository_async async

delete_repository_async(name: str) -> None

Delete repository asynchronously.

Source code in src/githarbor/core/base.py
async def delete_repository_async(self, name: str) -> None:
    """Delete repository asynchronously."""
    msg = f"{self.__class__.__name__} does not implement delete_repository_async"
    raise FeatureNotSupportedError(msg)

get_user_async async

get_user_async() -> User

Get user information asynchronously.

Source code in src/githarbor/core/base.py
async def get_user_async(self) -> User:
    """Get user information asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_user_async"
    raise FeatureNotSupportedError(msg)

list_repositories_async async

list_repositories_async() -> list[BaseRepository]

List repositories asynchronously.

Source code in src/githarbor/core/base.py
async def list_repositories_async(self) -> list[BaseRepository]:
    """List repositories asynchronously."""
    msg = f"{self.__class__.__name__} does not implement list_repositories_async"
    raise FeatureNotSupportedError(msg)

BaseRepository

Base repository class. All methods raise FeatureNotSupportedError by default.

Source code in src/githarbor/core/base.py
 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
class BaseRepository:
    """Base repository class. All methods raise FeatureNotSupportedError by default."""

    is_async: ClassVar[bool] = False
    url_patterns: ClassVar[list[str]] = []
    _owner: str = ""
    _name: str = ""

    @property
    def name(self) -> str:
        """The name of the repository."""
        return self._name

    @property
    def owner(self) -> str:
        """The owner of the repository."""
        return self._owner

    @property
    def default_branch(self) -> str:
        """The default branch of this repository."""
        raise NotImplementedError

    @property
    def edit_base_uri(self) -> str | None:
        """The edit uri prefix of a repository."""
        return None

    @classmethod
    def supports_url(cls, url: str) -> bool:
        return any(pattern in url for pattern in cls.url_patterns)

    @classmethod
    def from_url(cls, url: str, **kwargs: Any) -> BaseRepository:
        msg = f"{cls.__name__} does not implement from_url"
        raise FeatureNotSupportedError(msg)

    def get_repo_user(self) -> User:
        msg = f"{self.__class__.__name__} does not implement get_repo_user"
        raise FeatureNotSupportedError(msg)

    def get_branch(self, name: str) -> Branch:
        msg = f"{self.__class__.__name__} does not implement get_branch"
        raise FeatureNotSupportedError(msg)

    def list_branches(self) -> list[Branch]:
        msg = f"{self.__class__.__name__} does not implement list_branches"
        raise FeatureNotSupportedError(msg)

    def get_pull_request(self, number: int) -> PullRequest:
        msg = f"{self.__class__.__name__} does not implement get_pull_request"
        raise FeatureNotSupportedError(msg)

    def list_pull_requests(self, state: PullRequestState = "open") -> list[PullRequest]:
        msg = f"{self.__class__.__name__} does not implement list_pull_requests"
        raise FeatureNotSupportedError(msg)

    def get_issue(self, issue_id: int) -> Issue:
        msg = f"{self.__class__.__name__} does not implement get_issue"
        raise FeatureNotSupportedError(msg)

    def list_issues(self, state: IssueState = "open") -> list[Issue]:
        msg = f"{self.__class__.__name__} does not implement list_issues"
        raise FeatureNotSupportedError(msg)

    def create_issue(
        self,
        title: str,
        body: str,
        labels: list[str] | None = None,
        assignees: list[str] | None = None,
    ) -> Issue:
        """Create a new issue."""
        msg = f"{self.__class__.__name__} does not implement create_issue"
        raise FeatureNotSupportedError(msg)

    def get_commit(self, sha: str) -> Commit:
        msg = f"{self.__class__.__name__} does not implement get_commit"
        raise FeatureNotSupportedError(msg)

    def list_commits(
        self,
        branch: str | None = None,
        since: datetime | None = None,
        until: datetime | None = None,
        author: str | None = None,
        path: str | None = None,
        max_results: int | None = None,
    ) -> list[Commit]:
        msg = f"{self.__class__.__name__} does not implement list_commits"
        raise FeatureNotSupportedError(msg)

    def get_workflow(self, workflow_id: str) -> Workflow:
        msg = f"{self.__class__.__name__} does not implement get_workflow"
        raise FeatureNotSupportedError(msg)

    def list_workflows(self) -> list[Workflow]:
        msg = f"{self.__class__.__name__} does not implement list_workflows"
        raise FeatureNotSupportedError(msg)

    def get_workflow_run(self, run_id: str) -> WorkflowRun:
        msg = f"{self.__class__.__name__} does not implement get_workflow_run"
        raise FeatureNotSupportedError(msg)

    def download(
        self,
        path: str,
        destination: JoinablePathLike,
        recursive: bool = False,
    ) -> None:
        msg = f"{self.__class__.__name__} does not implement download"
        raise FeatureNotSupportedError(msg)

    def search_commits(
        self,
        query: str,
        branch: str | None = None,
        path: str | None = None,
        max_results: int | None = None,
    ) -> list[Commit]:
        msg = f"{self.__class__.__name__} does not implement search_commits"
        raise FeatureNotSupportedError(msg)

    def iter_files(
        self,
        path: str = "",
        ref: str | None = None,
        pattern: str | None = None,
    ) -> Iterator[str]:
        msg = f"{self.__class__.__name__} does not implement iter_files"
        raise FeatureNotSupportedError(msg)

    def get_contributors(
        self,
        sort_by: Literal["commits", "name", "date"] = "commits",
        limit: int | None = None,
    ) -> list[User]:
        msg = f"{self.__class__.__name__} does not implement get_contributors"
        raise FeatureNotSupportedError(msg)

    def get_languages(self) -> dict[str, int]:
        msg = f"{self.__class__.__name__} does not implement get_languages"
        raise FeatureNotSupportedError(msg)

    def compare_branches(
        self,
        base: str,
        head: str,
        include_commits: bool = True,
        include_files: bool = True,
        include_stats: bool = True,
    ) -> dict[str, Any]:
        msg = f"{self.__class__.__name__} does not implement compare_branches"
        raise FeatureNotSupportedError(msg)

    def get_latest_release(
        self,
        include_drafts: bool = False,
        include_prereleases: bool = False,
    ) -> Release:
        msg = f"{self.__class__.__name__} does not implement get_latest_release"
        raise FeatureNotSupportedError(msg)

    def list_releases(
        self,
        include_drafts: bool = False,
        include_prereleases: bool = False,
        limit: int | None = None,
    ) -> list[Release]:
        msg = f"{self.__class__.__name__} does not implement list_releases"
        raise FeatureNotSupportedError(msg)

    def get_release(self, tag: str) -> Release:
        msg = f"{self.__class__.__name__} does not implement get_release"
        raise FeatureNotSupportedError(msg)

    def get_tag(self, name: str) -> Tag:
        msg = f"{self.__class__.__name__} does not implement get_tag"
        raise FeatureNotSupportedError(msg)

    def list_tags(self) -> list[Tag]:
        msg = f"{self.__class__.__name__} does not implement list_tags"
        raise FeatureNotSupportedError(msg)

    def create_pull_request(
        self,
        title: str,
        body: str,
        head_branch: str,
        base_branch: str,
        draft: bool = False,
    ) -> PullRequest:
        msg = f"{self.__class__.__name__} does not implement create_pull_request"
        raise FeatureNotSupportedError(msg)

    def create_branch(
        self,
        name: str,
        base_commit: str,
    ) -> Branch:
        """Create a new branch at the specified commit."""
        msg = f"{self.__class__.__name__} does not implement create_branch"
        raise FeatureNotSupportedError(msg)

    def create_pull_request_from_diff(
        self,
        title: str,
        body: str,
        base_branch: str,
        diff: str,
        head_branch: str | None = None,
        draft: bool = False,
    ) -> PullRequest:
        """Create a pull request from a diff string."""
        msg = f"{self.__class__.__name__} does not implement create_pull_request_from_diff"
        raise FeatureNotSupportedError(msg)

    def add_pull_request_comment(
        self,
        number: int,
        body: str,
    ) -> Comment:
        msg = f"{self.__class__.__name__} does not implement add_pull_request_comment"
        raise FeatureNotSupportedError(msg)

    def add_pull_request_review_comment(
        self,
        number: int,
        body: str,
        commit_id: str,
        path: str,
        position: int,
    ) -> Comment:
        fn_name = "add_pull_request_review_comment"
        msg = f"{self.__class__.__name__} does not implement {fn_name}"
        raise FeatureNotSupportedError(msg)

    async def get_repo_user_async(self) -> User:
        """Get repository owner information asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_repo_user_async"
        raise FeatureNotSupportedError(msg)

    async def get_branch_async(self, name: str) -> Branch:
        """Get branch information asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_branch_async"
        raise FeatureNotSupportedError(msg)

    async def get_pull_request_async(self, number: int) -> PullRequest:
        """Get pull request information asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_pull_request_async"
        raise FeatureNotSupportedError(msg)

    async def list_pull_requests_async(
        self,
        state: PullRequestState = "open",
    ) -> list[PullRequest]:
        """List pull requests asynchronously."""
        msg = f"{self.__class__.__name__} does not implement list_pull_requests_async"
        raise FeatureNotSupportedError(msg)

    async def get_issue_async(self, issue_id: int) -> Issue:
        """Get issue information asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_issue_async"
        raise FeatureNotSupportedError(msg)

    async def list_issues_async(self, state: IssueState = "open") -> list[Issue]:
        """List issues asynchronously."""
        msg = f"{self.__class__.__name__} does not implement list_issues_async"
        raise FeatureNotSupportedError(msg)

    async def create_issue_async(
        self,
        title: str,
        body: str,
        labels: list[str] | None = None,
        assignees: list[str] | None = None,
    ) -> Issue:
        """Create a new issue asynchronously."""
        msg = f"{self.__class__.__name__} does not implement create_issue_async"
        raise FeatureNotSupportedError(msg)

    async def get_commit_async(self, sha: str) -> Commit:
        """Get commit information asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_commit_async"
        raise FeatureNotSupportedError(msg)

    async def list_commits_async(
        self,
        branch: str | None = None,
        since: datetime | None = None,
        until: datetime | None = None,
        author: str | None = None,
        path: str | None = None,
        max_results: int | None = None,
    ) -> list[Commit]:
        """List commits asynchronously."""
        msg = f"{self.__class__.__name__} does not implement list_commits_async"
        raise FeatureNotSupportedError(msg)

    async def get_workflow_async(self, workflow_id: str) -> Workflow:
        """Get workflow information asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_workflow_async"
        raise FeatureNotSupportedError(msg)

    async def list_workflows_async(self) -> list[Workflow]:
        """List workflows asynchronously."""
        msg = f"{self.__class__.__name__} does not implement list_workflows_async"
        raise FeatureNotSupportedError(msg)

    async def get_workflow_run_async(self, run_id: str) -> WorkflowRun:
        """Get workflow run information asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_workflow_run_async"
        raise FeatureNotSupportedError(msg)

    async def download_async(
        self,
        path: str,
        destination: JoinablePathLike,
        recursive: bool = False,
    ) -> None:
        """Download repository content asynchronously."""
        msg = f"{self.__class__.__name__} does not implement download_async"
        raise FeatureNotSupportedError(msg)

    async def search_commits_async(
        self,
        query: str,
        branch: str | None = None,
        path: str | None = None,
        max_results: int | None = None,
    ) -> list[Commit]:
        """Search commits asynchronously."""
        msg = f"{self.__class__.__name__} does not implement search_commits_async"
        raise FeatureNotSupportedError(msg)

    async def get_contributors_async(
        self,
        sort_by: Literal["commits", "name", "date"] = "commits",
        limit: int | None = None,
    ) -> list[User]:
        """Get repository contributors asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_contributors_async"
        raise FeatureNotSupportedError(msg)

    async def get_languages_async(self) -> dict[str, int]:
        """Get repository language statistics asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_languages_async"
        raise FeatureNotSupportedError(msg)

    async def compare_branches_async(
        self,
        base: str,
        head: str,
        include_commits: bool = True,
        include_files: bool = True,
        include_stats: bool = True,
    ) -> dict[str, Any]:
        """Compare two branches asynchronously."""
        msg = f"{self.__class__.__name__} does not implement compare_branches_async"
        raise FeatureNotSupportedError(msg)

    async def get_latest_release_async(
        self,
        include_drafts: bool = False,
        include_prereleases: bool = False,
    ) -> Release:
        """Get latest release asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_latest_release_async"
        raise FeatureNotSupportedError(msg)

    async def list_releases_async(
        self,
        include_drafts: bool = False,
        include_prereleases: bool = False,
        limit: int | None = None,
    ) -> list[Release]:
        """List releases asynchronously."""
        msg = f"{self.__class__.__name__} does not implement list_releases_async"
        raise FeatureNotSupportedError(msg)

    async def get_release_async(self, tag: str) -> Release:
        """Get release by tag asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_release_async"
        raise FeatureNotSupportedError(msg)

    async def get_tag_async(self, name: str) -> Tag:
        """Get tag information asynchronously."""
        msg = f"{self.__class__.__name__} does not implement get_tag_async"
        raise FeatureNotSupportedError(msg)

    async def list_tags_async(self) -> list[Tag]:
        """List all tags asynchronously."""
        msg = f"{self.__class__.__name__} does not implement list_tags_async"
        raise FeatureNotSupportedError(msg)

    async def list_branches_async(self) -> list[Branch]:
        """List all branches asynchronously."""
        msg = f"{self.__class__.__name__} does not implement list_branches_async"
        raise FeatureNotSupportedError(msg)

    async def create_pull_request_async(
        self,
        title: str,
        body: str,
        head_branch: str,
        base_branch: str,
        draft: bool = False,
    ) -> PullRequest:
        msg = f"{self.__class__.__name__} does not implement create_pull_request_async"
        raise FeatureNotSupportedError(msg)

    async def create_branch_async(
        self,
        name: str,
        base_commit: str,
    ) -> Branch:
        """Create a new branch at the specified commit asynchronously."""
        msg = f"{self.__class__.__name__} does not implement create_branch_async"
        raise FeatureNotSupportedError(msg)

    async def add_pull_request_comment_async(
        self,
        number: int,
        body: str,
    ) -> Comment:
        msg = f"{self.__class__.__name__} does not implement add_pull_request_comment_async"
        raise FeatureNotSupportedError(msg)

    async def add_pull_request_review_comment_async(
        self,
        number: int,
        body: str,
        commit_id: str,
        path: str,
        position: int,
    ) -> Comment:
        fn_name = "add_pull_request_review_comment_async"
        msg = f"{self.__class__.__name__} does not implement {fn_name}"
        raise FeatureNotSupportedError(msg)

    async def create_pull_request_from_diff_async(
        self,
        title: str,
        body: str,
        base_branch: str,
        diff: str,
        head_branch: str | None = None,
        draft: bool = False,
    ) -> PullRequest:
        """Create a pull request from a diff string asynchronously."""
        fn_name = "create_pull_request_from_diff_async"
        msg = f"{self.__class__.__name__} does not implement {fn_name}"
        raise FeatureNotSupportedError(msg)

default_branch property

default_branch: str

The default branch of this repository.

edit_base_uri property

edit_base_uri: str | None

The edit uri prefix of a repository.

name property

name: str

The name of the repository.

owner property

owner: str

The owner of the repository.

compare_branches_async async

compare_branches_async(
    base: str,
    head: str,
    include_commits: bool = True,
    include_files: bool = True,
    include_stats: bool = True,
) -> dict[str, Any]

Compare two branches asynchronously.

Source code in src/githarbor/core/base.py
async def compare_branches_async(
    self,
    base: str,
    head: str,
    include_commits: bool = True,
    include_files: bool = True,
    include_stats: bool = True,
) -> dict[str, Any]:
    """Compare two branches asynchronously."""
    msg = f"{self.__class__.__name__} does not implement compare_branches_async"
    raise FeatureNotSupportedError(msg)

create_branch

create_branch(name: str, base_commit: str) -> Branch

Create a new branch at the specified commit.

Source code in src/githarbor/core/base.py
def create_branch(
    self,
    name: str,
    base_commit: str,
) -> Branch:
    """Create a new branch at the specified commit."""
    msg = f"{self.__class__.__name__} does not implement create_branch"
    raise FeatureNotSupportedError(msg)

create_branch_async async

create_branch_async(name: str, base_commit: str) -> Branch

Create a new branch at the specified commit asynchronously.

Source code in src/githarbor/core/base.py
async def create_branch_async(
    self,
    name: str,
    base_commit: str,
) -> Branch:
    """Create a new branch at the specified commit asynchronously."""
    msg = f"{self.__class__.__name__} does not implement create_branch_async"
    raise FeatureNotSupportedError(msg)

create_issue

create_issue(
    title: str, body: str, labels: list[str] | None = None, assignees: list[str] | None = None
) -> Issue

Create a new issue.

Source code in src/githarbor/core/base.py
def create_issue(
    self,
    title: str,
    body: str,
    labels: list[str] | None = None,
    assignees: list[str] | None = None,
) -> Issue:
    """Create a new issue."""
    msg = f"{self.__class__.__name__} does not implement create_issue"
    raise FeatureNotSupportedError(msg)

create_issue_async async

create_issue_async(
    title: str, body: str, labels: list[str] | None = None, assignees: list[str] | None = None
) -> Issue

Create a new issue asynchronously.

Source code in src/githarbor/core/base.py
async def create_issue_async(
    self,
    title: str,
    body: str,
    labels: list[str] | None = None,
    assignees: list[str] | None = None,
) -> Issue:
    """Create a new issue asynchronously."""
    msg = f"{self.__class__.__name__} does not implement create_issue_async"
    raise FeatureNotSupportedError(msg)

create_pull_request_from_diff

create_pull_request_from_diff(
    title: str,
    body: str,
    base_branch: str,
    diff: str,
    head_branch: str | None = None,
    draft: bool = False,
) -> PullRequest

Create a pull request from a diff string.

Source code in src/githarbor/core/base.py
def create_pull_request_from_diff(
    self,
    title: str,
    body: str,
    base_branch: str,
    diff: str,
    head_branch: str | None = None,
    draft: bool = False,
) -> PullRequest:
    """Create a pull request from a diff string."""
    msg = f"{self.__class__.__name__} does not implement create_pull_request_from_diff"
    raise FeatureNotSupportedError(msg)

create_pull_request_from_diff_async async

create_pull_request_from_diff_async(
    title: str,
    body: str,
    base_branch: str,
    diff: str,
    head_branch: str | None = None,
    draft: bool = False,
) -> PullRequest

Create a pull request from a diff string asynchronously.

Source code in src/githarbor/core/base.py
async def create_pull_request_from_diff_async(
    self,
    title: str,
    body: str,
    base_branch: str,
    diff: str,
    head_branch: str | None = None,
    draft: bool = False,
) -> PullRequest:
    """Create a pull request from a diff string asynchronously."""
    fn_name = "create_pull_request_from_diff_async"
    msg = f"{self.__class__.__name__} does not implement {fn_name}"
    raise FeatureNotSupportedError(msg)

download_async async

download_async(path: str, destination: JoinablePathLike, recursive: bool = False) -> None

Download repository content asynchronously.

Source code in src/githarbor/core/base.py
async def download_async(
    self,
    path: str,
    destination: JoinablePathLike,
    recursive: bool = False,
) -> None:
    """Download repository content asynchronously."""
    msg = f"{self.__class__.__name__} does not implement download_async"
    raise FeatureNotSupportedError(msg)

get_branch_async async

get_branch_async(name: str) -> Branch

Get branch information asynchronously.

Source code in src/githarbor/core/base.py
async def get_branch_async(self, name: str) -> Branch:
    """Get branch information asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_branch_async"
    raise FeatureNotSupportedError(msg)

get_commit_async async

get_commit_async(sha: str) -> Commit

Get commit information asynchronously.

Source code in src/githarbor/core/base.py
async def get_commit_async(self, sha: str) -> Commit:
    """Get commit information asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_commit_async"
    raise FeatureNotSupportedError(msg)

get_contributors_async async

get_contributors_async(
    sort_by: Literal["commits", "name", "date"] = "commits", limit: int | None = None
) -> list[User]

Get repository contributors asynchronously.

Source code in src/githarbor/core/base.py
async def get_contributors_async(
    self,
    sort_by: Literal["commits", "name", "date"] = "commits",
    limit: int | None = None,
) -> list[User]:
    """Get repository contributors asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_contributors_async"
    raise FeatureNotSupportedError(msg)

get_issue_async async

get_issue_async(issue_id: int) -> Issue

Get issue information asynchronously.

Source code in src/githarbor/core/base.py
async def get_issue_async(self, issue_id: int) -> Issue:
    """Get issue information asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_issue_async"
    raise FeatureNotSupportedError(msg)

get_languages_async async

get_languages_async() -> dict[str, int]

Get repository language statistics asynchronously.

Source code in src/githarbor/core/base.py
async def get_languages_async(self) -> dict[str, int]:
    """Get repository language statistics asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_languages_async"
    raise FeatureNotSupportedError(msg)

get_latest_release_async async

get_latest_release_async(
    include_drafts: bool = False, include_prereleases: bool = False
) -> Release

Get latest release asynchronously.

Source code in src/githarbor/core/base.py
async def get_latest_release_async(
    self,
    include_drafts: bool = False,
    include_prereleases: bool = False,
) -> Release:
    """Get latest release asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_latest_release_async"
    raise FeatureNotSupportedError(msg)

get_pull_request_async async

get_pull_request_async(number: int) -> PullRequest

Get pull request information asynchronously.

Source code in src/githarbor/core/base.py
async def get_pull_request_async(self, number: int) -> PullRequest:
    """Get pull request information asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_pull_request_async"
    raise FeatureNotSupportedError(msg)

get_release_async async

get_release_async(tag: str) -> Release

Get release by tag asynchronously.

Source code in src/githarbor/core/base.py
async def get_release_async(self, tag: str) -> Release:
    """Get release by tag asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_release_async"
    raise FeatureNotSupportedError(msg)

get_repo_user_async async

get_repo_user_async() -> User

Get repository owner information asynchronously.

Source code in src/githarbor/core/base.py
async def get_repo_user_async(self) -> User:
    """Get repository owner information asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_repo_user_async"
    raise FeatureNotSupportedError(msg)

get_tag_async async

get_tag_async(name: str) -> Tag

Get tag information asynchronously.

Source code in src/githarbor/core/base.py
async def get_tag_async(self, name: str) -> Tag:
    """Get tag information asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_tag_async"
    raise FeatureNotSupportedError(msg)

get_workflow_async async

get_workflow_async(workflow_id: str) -> Workflow

Get workflow information asynchronously.

Source code in src/githarbor/core/base.py
async def get_workflow_async(self, workflow_id: str) -> Workflow:
    """Get workflow information asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_workflow_async"
    raise FeatureNotSupportedError(msg)

get_workflow_run_async async

get_workflow_run_async(run_id: str) -> WorkflowRun

Get workflow run information asynchronously.

Source code in src/githarbor/core/base.py
async def get_workflow_run_async(self, run_id: str) -> WorkflowRun:
    """Get workflow run information asynchronously."""
    msg = f"{self.__class__.__name__} does not implement get_workflow_run_async"
    raise FeatureNotSupportedError(msg)

list_branches_async async

list_branches_async() -> list[Branch]

List all branches asynchronously.

Source code in src/githarbor/core/base.py
async def list_branches_async(self) -> list[Branch]:
    """List all branches asynchronously."""
    msg = f"{self.__class__.__name__} does not implement list_branches_async"
    raise FeatureNotSupportedError(msg)

list_commits_async async

list_commits_async(
    branch: str | None = None,
    since: datetime | None = None,
    until: datetime | None = None,
    author: str | None = None,
    path: str | None = None,
    max_results: int | None = None,
) -> list[Commit]

List commits asynchronously.

Source code in src/githarbor/core/base.py
async def list_commits_async(
    self,
    branch: str | None = None,
    since: datetime | None = None,
    until: datetime | None = None,
    author: str | None = None,
    path: str | None = None,
    max_results: int | None = None,
) -> list[Commit]:
    """List commits asynchronously."""
    msg = f"{self.__class__.__name__} does not implement list_commits_async"
    raise FeatureNotSupportedError(msg)

list_issues_async async

list_issues_async(state: IssueState = 'open') -> list[Issue]

List issues asynchronously.

Source code in src/githarbor/core/base.py
async def list_issues_async(self, state: IssueState = "open") -> list[Issue]:
    """List issues asynchronously."""
    msg = f"{self.__class__.__name__} does not implement list_issues_async"
    raise FeatureNotSupportedError(msg)

list_pull_requests_async async

list_pull_requests_async(state: PullRequestState = 'open') -> list[PullRequest]

List pull requests asynchronously.

Source code in src/githarbor/core/base.py
async def list_pull_requests_async(
    self,
    state: PullRequestState = "open",
) -> list[PullRequest]:
    """List pull requests asynchronously."""
    msg = f"{self.__class__.__name__} does not implement list_pull_requests_async"
    raise FeatureNotSupportedError(msg)

list_releases_async async

list_releases_async(
    include_drafts: bool = False, include_prereleases: bool = False, limit: int | None = None
) -> list[Release]

List releases asynchronously.

Source code in src/githarbor/core/base.py
async def list_releases_async(
    self,
    include_drafts: bool = False,
    include_prereleases: bool = False,
    limit: int | None = None,
) -> list[Release]:
    """List releases asynchronously."""
    msg = f"{self.__class__.__name__} does not implement list_releases_async"
    raise FeatureNotSupportedError(msg)

list_tags_async async

list_tags_async() -> list[Tag]

List all tags asynchronously.

Source code in src/githarbor/core/base.py
async def list_tags_async(self) -> list[Tag]:
    """List all tags asynchronously."""
    msg = f"{self.__class__.__name__} does not implement list_tags_async"
    raise FeatureNotSupportedError(msg)

list_workflows_async async

list_workflows_async() -> list[Workflow]

List workflows asynchronously.

Source code in src/githarbor/core/base.py
async def list_workflows_async(self) -> list[Workflow]:
    """List workflows asynchronously."""
    msg = f"{self.__class__.__name__} does not implement list_workflows_async"
    raise FeatureNotSupportedError(msg)

search_commits_async async

search_commits_async(
    query: str, branch: str | None = None, path: str | None = None, max_results: int | None = None
) -> list[Commit]

Search commits asynchronously.

Source code in src/githarbor/core/base.py
async def search_commits_async(
    self,
    query: str,
    branch: str | None = None,
    path: str | None = None,
    max_results: int | None = None,
) -> list[Commit]:
    """Search commits asynchronously."""
    msg = f"{self.__class__.__name__} does not implement search_commits_async"
    raise FeatureNotSupportedError(msg)