utils
Class info¶
🛈 DocStrings¶
Tools for converting between GitHubKit and GitHarbor models.
create_asset_model
¶
create_asset_model(ghk_asset: ReleaseAsset) -> Asset
Create Asset model from GitHubKit asset object.
Source code in src/githarbor/providers/githubkit_provider/utils.py
create_branch_model
¶
create_branch_model(
ghk_branch: BranchShort | BranchWithProtection | ShortBranch, *, is_default: bool = False
) -> Branch
Convert GitHubKit branch model to GitHarbor Branch model.
Source code in src/githarbor/providers/githubkit_provider/utils.py
create_comment_model
¶
create_comment_model(ghk_comment: Any) -> Comment
Create Comment model from GitHubKit comment object.
Source code in src/githarbor/providers/githubkit_provider/utils.py
create_commit_model
¶
create_commit_model(ghk_commit: Commit | CommitSearchResultItemPropCommit) -> Commit
create_commit_model(ghk_commit: Commit | CommitSearchResultItemPropCommit | None) -> Commit | None
Create Commit model from GitHubKit commit object.
Source code in src/githarbor/providers/githubkit_provider/utils.py
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 | |
create_issue_model
¶
create_issue_model(ghk_issue: Issue) -> Issue
Convert GitHubKit issue model to GitHarbor Issue model.
Source code in src/githarbor/providers/githubkit_provider/utils.py
create_label_model
¶
create_label_model(ghk_label: IssuePropLabelsItemsOneof1) -> Label
Convert GitHubKit label model to GitHarbor Label model.
Source code in src/githarbor/providers/githubkit_provider/utils.py
create_pull_request_model
¶
create_pull_request_model(ghk_pr: PullRequest | PullRequestSimple) -> PullRequest
Convert GitHubKit pull request model to GitHarbor PullRequest model.
Source code in src/githarbor/providers/githubkit_provider/utils.py
create_release_model
¶
create_release_model(ghk_release: Release) -> Release
Convert GitHubKit release model to GitHarbor Release model.
Source code in src/githarbor/providers/githubkit_provider/utils.py
create_tag_model
¶
create_tag_model(ghk_tag: Tag | GitTag) -> Tag
Convert GitHubKit tag model to GitHarbor Tag model.
Source code in src/githarbor/providers/githubkit_provider/utils.py
create_user_model
¶
create_user_model(ghk_user: SimpleUser | PrivateUser | PublicUser | GitUser) -> User
create_user_model(ghk_user: SimpleUser | PrivateUser | PublicUser | GitUser | None) -> User | None
Convert GitHubKit user model to GitHarbor User model.
Source code in src/githarbor/providers/githubkit_provider/utils.py
create_workflow_model
¶
create_workflow_model(ghk_workflow: Workflow) -> Workflow
Convert GitHubKit workflow model to GitHarbor Workflow model.
Source code in src/githarbor/providers/githubkit_provider/utils.py
create_workflow_run_model
¶
create_workflow_run_model(ghk_run: WorkflowRun) -> WorkflowRun
Convert GitHubKit workflow run model to GitHarbor WorkflowRun model.