shared

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PullRequestFields = []string{
	"artifactId",
	"autoCompleteSetBy",
	"closedBy",
	"closedDate",
	"codeReviewId",
	"commits",
	"completionOptions",
	"completionQueueTime",
	"createdBy",
	"creationDate",
	"description",
	"forkSource",
	"hasMultipleMergeBases",
	"isDraft",
	"labels",
	"lastMergeCommit",
	"lastMergeSourceCommit",
	"lastMergeTargetCommit",
	"mergeFailureMessage",
	"mergeFailureType",
	"mergeId",
	"mergeOptions",
	"mergeStatus",
	"pullRequestId",
	"remoteUrl",
	"repository",
	"reviewers",
	"sourceRefName",
	"status",
	"supportsIterations",
	"targetRefName",
	"title",
	"url",
	"workItemRefs",
}

Functions

func GetReviewerIdentities added in v0.4.0

func GetReviewerIdentities(ctx context.Context, identityClient identity.Client, reviewerHandles []string) (map[string]identity.Identity, error)

GetReviewerIdentities resolves a list of reviewer handles (e.g., emails) into a map of handle-to-identity objects.

func InitEditorMode

func InitEditorMode(ctx util.CmdContext, editorMode bool, webMode bool, canPrompt bool) (bool, error)

func ResolveReviewers added in v0.4.0

func ResolveReviewers(ctx context.Context, identityClient identity.Client, requiredReviewerHandles []string, optionalReviewerHandles []string) ([]git.IdentityRefWithVote, error)

ResolveReviewers takes lists of required and optional reviewer handles, resolves them, and returns a de-duplicated list of IdentityRefWithVote objects. If a reviewer is in both lists, they are marked as required.

Types

type FindOptions

type FindOptions struct {
	// The ID (number) of the PR to find
	Selector string
	// BaseBranch is the name of the base branch to scope the PR-for-branch lookup to.
	BaseBranch string
	// States lists the possible PR states to scope the PR-for-branch lookup to.
	States []string
}

type PRFinder

type PRFinder interface {
	Find(opts FindOptions) (*git.GitPullRequest, azdo.Repository, error)
}

func NewFinder

func NewFinder(ctx util.CmdContext) (f PRFinder, err error)

type Template

type Template interface {
	Path() string
	Body() []byte
}

type TemplateManager

type TemplateManager interface {
	GetTemplate(ctx context.Context, repo azdo.Repository, branch string) (Template, error)
}

func NewTemplateManager

func NewTemplateManager(ctx util.CmdContext) (TemplateManager, error)

Jump to

Keyboard shortcuts

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