client

package
v0.117.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultAzureDevOpsURL is the default URL for Azure DevOps organizations.
	DefaultAzureDevOpsURL string = "https://dev.azure.com"
)

Functions

func EnsureValidURL

func EnsureValidURL(rawURL string) string

EnsureValidURL normalizes an Azure DevOps organization URL.

func GitURL

func GitURL(baseURL, organization, project, repository string) string

GitURL returns the repository git URL used by the SCM implementation.

func PullRequestURL

func PullRequestURL(baseURL, organization, project, repository string, pullRequestID int) string

PullRequestURL returns the Azure DevOps web URL for a pull request.

Types

type Client

type Client struct {
	Spec Spec
	// contains filtered or unexported fields
}

func New

func New(s Spec) (Client, error)

func (Client) GetRepository

func (c Client) GetRepository(ctx context.Context, project, repository string) (*azdogit.GitRepository, error)

func (Client) NewCoreClient

func (c Client) NewCoreClient(ctx context.Context) (azdocore.Client, error)

func (Client) NewGitClient

func (c Client) NewGitClient(ctx context.Context) (azdogit.Client, error)

type Spec

type Spec struct {
	// Organization defines the Azure DevOps organization URL to interact with.
	Organization string `yaml:",omitempty"`
	// "url" defines the Azure DevOps organization URL to interact with.
	URL string `yaml:",omitempty"`
	// "project" defines the Azure DevOps project containing the repository.
	Project string `yaml:",omitempty" jsonschema:"required"`
	// "repository" defines the Azure DevOps repository name.
	Repository string `yaml:",omitempty" jsonschema:"required"`
	// "username" defines the username used for git authentication.
	Username string `yaml:",omitempty"`
	// "token" specifies the personal access token used to authenticate with Azure DevOps.
	Token string `yaml:",omitempty"`
}

Spec defines a specification for an Azure DevOps resource parsed from an updatecli manifest file.

func (*Spec) Sanitize

func (s *Spec) Sanitize() error

Sanitize normalizes a spec content.

func (Spec) Validate

func (s Spec) Validate() error

Validate validates that a spec contains the required Azure DevOps settings.

Jump to

Keyboard shortcuts

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