azuredevops

package
v1.229.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package azuredevops implements Azure DevOps' pull-request API as a git publishing provider.

Azure DevOps addresses a repository with three segments -- organization, project, and repository -- rather than GitHub's two (owner, repository). It maps onto the shared, forge-neutral atmosgit.PullRequestOptions as: Owner is the organization, Namespace is exactly one element (the project), and Repository is the repository name.

Index

Constants

View Source
const ProviderName = "azuredevops"

ProviderName identifies the Azure DevOps pull request publisher.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Provider)

Option configures a Provider (functional options pattern).

func WithBaseURL

func WithBaseURL(baseURL string) Option

WithBaseURL overrides Azure DevOps' organization host, e.g. for tests or for Azure DevOps Server (on-premises) deployments that don't live under dev.azure.com.

func WithHTTPClient

func WithHTTPClient(c pkghttp.Client) Option

WithHTTPClient overrides the HTTP client used to call the Azure DevOps REST API. Primarily useful for tests, which point it at an httptest.Server (a *http.Client already satisfies pkghttp.Client).

func WithToken

func WithToken(token string) Option

WithToken overrides how the provider's personal access token is resolved. Primarily useful for tests, which would otherwise need to mutate the process-wide AZURE_DEVOPS_EXT_PAT environment variable (a source of test flakiness/races under `go test -parallel`).

type Provider

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

Provider reconciles pull requests through Azure DevOps' REST API.

func New

func New(opts ...Option) *Provider

New creates an Azure DevOps pull request provider authenticated with AZURE_DEVOPS_EXT_PAT.

func (*Provider) PullRequestBodyBadge

func (p *Provider) PullRequestBodyBadge() string

PullRequestBodyBadge implements atmosgit.PullRequestBodyBadger.

func (*Provider) Reconcile

Reconcile creates or updates a pull request and applies configured metadata.

Jump to

Keyboard shortcuts

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