Add BitBucket Cloud scaffolding#775
Draft
maciekbanas wants to merge 1 commit into
Draft
Conversation
…t, set_bitbucket_host() Introduce BitBucket Cloud (api.bitbucket.org/2.0) as a third supported Git host. BitBucket uses REST API only (no GraphQL). New classes: - EngineRestBitBucket: REST engine with cursor-based pagination, repo listing, commit retrieval, contributors approximation, and file tree browsing. - GitHostBitBucket: REST-only host subclass. Overrides org/repo/commit retrieval. Unsupported methods raise informative errors. New exported function: - set_bitbucket_host(): follows the same pattern as set_github_host() and set_gitlab_host(). Currently supports: get_repos(), get_commits(), get_orgs(), get_repos_trees(). Other methods will be added incrementally. Closes #768 Co-authored-by: Ona <no-reply@ona.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduces BitBucket Cloud (
api.bitbucket.org/2.0) as a third supported Git host alongside GitHub and GitLab. BitBucket Cloud uses REST API v2 only (no GraphQL).New classes:
EngineRestBitBucket— REST engine with BitBucket-style cursor pagination (nextURL), repo listing, commit retrieval with client-side date filtering, contributors approximation from recent commits, and file tree browsing.GitHostBitBucket— REST-only host subclass. Overrides org/repo/commit retrieval to use REST, workspace validation, and repos data caching. Unsupported methods (get_issues,get_pull_requests,get_release_logs,get_filescontent,get_users) raise informative errors.New exported function:
set_bitbucket_host()— follows the same pattern asset_github_host()/set_gitlab_host(). BitBucket workspaces map to theorgsparameter.Currently supports:
get_repos(),get_commits(),get_orgs(),get_repos_trees().Notable design decisions:
private$engines$graphqlisNULL; all base class methods that delegate to GraphQL are overridden./contributorsendpoint).additions/deletionsset toNA(requires separate diffstat API call — deferred to get_commits() support #770).GET /usersuccess (HTTP 200) since BitBucket doesn't return scope headers.Note:
roxygen2::roxygenise()needs to be run to regenerate man pages forset_bitbucket_hostbefore merging.Related Issue(s)
Closes #768
Part of #754
How to test
testthat::test_file(\"tests/testthat/test-set_host-BitBucket.R\")repositoryscope):R CMD checkto verify no regressions.