bitbucket

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package bitbucket implements the scm.Provider contract against Bitbucket APIs.

It translates provider-neutral repository and pull-request operations into Bitbucket-specific request/response flows and then maps responses back to scm models consumed by the rest of the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, project string) scm.Provider

New creates a new Bitbucket SCM provider instance.

Types

type Bitbucket

type Bitbucket struct {
	// contains filtered or unexported fields
}

Bitbucket represents an SCM provider for the Bitbucket v1 API.

func (*Bitbucket) CheckCapabilities added in v0.11.0

func (b *Bitbucket) CheckCapabilities(opts *scm.PROptions) error

CheckCapabilities validates that the provided PR options are supported by Bitbucket.

func (*Bitbucket) GetPullRequest

func (b *Bitbucket) GetPullRequest(repo, branch string) (*scm.PullRequest, error)

GetPullRequest retrieves a pull request by repository name and source branch.

func (*Bitbucket) ListRepositories

func (b *Bitbucket) ListRepositories() ([]*scm.Repository, error)

ListRepositories lists all repositories in the specified project.

func (*Bitbucket) MergePullRequest

func (b *Bitbucket) MergePullRequest(repo, branch string, _ *scm.PRMergeOptions) (*scm.PullRequest, error)

MergePullRequest merges an existing pull request.

func (*Bitbucket) OpenPullRequest

func (b *Bitbucket) OpenPullRequest(repo, branch string, opts *scm.PROptions) (*scm.PullRequest, error)

OpenPullRequest opens a new pull request in the specified repository.

func (*Bitbucket) UpdatePullRequest

func (b *Bitbucket) UpdatePullRequest(repo, branch string, opts *scm.PROptions) (*scm.PullRequest, error)

UpdatePullRequest updates an existing pull request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL