Repository navigation
feat(bitbucket-datacenter): deliver to Bitbucket Data Center - #30
Merged
Merged
Conversation
A provider of type bitbucket-datacenter: Bitbucket Data Center 8.19 and later, with HTTP access tokens. Projects are namespaces and repository labels are topics; pull requests have no labels and the marker is a link reference definition, as on Bitbucket Cloud. Declined pull requests are never written to; who declined comes from the activities, and Bitbucket's system user counts as a bot. Caps.ReaderCloses makes plan warn until the reader, which may decline pull requests there, is in automation_accounts.
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.
Adds Bitbucket Data Center (8.19 and later) as a provider a hub delivers to:
type: bitbucket-datacenterinhub.yml. Like the Bitbucket Cloud and Azure DevOps drivers, it is built from Atlassian's REST reference (the OpenAPI descriptions of 8.0 to 10.5) and tested against stand-ins of its API, not on a live instance.What it does
urlis required: the instance's base URL, context path included. The REST API is<url>/rest/api/latest.org:is a project key, andtopics:are repository labels./projects/KEY/repos/<slug>[/browse…]or as clone URLs,/scm/<key>/<slug>.git.internal/platform/bitbucketdc).Authorization: Bearerto the API and to git.X-AUSERNAMEheader of an answer and finds that user with/users?filter=.version; a 409 answer is read again and retried once./repos?permission=REPO_WRITEview, since repository permissions are visible to admins only.doctorwarns on REPO_ADMIN./dashboard/pull-requests?role=AUTHOR&user=<name>. An author whose name the reader never learned makes the sweep incomplete.X-AUSERNAME, or anAuthorisationException) is a missing permission (ClassPermission). Otherwise one hidden repository would stop the whole provider.ClassNotFound, so no stale PR is swept on its account.Caps.ReaderCloses. On Data Center, an identity that may only read can still decline PRs, and the read key reaches every branch of the hub.planwarns until the reader is inautomation_accounts, so that a decline made with it counts as an automatic close, not as the team's decision.rules:pull-request-only; any other branch-permission refusal maps torules:branch-permissions.<id>@touchmark.invalid.setup bitbucket-datacenterrefuses: Data Center has no CI to run a hub.bitbucket-datacenterflavor: Bitbucket Cloud's capabilities, a 30 000-byte body, and declined PRs that a person may reopen. It is covered by delivery scenarios, the crash matrix and property simulations.Not verified live
The assumptions are listed in
docs/guide/providers.md(Bitbucket Data Center):X-AUSERNAMEand the users that project and repository tokens act as;atwithdirection=OUTGOINGselects;Tests
httptestservers that follow the spec's shapes; about 84% coverage.go test ./...on Linux ingolang:1.26, plusgolangci-lintand the docs check.doctorreported unknown instead of fail for a repository behind 401.