Source: factory.service/package.core/ObjServiceBitbucket.py
Bitbucket Cloud REST API service for
repository, pull-request, pipeline, commit,
and issue management.
Wraps the Bitbucket REST API v2.0 with HTTP
...
| Method | Signature | Description |
|---|---|---|
| get_repo | get_repo() -> dict |
Return repository info. |
| list_branches | list_branches() -> list |
List branches in the repository. |
| get_branch | get_branch(name: str) -> dict |
Get detail for a specific branch. |
| list_pull_requests | list_pull_requests(state: str = 'OPEN') -> list |
List pull requests filtered by state. |
| get_pull_request | get_pull_request(pr_id: int) -> dict |
Get pull request detail by ID. |
| create_pull_request | create_pull_request(title: str, source_branch: str, dest_branch: str = 'develop', description: str = '') -> dict |
Create a new pull request. |
| add_pr_comment | add_pr_comment(pr_id: int, content: str) -> dict |
Add a comment to a pull request. |
| approve_pr | approve_pr(pr_id: int) -> dict |
Approve a pull request. |
| merge_pr | merge_pr(pr_id: int) -> dict |
Merge a pull request. |
| list_pipelines | list_pipelines() -> list |
List recent pipelines. |
| get_pipeline | get_pipeline(pipeline_uuid: str) -> dict |
Get pipeline detail by UUID. |
| trigger_pipeline | trigger_pipeline(branch: str, variables: dict | None = None) -> dict |
Trigger a pipeline build on a branch. |
| list_commits | list_commits(branch: str = 'develop', limit: int = 10) -> list |
List recent commits on a branch. |
| get_commit | get_commit(commit_hash: str) -> dict |
Get commit detail by hash. |
| list_issues | list_issues() -> list |
List issues (requires issue tracker |
| create_issue | create_issue(title: str, content: str = '', kind: str = 'bug', priority: str = 'major') -> dict |
Create a repository issue. |
| link_record | link_record(source_table: str, source_key: str, external_id: str, external_type: str = 'pullrequest') -> None |
Link a local DB record to a Bitbucket |
| get_external_id | get_external_id(source_table: str, source_key: str) -> str |
Look up Bitbucket external ID for a local |
| get_local_key | get_local_key(external_id: str) -> str |
Look up local record key for a Bitbucket |
| Connect | Connect() |
Legacy Connect interface. |
| Send | Send() |
Legacy Send interface. |
Verify Bitbucket credentials are valid.
List pull requests.
List recent pipelines.
List repository branches.