azuredevops

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: MIT Imports: 16 Imported by: 5

Documentation

Overview

Package azuredevops is a Go client library for accessing the Azure DevOps API. Installation

Index

Constants

View Source
const (
	// DefaultBaseURL is the default URI base for most Azure Devops REST API endpoints
	DefaultBaseURL string = "https://dev.azure.com/"
	// DefaultVsspsBaseURL is the default URI base for some Azure Devops REST API endpoints
	DefaultVsspsBaseURL string = "https://vssps.dev.azure.com/"
	// DefaultVsaexBaseURL is the default URI base for some Azure Devops REST API endpoints
	DefaultVsaexBaseURL string = "https://vsaex.dev.azure.com/"
)
View Source
const (
	// DeliveryPlanWorkItemIDKey is the key for which part of the workItems[] slice has the ID
	DeliveryPlanWorkItemIDKey = 0
	// DeliveryPlanWorkItemIterationKey is the key for which part of the workItems[] slice has the Iteration
	DeliveryPlanWorkItemIterationKey = 1
	// DeliveryPlanWorkItemTypeKey is the key for which part of the workItems[] slice has the Type
	DeliveryPlanWorkItemTypeKey = 2
	// DeliveryPlanWorkItemNameKey is the key for which part of the workItems[] slice has the Name
	DeliveryPlanWorkItemNameKey = 4
	// DeliveryPlanWorkItemStatusKey is the key for which part of the workItems[] slice has the Status
	DeliveryPlanWorkItemStatusKey = 5
	// DeliveryPlanWorkItemTagKey is the key for which part of the workItems[] slice has the Tag
	DeliveryPlanWorkItemTagKey = 6
)
View Source
const (
	// PolicyEvaluationApproved represents that the policy has been fulfilled for this pull request.
	PolicyEvaluationApproved = "approved"

	// PolicyEvaluationBroken represents that the policy encountered an unexpected error.
	PolicyEvaluationBroken = "broken"

	// PolicyEvaluationNotApplicable represents that the policy does not apply to this pull request.
	PolicyEvaluationNotApplicable = "notApplicable"

	// PolicyEvaluationQueued represents that the policy is either queued to run, or is waiting for some event before progressing.
	PolicyEvaluationQueued = "queued"

	// PolicyEvaluationRejected represents that the policy has rejected this pull request.
	PolicyEvaluationRejected = "rejected"

	// PolicyEvaluationRunning represents that the policy is currently running.
	PolicyEvaluationRunning = "running"
)
View Source
const (
	VoteApproved                = 10
	VoteApprovedWithSuggestions = 5
	VoteNone                    = 0
	VoteWaitingForAuthor        = -5
	VoteRejected                = -10
)

Vote identifiers

Variables

This section is empty.

Functions

func Bool added in v0.6.0

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func GetActivityID

func GetActivityID(r *http.Request) string

GetActivityID returns the value of the activityIDHeader webhook header.

Haven't found vendor documentation yet. This could be a GUID that identifies the webhook request ID. A different GUID is also present in the body of webhook requests.

func GetRequestID

func GetRequestID(r *http.Request) string

GetRequestID returns the value of the requestIDHeader webhook header.

Haven't found vendor documentation yet. This could be a GUID that identifies the webhook request ID. A different GUID is also present in the body of webhook requests.

func GetSubscriptionID

func GetSubscriptionID(r *http.Request) string

GetSubscriptionID returns the value of the subscriptionIDHeader webhook header.

Haven't found vendor documentation yet. This could be a GUID that identifies the webhook event type and settings in the Azure Devops tenant

func Int added in v0.6.0

func Int(v int) *int

Int is a helper routine that allocates a new int value to store v and returns a pointer to it.

func Int64 added in v0.6.0

func Int64(v int64) *int64

Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.

func String added in v0.6.0

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

func ValidatePayload

func ValidatePayload(r *http.Request, user, pass []byte) (payload []byte, err error)

ValidatePayload validates an incoming Azure Devops Webhook event request and returns the (JSON) payload. The Content-Type header of the payload must be "application/json" or an error is returned. A charset may be included with the content type. user is the supplied username for Basic authentication pass is the supplied password for Basic authentication If your webhook does not contain a username or password, you can pass nil or an empty slice. This is intended for local development purposes only as all webhooks should ideally set up a secret token. It is up to the caller to process failed validation and return a proper 401 response to the user, such as:

w.Header().Set("WWW-Authenticate", `Basic realm="`+realm+`"`) w.WriteHeader(401) w.Write([]byte("Unauthorized.\n"))

Example usage:

func (s *Event) ServeHTTP(w http.ResponseWriter, r *http.Request) {
  payload, err := azuredevops.ValidatePayload(r, s.user, s.pass)
  if err != nil { ... }
  // Process payload...
}

Types

type AccessLevel added in v0.12.0

type AccessLevel struct {
	LicensingSource    string `json:"licensingSource,omitempty"`
	AccountLicenseType string `json:"accountLicenseType,omitempty"`
	MSDNLicenseType    string `json:"msdnLicenseType,omitempty"`
	LicenseDisplayName string `json:"licenseDisplayName,omitempty"`
	Status             string `json:"status,omitempty"`
	StatusMessage      string `json:"statusMessage,omitempty"`
	AssignmentSource   string `json:"assignmentSource,omitempty"`
}

AccessLevel is a wrapper class used by Item

type AgentPoolQueue added in v0.6.0

type AgentPoolQueue struct {
	Links *map[string]Link        `json:"_links,omitempty"`
	ID    *int                    `json:"id,omitempty"`
	Name  *string                 `json:"name,omitempty"`
	URL   *string                 `json:"url,omitempty"`
	Pool  *TaskAgentPoolReference `json:"pool,omitempty"`
}

AgentPoolQueue The queue. This is only set if the definition type is Build.

func (*AgentPoolQueue) GetID added in v0.6.0

func (a *AgentPoolQueue) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (a *AgentPoolQueue) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*AgentPoolQueue) GetName added in v0.6.0

func (a *AgentPoolQueue) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*AgentPoolQueue) GetPool added in v0.6.0

func (a *AgentPoolQueue) GetPool() *TaskAgentPoolReference

GetPool returns the Pool field.

func (*AgentPoolQueue) GetURL added in v0.6.0

func (a *AgentPoolQueue) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type Avatar added in v0.12.0

type Avatar struct {
	Href string `json:"href"`
}

Avatar is a wrapper class used by Links

type BasicAuthTransport added in v0.6.0

type BasicAuthTransport struct {
	Username string // Azure Devops username
	Password string // Azure Devops password
	OTP      string // one-time password for users with two-factor auth enabled

	// Transport is the underlying HTTP transport to use when making requests.
	// It will default to http.DefaultTransport if nil.
	Transport http.RoundTripper
}

BasicAuthTransport is an http.RoundTripper that authenticates all requests using HTTP Basic Authentication with the provided username and password. It additionally supports users who have two-factor authentication enabled on their GitHub account.

func (*BasicAuthTransport) Client added in v0.6.0

func (t *BasicAuthTransport) Client() *http.Client

Client returns an *http.Client that makes requests that are authenticated using HTTP Basic Authentication.

func (*BasicAuthTransport) RoundTrip added in v0.6.0

func (t *BasicAuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface.

type Board

type Board struct {
	BoardReference
	Links           *map[string]Link `json:"_links,omitempty"`
	AllowedMappings *string          `json:"allowedMappings,omitempty"`
	CanEdit         *bool            `json:"canEdit,omitempty"`
	Columns         []*BoardColumn   `json:"columns,omitempty"`
	Fields          *BoardFields     `json:"fields,omitempty"`
	IsValid         *bool            `json:"isvalid,omitempty"`
	Revision        *int             `json:"revision,omitempty"`
	Rows            []*BoardRow      `json:"rows,omitempty"`
}

Board describes a board

func (*Board) GetAllowedMappings

func (b *Board) GetAllowedMappings() string

GetAllowedMappings returns the AllowedMappings field if it's non-nil, zero value otherwise.

func (*Board) GetCanEdit

func (b *Board) GetCanEdit() bool

GetCanEdit returns the CanEdit field if it's non-nil, zero value otherwise.

func (*Board) GetFields

func (b *Board) GetFields() *BoardFields

GetFields returns the Fields field.

func (*Board) GetIsValid

func (b *Board) GetIsValid() bool

GetIsValid returns the IsValid field if it's non-nil, zero value otherwise.

func (b *Board) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*Board) GetRevision

func (b *Board) GetRevision() int

GetRevision returns the Revision field if it's non-nil, zero value otherwise.

type BoardColumn

type BoardColumn struct {
	ColumnType    *string           `json:"columnType,omitempty"`
	Description   *string           `json:"description,omitempty"`
	ID            *string           `json:"id,omitempty"`
	IsSplit       *bool             `json:"isSplit,omitempty"`
	ItemLimit     *int              `json:"itemLimit,omitempty"`
	Name          *string           `json:"name,omitempty"`
	StateMappings map[string]string `json:"stateMappings,omitempty"`
}

BoardColumn describes a column on the board

func (*BoardColumn) GetColumnType

func (b *BoardColumn) GetColumnType() string

GetColumnType returns the ColumnType field if it's non-nil, zero value otherwise.

func (*BoardColumn) GetDescription

func (b *BoardColumn) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*BoardColumn) GetID

func (b *BoardColumn) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*BoardColumn) GetIsSplit

func (b *BoardColumn) GetIsSplit() bool

GetIsSplit returns the IsSplit field if it's non-nil, zero value otherwise.

func (*BoardColumn) GetItemLimit

func (b *BoardColumn) GetItemLimit() int

GetItemLimit returns the ItemLimit field if it's non-nil, zero value otherwise.

func (*BoardColumn) GetName

func (b *BoardColumn) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

type BoardColumnType

type BoardColumnType int

BoardColumnType describes a column on the board

const (
	Incoming BoardColumnType = iota
	InProgress
	Outgoing
)

BoardColumnType Enum values

func (BoardColumnType) String

func (d BoardColumnType) String() string

type BoardFields

type BoardFields struct {
	ColumnField *FieldReference `json:"columnField,omitempty"`
	DoneField   *FieldReference `json:"doneField,omitempty"`
	RowField    *FieldReference `json:"rowField,omitempty"`
}

BoardFields describes a column on the board

func (*BoardFields) GetColumnField

func (b *BoardFields) GetColumnField() *FieldReference

GetColumnField returns the ColumnField field.

func (*BoardFields) GetDoneField

func (b *BoardFields) GetDoneField() *FieldReference

GetDoneField returns the DoneField field.

func (*BoardFields) GetRowField

func (b *BoardFields) GetRowField() *FieldReference

GetRowField returns the RowField field.

type BoardReference

type BoardReference struct {
	ID   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	URL  *string `json:"URL,omitempty"`
}

BoardReference Base object a board

func (*BoardReference) GetID

func (b *BoardReference) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*BoardReference) GetName

func (b *BoardReference) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*BoardReference) GetURL

func (b *BoardReference) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type BoardRow

type BoardRow struct {
	ID   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

BoardRow describes a row on the board

func (*BoardRow) GetID

func (b *BoardRow) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*BoardRow) GetName

func (b *BoardRow) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

type BoardsService

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

BoardsService handles communication with the boards methods on the API utilising https://docs.microsoft.com/en-gb/rest/api/vsts/work/boards

func (*BoardsService) Get

func (s *BoardsService) Get(ctx context.Context, owner, project, team, id string) (*Board, *http.Response, error)

Get returns a single board utilising https://docs.microsoft.com/en-gb/rest/api/vsts/work/boards/get

func (*BoardsService) List

func (s *BoardsService) List(ctx context.Context, owner, project, team string) ([]*BoardReference, *http.Response, error)

List returns list of the boards utilising https://docs.microsoft.com/en-gb/rest/api/vsts/work/boards/list

type Build

type Build struct {
	Definition          *BuildDefinition                  `json:"definition,omitempty"`
	Controller          *BuildController                  `json:"controller,omitempty"`
	LastChangedBy       *IdentityRef                      `json:"lastChangedBy,omitempty"`
	DeletedBy           *IdentityRef                      `json:"deletedBy,omitempty"`
	BuildNumber         *string                           `json:"buildNumber,omitempty"`
	FinishTime          *string                           `json:"finishTime,omitempty"`
	SourceBranch        *string                           `json:"sourceBranch,omitempty"`
	Repository          *BuildRepository                  `json:"repository,omitempty"`
	Demands             []*BuildDemand                    `json:"demands,omitempty"`
	Logs                *BuildLogReference                `json:"logs,omitempty"`
	Project             *TeamProjectReference             `json:"project,omitempty"`
	Properties          map[string]string                 `json:"properties,omitempty"`
	Priority            *string                           `json:"priority,omitempty"`
	OrchestrationPlan   *TaskOrchestrationPlanReference   `json:"orchestrationPlan,omitempty"`
	Plans               []*TaskOrchestrationPlanReference `json:"plans,omitempty"`
	BuildNumberRevision *int                              `json:"buildNumberRevision,omitempty"`
	Deleted             *bool                             `json:"deleted,omitempty"`
	DeletedDate         *string                           `json:"deletedDate,omitempty"`
	DeletedReason       *string                           `json:"deletedReason,omitempty"`
	ID                  *int                              `json:"id,omitempty"`
	KeepForever         *bool                             `json:"keepForever,omitempty"`
	ChangedDate         *string                           `json:"lastChangedDate,omitempty"`
	Params              *string                           `json:"parameters,omitempty"`
	Quality             *string                           `json:"quality,omitempty"`
	Queue               *AgentPoolQueue                   `json:"queue,omitempty"`
	QueueOptions        map[string]string                 `json:"queue_options,omitempty"`
	QueuePosition       *int                              `json:"queuePosition,omitempty"`
	QueueTime           *string                           `json:"queueTime,omitempty"`
	RetainedByRelease   *bool                             `json:"retainedByRelease,omitempty"`
	Version             *string                           `json:"sourceVersion,omitempty"`
	StartTime           *string                           `json:"startTime,omitempty"`
	Status              *string                           `json:"status,omitempty"`
	Result              *string                           `json:"result,omitempty"`
	ValidationResults   []*ValidationResult               `json:"validationResult,omitempty"`
	Tags                []*string                         `json:"tags,omitempty"`
	TriggerBuild        *Build                            `json:"triggeredByBuild,omitempty"`
	URI                 *string                           `json:"uri,omitempty"`
	URL                 *string                           `json:"url,omitempty"`
	TriggerInfo         *TriggerInfo                      `json:"triggerInfo,omitempty"`
}

Build Represents a build.

func (*Build) GetBuildNumber

func (b *Build) GetBuildNumber() string

GetBuildNumber returns the BuildNumber field if it's non-nil, zero value otherwise.

func (*Build) GetBuildNumberRevision added in v0.6.0

func (b *Build) GetBuildNumberRevision() int

GetBuildNumberRevision returns the BuildNumberRevision field if it's non-nil, zero value otherwise.

func (*Build) GetChangedDate added in v0.6.0

func (b *Build) GetChangedDate() string

GetChangedDate returns the ChangedDate field if it's non-nil, zero value otherwise.

func (*Build) GetController

func (b *Build) GetController() *BuildController

GetController returns the Controller field.

func (*Build) GetDefinition

func (b *Build) GetDefinition() *BuildDefinition

GetDefinition returns the Definition field.

func (*Build) GetDeleted

func (b *Build) GetDeleted() bool

GetDeleted returns the Deleted field if it's non-nil, zero value otherwise.

func (*Build) GetDeletedBy

func (b *Build) GetDeletedBy() *IdentityRef

GetDeletedBy returns the DeletedBy field.

func (*Build) GetDeletedDate added in v0.6.0

func (b *Build) GetDeletedDate() string

GetDeletedDate returns the DeletedDate field if it's non-nil, zero value otherwise.

func (*Build) GetDeletedReason added in v0.6.0

func (b *Build) GetDeletedReason() string

GetDeletedReason returns the DeletedReason field if it's non-nil, zero value otherwise.

func (*Build) GetFinishTime

func (b *Build) GetFinishTime() string

GetFinishTime returns the FinishTime field if it's non-nil, zero value otherwise.

func (*Build) GetID added in v0.6.0

func (b *Build) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Build) GetKeepForever added in v0.6.0

func (b *Build) GetKeepForever() bool

GetKeepForever returns the KeepForever field if it's non-nil, zero value otherwise.

func (*Build) GetLastChangedBy

func (b *Build) GetLastChangedBy() *IdentityRef

GetLastChangedBy returns the LastChangedBy field.

func (*Build) GetLogs added in v0.6.0

func (b *Build) GetLogs() *BuildLogReference

GetLogs returns the Logs field.

func (*Build) GetOrchestrationPlan

func (b *Build) GetOrchestrationPlan() *TaskOrchestrationPlanReference

GetOrchestrationPlan returns the OrchestrationPlan field.

func (*Build) GetParams added in v0.6.0

func (b *Build) GetParams() string

GetParams returns the Params field if it's non-nil, zero value otherwise.

func (*Build) GetPriority added in v0.6.0

func (b *Build) GetPriority() string

GetPriority returns the Priority field if it's non-nil, zero value otherwise.

func (*Build) GetProject

func (b *Build) GetProject() *TeamProjectReference

GetProject returns the Project field.

func (*Build) GetQuality added in v0.6.0

func (b *Build) GetQuality() string

GetQuality returns the Quality field if it's non-nil, zero value otherwise.

func (*Build) GetQueue added in v0.6.0

func (b *Build) GetQueue() *AgentPoolQueue

GetQueue returns the Queue field.

func (*Build) GetQueuePosition

func (b *Build) GetQueuePosition() int

GetQueuePosition returns the QueuePosition field if it's non-nil, zero value otherwise.

func (*Build) GetQueueTime added in v0.6.0

func (b *Build) GetQueueTime() string

GetQueueTime returns the QueueTime field if it's non-nil, zero value otherwise.

func (*Build) GetRepository

func (b *Build) GetRepository() *BuildRepository

GetRepository returns the Repository field.

func (*Build) GetResult added in v0.6.0

func (b *Build) GetResult() string

GetResult returns the Result field if it's non-nil, zero value otherwise.

func (*Build) GetRetainedByRelease

func (b *Build) GetRetainedByRelease() bool

GetRetainedByRelease returns the RetainedByRelease field if it's non-nil, zero value otherwise.

func (*Build) GetSourceBranch added in v0.7.0

func (b *Build) GetSourceBranch() string

GetSourceBranch returns the SourceBranch field if it's non-nil, zero value otherwise.

func (*Build) GetStartTime added in v0.6.0

func (b *Build) GetStartTime() string

GetStartTime returns the StartTime field if it's non-nil, zero value otherwise.

func (*Build) GetStatus added in v0.6.0

func (b *Build) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*Build) GetTriggerBuild

func (b *Build) GetTriggerBuild() *Build

GetTriggerBuild returns the TriggerBuild field.

func (*Build) GetTriggerInfo added in v0.6.0

func (b *Build) GetTriggerInfo() *TriggerInfo

GetTriggerInfo returns the TriggerInfo field.

func (*Build) GetURI added in v0.6.0

func (b *Build) GetURI() string

GetURI returns the URI field if it's non-nil, zero value otherwise.

func (*Build) GetURL added in v0.6.0

func (b *Build) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*Build) GetVersion added in v0.6.0

func (b *Build) GetVersion() string

GetVersion returns the Version field if it's non-nil, zero value otherwise.

type BuildController

type BuildController struct {
	CreatedDate *string `json:"createdDate"`
	Description *string `json:"description"`
	Enabled     *bool   `json:"enabled"`
	ID          *int    `json:"id"`
	Name        *string `json:"name"`
	Status      *string `json:"status"`
	UpdateDate  *string `json:"updateDate"`
	URI         *string `json:"uri"`
	URL         *string `json:"url"`
}

BuildController represents a controller of the build service

func (*BuildController) GetCreatedDate added in v0.6.0

func (b *BuildController) GetCreatedDate() string

GetCreatedDate returns the CreatedDate field if it's non-nil, zero value otherwise.

func (*BuildController) GetDescription added in v0.6.0

func (b *BuildController) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*BuildController) GetEnabled added in v0.6.0

func (b *BuildController) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*BuildController) GetID added in v0.6.0

func (b *BuildController) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*BuildController) GetName added in v0.6.0

func (b *BuildController) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*BuildController) GetStatus added in v0.6.0

func (b *BuildController) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*BuildController) GetURI added in v0.6.0

func (b *BuildController) GetURI() string

GetURI returns the URI field if it's non-nil, zero value otherwise.

func (*BuildController) GetURL added in v0.6.0

func (b *BuildController) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*BuildController) GetUpdateDate added in v0.6.0

func (b *BuildController) GetUpdateDate() string

GetUpdateDate returns the UpdateDate field if it's non-nil, zero value otherwise.

type BuildDefinition

type BuildDefinition struct {
	ID         *int             `json:"id,omitempty"`
	Name       *string          `json:"name,omitempty"`
	Repository *BuildRepository `json:"repository,omitempty"`
}

BuildDefinition represents a build definition

func (*BuildDefinition) GetID added in v0.6.0

func (b *BuildDefinition) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*BuildDefinition) GetName added in v0.6.0

func (b *BuildDefinition) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*BuildDefinition) GetRepository

func (b *BuildDefinition) GetRepository() *BuildRepository

GetRepository returns the Repository field.

type BuildDefinitionsListOptions

type BuildDefinitionsListOptions struct {
	Path                 *string `url:"path,omitempty"`
	IncludeAllProperties *bool   `url:"includeAllProperties,omitempty"`
}

BuildDefinitionsListOptions describes what the request to the API should look like

func (*BuildDefinitionsListOptions) GetIncludeAllProperties added in v0.6.0

func (b *BuildDefinitionsListOptions) GetIncludeAllProperties() bool

GetIncludeAllProperties returns the IncludeAllProperties field if it's non-nil, zero value otherwise.

func (*BuildDefinitionsListOptions) GetPath added in v0.6.0

func (b *BuildDefinitionsListOptions) GetPath() string

GetPath returns the Path field if it's non-nil, zero value otherwise.

type BuildDefinitionsListResponse

type BuildDefinitionsListResponse struct {
	Count            int                `json:"count"`
	BuildDefinitions []*BuildDefinition `json:"value"`
}

BuildDefinitionsListResponse describes the build definitions list response

type BuildDefinitionsService

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

BuildDefinitionsService handles communication with the build definitions methods on the API utilising https://docs.microsoft.com/en-gb/rest/api/vsts/build/definitions

func (*BuildDefinitionsService) List

List returns a list of build definitions utilising https://docs.microsoft.com/en-gb/rest/api/vsts/build/definitions/list

type BuildDemand added in v0.6.0

type BuildDemand struct {
	Name  *string `json:"name,omitempty"`
	Value *string `json:"value,omitempty"`
}

BuildDemand Represents a demand used by a definition or build.

func (*BuildDemand) GetName added in v0.6.0

func (b *BuildDemand) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*BuildDemand) GetValue added in v0.6.0

func (b *BuildDemand) GetValue() string

GetValue returns the Value field if it's non-nil, zero value otherwise.

type BuildListOrder

type BuildListOrder string

BuildListOrder is enum type for build list order

const (
	// FinishTimeAscending orders by finish build time asc
	FinishTimeAscending BuildListOrder = "finishTimeAscending"
	// FinishTimeDescending orders by finish build time desc
	FinishTimeDescending BuildListOrder = "finishTimeDescending"
	// QueueTimeAscending orders by build queue time asc
	QueueTimeAscending BuildListOrder = "queueTimeAscending"
	// QueueTimeDescending orders by build queue time desc
	QueueTimeDescending BuildListOrder = "queueTimeDescending"
	// StartTimeAscending orders by build start time asc
	StartTimeAscending BuildListOrder = "startTimeAscending"
	// StartTimeDescending orders by build start time desc
	StartTimeDescending BuildListOrder = "startTimeDescending"
)

type BuildLogReference added in v0.6.0

type BuildLogReference struct {
	ID   *int    `json:"id"`
	Type *string `json:"type"`
	URL  *string `json:"url"`
}

BuildLogReference Information about the build logs.

func (*BuildLogReference) GetID added in v0.6.0

func (b *BuildLogReference) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*BuildLogReference) GetType added in v0.6.0

func (b *BuildLogReference) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*BuildLogReference) GetURL added in v0.6.0

func (b *BuildLogReference) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type BuildRepository added in v0.6.0

type BuildRepository struct {
	ID                 *string                `json:"id,omitempty"`
	Type               *string                `json:"type,omitempty"`
	Name               *string                `json:"name,omitempty"`
	URL                *string                `json:"url,omitempty"`
	RootFolder         *string                `json:"root_folder"`
	Properties         map[string]interface{} `json:"properties"`
	Clean              *string                `json:"clean"`
	DefaultBranch      *string                `json:"default_branch"`
	CheckoutSubmodules *bool                  `json:"checkout_submodules"`
}

BuildRepository represents a repository used by a build definition

func (*BuildRepository) GetCheckoutSubmodules added in v0.6.0

func (b *BuildRepository) GetCheckoutSubmodules() bool

GetCheckoutSubmodules returns the CheckoutSubmodules field if it's non-nil, zero value otherwise.

func (*BuildRepository) GetClean added in v0.6.0

func (b *BuildRepository) GetClean() string

GetClean returns the Clean field if it's non-nil, zero value otherwise.

func (*BuildRepository) GetDefaultBranch added in v0.6.0

func (b *BuildRepository) GetDefaultBranch() string

GetDefaultBranch returns the DefaultBranch field if it's non-nil, zero value otherwise.

func (*BuildRepository) GetID added in v0.6.0

func (b *BuildRepository) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*BuildRepository) GetName added in v0.6.0

func (b *BuildRepository) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*BuildRepository) GetRootFolder added in v0.6.0

func (b *BuildRepository) GetRootFolder() string

GetRootFolder returns the RootFolder field if it's non-nil, zero value otherwise.

func (*BuildRepository) GetType added in v0.6.0

func (b *BuildRepository) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*BuildRepository) GetURL added in v0.6.0

func (b *BuildRepository) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type BuildsListOptions

type BuildsListOptions struct {
	Definitions      *string `url:"definitions,omitempty"`
	Branch           *string `url:"branchName,omitempty"`
	Count            *int    `url:"$top,omitempty"`
	Repository       *string `url:"repositoryId,omitempty"`
	BuildIDs         *string `url:"buildIds,omitempty"`
	Order            *string `url:"queryOrder,omitempty"`
	Deleted          *string `url:"deletedFilter,omitempty"`
	MaxPerDefinition *string `url:"maxBuildsPerDefinition,omitempty"`
	Token            *string `url:"continuationToken,omitempty"`
	Props            *string `url:"properties,omitempty"`
	Tags             *string `url:"tagFilters,omitempty"`
	Result           *string `url:"resultFilter,omitempty"`
	Status           *string `url:"statusFilter,omitempty"`
	Reason           *string `url:"reasonFilter,omitempty"`
	UserID           *string `url:"requestedFor,omitempty"`
	MaxTime          *string `url:"maxTime,omitempty"`
	MinTime          *string `url:"minTime,omitempty"`
	BuildNumber      *string `url:"buildNumber,omitempty"`
	Queues           *string `url:"queues,omitempty"`
	RepoType         *string `url:"repositoryType,omitempty"`
}

BuildsListOptions describes what the request to the API should look like

func (*BuildsListOptions) GetBranch added in v0.6.0

func (b *BuildsListOptions) GetBranch() string

GetBranch returns the Branch field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetBuildIDs added in v0.6.0

func (b *BuildsListOptions) GetBuildIDs() string

GetBuildIDs returns the BuildIDs field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetBuildNumber added in v0.6.0

func (b *BuildsListOptions) GetBuildNumber() string

GetBuildNumber returns the BuildNumber field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetCount added in v0.6.0

func (b *BuildsListOptions) GetCount() int

GetCount returns the Count field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetDefinitions added in v0.6.0

func (b *BuildsListOptions) GetDefinitions() string

GetDefinitions returns the Definitions field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetDeleted added in v0.6.0

func (b *BuildsListOptions) GetDeleted() string

GetDeleted returns the Deleted field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetMaxPerDefinition added in v0.6.0

func (b *BuildsListOptions) GetMaxPerDefinition() string

GetMaxPerDefinition returns the MaxPerDefinition field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetMaxTime added in v0.6.0

func (b *BuildsListOptions) GetMaxTime() string

GetMaxTime returns the MaxTime field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetMinTime added in v0.6.0

func (b *BuildsListOptions) GetMinTime() string

GetMinTime returns the MinTime field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetOrder added in v0.6.0

func (b *BuildsListOptions) GetOrder() string

GetOrder returns the Order field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetProps added in v0.6.0

func (b *BuildsListOptions) GetProps() string

GetProps returns the Props field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetQueues added in v0.6.0

func (b *BuildsListOptions) GetQueues() string

GetQueues returns the Queues field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetReason added in v0.6.0

func (b *BuildsListOptions) GetReason() string

GetReason returns the Reason field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetRepoType added in v0.6.0

func (b *BuildsListOptions) GetRepoType() string

GetRepoType returns the RepoType field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetRepository added in v0.6.0

func (b *BuildsListOptions) GetRepository() string

GetRepository returns the Repository field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetResult added in v0.6.0

func (b *BuildsListOptions) GetResult() string

GetResult returns the Result field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetStatus added in v0.6.0

func (b *BuildsListOptions) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetTags added in v0.6.0

func (b *BuildsListOptions) GetTags() string

GetTags returns the Tags field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetToken added in v0.6.0

func (b *BuildsListOptions) GetToken() string

GetToken returns the Token field if it's non-nil, zero value otherwise.

func (*BuildsListOptions) GetUserID added in v0.6.0

func (b *BuildsListOptions) GetUserID() string

GetUserID returns the UserID field if it's non-nil, zero value otherwise.

type BuildsListResponse

type BuildsListResponse struct {
	Count  int      `json:"count"`
	Builds []*Build `json:"value"`
}

BuildsListResponse is the wrapper around the main response for the List of Builds

type BuildsService

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

BuildsService handles communication with the builds methods on the API utilising https://docs.microsoft.com/en-gb/rest/api/vsts/build/builds

func (*BuildsService) List

func (s *BuildsService) List(ctx context.Context, owner string, project string, opts *BuildsListOptions) ([]*Build, *http.Response, error)

List returns list of the builds utilising https://docs.microsoft.com/en-gb/rest/api/vsts/build/builds/list

func (*BuildsService) Queue

func (s *BuildsService) Queue(ctx context.Context, owner string, project string, build *Build, opts *QueueBuildOptions) (*Build, *http.Response, error)

Queue inserts new build creation to queue Requires build ID number in build.definition Example body: {"definition": {"id": 1}, "sourceBranch": "refs/heads/master"} utilising https://docs.microsoft.com/en-us/rest/api/azure/devops/build/Builds/Queue

type Client

type Client struct {

	// BaseURL Comprised of baseURL and account
	BaseURL url.URL

	VsspsBaseURL url.URL

	VsaexBaseURL url.URL

	UserAgent string

	// Account Default tenant identifier
	Account string

	// Services used to proxy to other API endpoints
	Boards            *BoardsService
	BuildDefinitions  *BuildDefinitionsService
	Builds            *BuildsService
	DeliveryPlans     *DeliveryPlansService
	Favourites        *FavouritesService
	Git               *GitService
	Iterations        *IterationsService
	PolicyEvaluations *PolicyEvaluationsService
	PullRequests      *PullRequestsService
	Teams             *TeamsService
	Tests             *TestsService
	Users             *UsersService
	UserEntitlements  *UserEntitlementsService
	WorkItems         *WorkItemsService
	// contains filtered or unexported fields
}

Client for interacting with the Azure DevOps API

func NewClient

func NewClient(httpClient *http.Client) (*Client, error)

NewClient returns a new Azure DevOps API client. If a nil httpClient is provided, http.DefaultClient will be used. To use API methods which require authentication, provide an http.Client that will perform the authentication for you (such as that provided by the golang.org/x/oauth2 library).

func (*Client) Execute

func (c *Client) Execute(ctx context.Context, req *http.Request, r interface{}) (*http.Response, error)

Execute sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by r, or returned as an error if an API error has occurred. If r implements the io.Writer interface, the raw response body will be written to r, without attempting to first decode it.

The provided ctx must be non-nil. If it is canceled or times out, ctx.Err() will be returned.

func (*Client) NewRequest

func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error)

NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.

type Comment

type Comment struct {
	Links                  *map[string]Link `json:"_links,omitempty"`
	Author                 *IdentityRef     `json:"author,omitempty"`
	CommentType            *string          `json:"commentType,omitempty"`
	Content                *string          `json:"content,omitempty"`
	ID                     *int             `json:"id,omitempty"`
	IsDeleted              *bool            `json:"isDeleted,omitempty"`
	LastContentUpdatedDate *Time            `json:"lastContentUpdatedDate,omitempty"`
	LastUpdatedDate        *Time            `json:"lastUpdatedDate,omitempty"`
	ParentCommentID        *int             `json:"parentCommentId,omitempty"`
	PublishedDate          *Time            `json:"publishedDate,omitempty"`
	UsersLiked             []*IdentityRef   `json:"usersLiked,omitempty"`
}

Comment Represents a comment which is one of potentially many in a comment thread.

func (*Comment) GetAuthor

func (c *Comment) GetAuthor() *IdentityRef

GetAuthor returns the Author field.

func (*Comment) GetCommentType

func (c *Comment) GetCommentType() string

GetCommentType returns the CommentType field if it's non-nil, zero value otherwise.

func (*Comment) GetContent

func (c *Comment) GetContent() string

GetContent returns the Content field if it's non-nil, zero value otherwise.

func (*Comment) GetID

func (c *Comment) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Comment) GetIsDeleted

func (c *Comment) GetIsDeleted() bool

GetIsDeleted returns the IsDeleted field if it's non-nil, zero value otherwise.

func (*Comment) GetLastContentUpdatedDate

func (c *Comment) GetLastContentUpdatedDate() *Time

GetLastContentUpdatedDate returns the LastContentUpdatedDate field.

func (*Comment) GetLastUpdatedDate

func (c *Comment) GetLastUpdatedDate() *Time

GetLastUpdatedDate returns the LastUpdatedDate field.

func (c *Comment) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*Comment) GetParentCommentID

func (c *Comment) GetParentCommentID() int

GetParentCommentID returns the ParentCommentID field if it's non-nil, zero value otherwise.

func (*Comment) GetPublishedDate

func (c *Comment) GetPublishedDate() *Time

GetPublishedDate returns the PublishedDate field.

type CommentPosition

type CommentPosition struct {
	Line   *int `json:"line,omitempty"`
	Offset *int `json:"offset,omitempty"`
}

CommentPosition describes a comment position

func (*CommentPosition) GetLine

func (c *CommentPosition) GetLine() int

GetLine returns the Line field if it's non-nil, zero value otherwise.

func (*CommentPosition) GetOffset

func (c *CommentPosition) GetOffset() int

GetOffset returns the Offset field if it's non-nil, zero value otherwise.

type CommentThreadStatus

type CommentThreadStatus int

CommentThreadStatus enum declaration

const (
	StatusUnknown CommentThreadStatus = iota
	StatusActive
	Fixed
	WontFix
	Closed
	ByDesign
	Pending
)

CommentThreadStatus enum declaration

func (CommentThreadStatus) String

func (d CommentThreadStatus) String() string

type CommentType

type CommentType int

CommentType enum declaration

const (
	// The comment type is not known.
	CommentTypeUnknown CommentType = iota
	// This is a regular user comment.
	CommentTypeText
	// The comment comes as a result of a code change.
	CommentTypeCodeChange
	// The comment represents a system message.
	CommentTypeSystem
)

CommentType enum declaration

func (CommentType) String

func (d CommentType) String() string

type CommentVersionRef

type CommentVersionRef struct {
	CommentID *int    `json:"commentId,omitempty"`
	Version   *int    `json:"version,omitempty"`
	URL       *string `json:"url,omitempty"`
}

CommentVersionRef refers to the specific version of a comment

func (*CommentVersionRef) GetCommentID

func (c *CommentVersionRef) GetCommentID() int

GetCommentID returns the CommentID field if it's non-nil, zero value otherwise.

func (*CommentVersionRef) GetURL

func (c *CommentVersionRef) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*CommentVersionRef) GetVersion

func (c *CommentVersionRef) GetVersion() int

GetVersion returns the Version field if it's non-nil, zero value otherwise.

type DeliveryPlan

type DeliveryPlan struct {
	ID      *string `json:"id,omitempty"`
	Name    *string `json:"name,omitempty"`
	Type    *string `json:"type,omitempty"`
	Created *string `json:"createdDate,omitempty"`
	URL     *string `json:"url,omitempty"`
}

DeliveryPlan describes an plan

func (*DeliveryPlan) GetCreated

func (d *DeliveryPlan) GetCreated() string

GetCreated returns the Created field if it's non-nil, zero value otherwise.

func (*DeliveryPlan) GetID

func (d *DeliveryPlan) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*DeliveryPlan) GetName

func (d *DeliveryPlan) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*DeliveryPlan) GetType

func (d *DeliveryPlan) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*DeliveryPlan) GetURL

func (d *DeliveryPlan) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type DeliveryPlanTimeLine

type DeliveryPlanTimeLine struct {
	StartDate *string         `json:"startDate,omitempty"`
	EndDate   *string         `json:"endDate,omitempty"`
	ID        *string         `json:"id,omitempty"`
	Revision  *int            `json:"revision,omitempty"`
	Teams     []*DeliveryTeam `json:"teams,omitempty"`
}

DeliveryPlanTimeLine describes the delivery plan get response

func (*DeliveryPlanTimeLine) GetEndDate

func (d *DeliveryPlanTimeLine) GetEndDate() string

GetEndDate returns the EndDate field if it's non-nil, zero value otherwise.

func (*DeliveryPlanTimeLine) GetID

func (d *DeliveryPlanTimeLine) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*DeliveryPlanTimeLine) GetRevision

func (d *DeliveryPlanTimeLine) GetRevision() int

GetRevision returns the Revision field if it's non-nil, zero value otherwise.

func (*DeliveryPlanTimeLine) GetStartDate

func (d *DeliveryPlanTimeLine) GetStartDate() string

GetStartDate returns the StartDate field if it's non-nil, zero value otherwise.

type DeliveryPlansListOptions

type DeliveryPlansListOptions struct {
}

DeliveryPlansListOptions describes what the request to the API should look like

type DeliveryPlansListResponse

type DeliveryPlansListResponse struct {
	Count         int             `json:"count"`
	DeliveryPlans []*DeliveryPlan `json:"value"`
}

DeliveryPlansListResponse describes the delivery plans list response

type DeliveryPlansService

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

DeliveryPlansService handles communication with the deliverytimeline methods on the API utilising https://docs.microsoft.com/en-us/rest/api/vsts/work/deliverytimeline

func (*DeliveryPlansService) GetTimeLine

func (s *DeliveryPlansService) GetTimeLine(ctx context.Context, owner string, project string, ID string, startDate, endDate string) (*DeliveryPlanTimeLine, *http.Response, error)

GetTimeLine will fetch the details about a specific delivery plan

func (*DeliveryPlansService) List

List returns a list of delivery plans

type DeliveryTeam

type DeliveryTeam struct {
	ID         *string      `json:"id,omitempty"`
	Name       *string      `json:"name,omitempty"`
	Iterations []*Iteration `json:"iterations,omitempty"`
}

DeliveryTeam describes the teams in a specific plan

func (*DeliveryTeam) GetID

func (d *DeliveryTeam) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*DeliveryTeam) GetName

func (d *DeliveryTeam) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

type Event

type Event struct {
	SubscriptionID     string             `json:"subscriptionId,omitempty"`
	NotificationID     int                `json:"notificationId,omitempty"`
	ID                 string             `json:"id,omitempty"`
	EventType          string             `json:"eventType,omitempty"`
	Message            Message            `json:"message,omitempty"`
	DetailedMessage    Message            `json:"detailedMessage,omitempty"`
	RawPayload         json.RawMessage    `json:"resource,omitempty"`
	ResourceVersion    string             `json:"resourceVersion,omitempty"`
	ResourceContainers ResourceContainers `json:"resourceContainers,omitempty"`
	CreatedDate        Time               `json:"createdDate,omitempty"`
	Resource           interface{}
	PayloadType        PayloadType
}

Event - Describes an Azure Devops webhook payload parent Delay parsing Resource using *json.RawMessage until we know EventType. The contents of Resource change depending on EventType. PayloadType is filled with an enum that describes the type of resource payload.

func ParseWebHook

func ParseWebHook(payload []byte) (*Event, error)

ParseWebHook parses the event payload into a corresponding struct. An error will be returned for unrecognized event types.

Example usage:

    func (s *EventMonitor) ServeHTTP(w http.ResponseWriter, r *http.Request) {
      payload, err := azuredevops.ValidatePayload(r, s.user, s.pass)
      if err != nil { ... }
      event, err := azuredevops.ParseWebHook(payload)
      if err != nil { ... }
      switch event.PayloadType {
	 	 case azuredevops.WorkItemEvent:
		        processWorkItemEvent(&event)
	     case azuredevops.PullRequestEvent:
             processPullRequestEvent(&event)
      ...
      }
    }

https://docs.microsoft.com/en-us/azure/devops/service-hooks/events?view=azure-devops

func (*Event) ParsePayload

func (e *Event) ParsePayload() (payload interface{}, err error)

ParsePayload parses the event payload. For recognized event types, it returns the webhook payload with a parsed struct in the Event.Resource field.

type Favourite

type Favourite struct {
	ID           *string `json:"id,omitempty"`
	ArtifactName *string `json:"artifactName,omitempty"`
	ArtifactType *string `json:"artifactType,omitempty"`
	ArtifactID   *string `json:"artifactId,omitempty"`
}

Favourite describes what a favourite is

func (*Favourite) GetArtifactID

func (f *Favourite) GetArtifactID() string

GetArtifactID returns the ArtifactID field if it's non-nil, zero value otherwise.

func (*Favourite) GetArtifactName

func (f *Favourite) GetArtifactName() string

GetArtifactName returns the ArtifactName field if it's non-nil, zero value otherwise.

func (*Favourite) GetArtifactType

func (f *Favourite) GetArtifactType() string

GetArtifactType returns the ArtifactType field if it's non-nil, zero value otherwise.

func (*Favourite) GetID

func (f *Favourite) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

type FavouritesResponse

type FavouritesResponse struct {
	Count      int          `json:"count"`
	Favourites []*Favourite `json:"value"`
}

FavouritesResponse describes the favourites response

type FavouritesService

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

FavouritesService handles communication with the favourites methods on the API So far it looks like this is undocumented, so this could change

func (*FavouritesService) List

func (s *FavouritesService) List(ctx context.Context, owner, project string) ([]*Favourite, *http.Response, error)

List returns a list of the favourite items from for the user

type FieldReference

type FieldReference struct {
	ReferenceName *string `json:"referenceName,omitempty"`
	URL           *string `json:"url,omitempty"`
}

FieldReference describes a row on the board

func (*FieldReference) GetReferenceName

func (f *FieldReference) GetReferenceName() string

GetReferenceName returns the ReferenceName field if it's non-nil, zero value otherwise.

func (*FieldReference) GetURL

func (f *FieldReference) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type FileContentMetadata

type FileContentMetadata struct {
	ContentType *string `json:"contentType,omitempty"`
	Encoding    *int    `json:"encoding,omitempty"`
	Extension   *string `json:"extension,omitempty"`
	FileName    *string `json:"fileName,omitempty"`
	IsBinary    *bool   `json:"isBinary,omitempty"`
	IsImage     *bool   `json:"isImage,omitempty"`
	VSLink      *string `json:"vsLink,omitempty"`
}

FileContentMetadata Describes files referenced by a GitItem

func (*FileContentMetadata) GetContentType

func (f *FileContentMetadata) GetContentType() string

GetContentType returns the ContentType field if it's non-nil, zero value otherwise.

func (*FileContentMetadata) GetEncoding

func (f *FileContentMetadata) GetEncoding() int

GetEncoding returns the Encoding field if it's non-nil, zero value otherwise.

func (*FileContentMetadata) GetExtension

func (f *FileContentMetadata) GetExtension() string

GetExtension returns the Extension field if it's non-nil, zero value otherwise.

func (*FileContentMetadata) GetFileName

func (f *FileContentMetadata) GetFileName() string

GetFileName returns the FileName field if it's non-nil, zero value otherwise.

func (*FileContentMetadata) GetIsBinary

func (f *FileContentMetadata) GetIsBinary() bool

GetIsBinary returns the IsBinary field if it's non-nil, zero value otherwise.

func (*FileContentMetadata) GetIsImage

func (f *FileContentMetadata) GetIsImage() bool

GetIsImage returns the IsImage field if it's non-nil, zero value otherwise.

func (f *FileContentMetadata) GetVSLink() string

GetVSLink returns the VSLink field if it's non-nil, zero value otherwise.

type GitChange

type GitChange struct {
	ChangeID           *int         `json:"changeId,omitempty"`
	ChangeType         *string      `json:"changeType,omitempty"`
	Item               *GitItem     `json:"item,omitempty"`
	NewContent         *ItemContent `json:"newContent,omitempty"`
	NewContentTemplate *GitTemplate `json:"newContentTemplate,omitempty"`
	OriginalPath       *string      `json:"originalPath,omitempty"`
	SourceServerItem   *string      `json:"sourceServerItem,omitempty"`
	URL                *string      `json:"url,omitempty"`
}

GitChange describes file path and content changes

func (*GitChange) GetChangeID

func (g *GitChange) GetChangeID() int

GetChangeID returns the ChangeID field if it's non-nil, zero value otherwise.

func (*GitChange) GetChangeType

func (g *GitChange) GetChangeType() string

GetChangeType returns the ChangeType field if it's non-nil, zero value otherwise.

func (*GitChange) GetItem

func (g *GitChange) GetItem() *GitItem

GetItem returns the Item field.

func (*GitChange) GetNewContent

func (g *GitChange) GetNewContent() *ItemContent

GetNewContent returns the NewContent field.

func (*GitChange) GetNewContentTemplate

func (g *GitChange) GetNewContentTemplate() *GitTemplate

GetNewContentTemplate returns the NewContentTemplate field.

func (*GitChange) GetOriginalPath

func (g *GitChange) GetOriginalPath() string

GetOriginalPath returns the OriginalPath field if it's non-nil, zero value otherwise.

func (*GitChange) GetSourceServerItem

func (g *GitChange) GetSourceServerItem() string

GetSourceServerItem returns the SourceServerItem field if it's non-nil, zero value otherwise.

func (*GitChange) GetURL

func (g *GitChange) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type GitCommitChanges

type GitCommitChanges struct {
	ChangeCounts *map[string]int `json:"changeCounts,omitempty"`
	Changes      []*GitChange    `json:"changes,omitempty"`
}

GitCommitChanges is a list of GitCommitRefs and count of all changes describes in the response from the API

func (*GitCommitChanges) GetChangeCounts

func (g *GitCommitChanges) GetChangeCounts() map[string]int

GetChangeCounts returns the ChangeCounts field if it's non-nil, zero value otherwise.

type GitCommitDiffs added in v0.12.0

type GitCommitDiffs struct {
	AheadCount         *int                              `json:"aheadCount,omitempty"`
	AllChangesIncluded *bool                             `json:"allChangesIncluded,omitempty"`
	BaseCommit         *string                           `json:"baseCommit,omitempty"`
	BehindCount        *int                              `json:"behindCount,omitempty"`
	ChangeCounts       *map[VersionControlChangeType]int `json:"changeCounts,omitempty"`
	Changes            []*GitChange                      `json:"changes,omitempty"`
	CommonCommit       *string                           `json:"commonCommit,omitempty"`
	TargetCommit       *string                           `json:"targetCommit,omitempty"`
}

GitCommitDiffs describes the difference between two commits

func (*GitCommitDiffs) GetAheadCount added in v0.12.0

func (g *GitCommitDiffs) GetAheadCount() int

GetAheadCount returns the AheadCount field if it's non-nil, zero value otherwise.

func (*GitCommitDiffs) GetAllChangesIncluded added in v0.12.0

func (g *GitCommitDiffs) GetAllChangesIncluded() bool

GetAllChangesIncluded returns the AllChangesIncluded field if it's non-nil, zero value otherwise.

func (*GitCommitDiffs) GetBaseCommit added in v0.12.0

func (g *GitCommitDiffs) GetBaseCommit() string

GetBaseCommit returns the BaseCommit field if it's non-nil, zero value otherwise.

func (*GitCommitDiffs) GetBehindCount added in v0.12.0

func (g *GitCommitDiffs) GetBehindCount() int

GetBehindCount returns the BehindCount field if it's non-nil, zero value otherwise.

func (*GitCommitDiffs) GetChangeCounts added in v0.12.0

func (g *GitCommitDiffs) GetChangeCounts() map[VersionControlChangeType]int

GetChangeCounts returns the ChangeCounts field if it's non-nil, zero value otherwise.

func (*GitCommitDiffs) GetCommonCommit added in v0.12.0

func (g *GitCommitDiffs) GetCommonCommit() string

GetCommonCommit returns the CommonCommit field if it's non-nil, zero value otherwise.

func (*GitCommitDiffs) GetTargetCommit added in v0.12.0

func (g *GitCommitDiffs) GetTargetCommit() string

GetTargetCommit returns the TargetCommit field if it's non-nil, zero value otherwise.

type GitCommitRef

type GitCommitRef struct {
	Links            *map[string]Link `json:"_links,omitempty"`
	CommitID         *string          `json:"commitId,omitempty"`
	Author           *GitUserDate     `json:"author,omitempty"`
	Committer        *GitUserDate     `json:"committer,omitempty"`
	Comment          *string          `json:"comment,omitempty"`
	CommentTruncated *bool            `json:"commentTruncated,omitempty"`
	URL              *string          `json:"url,omitempty"`
	ChangeCounts     *map[string]int  `json:"changeCounts,omitempty"`
	Changes          *GitChange       `json:"changes,omitempty"`
	Parents          []*string        `json:"parents,omitempty"`
	Push             *GitPushRef      `json:"push,omitempty"`
	RemoteURL        *string          `json:"remoteUrl,omitempty"`
	Statuses         []*GitStatus     `json:"statuses,omitempty"`
	WorkItems        *ResourceRef     `json:"workItems,omitempty"`
}

GitCommitRef describes a single git commit reference

func (*GitCommitRef) GetAuthor

func (g *GitCommitRef) GetAuthor() *GitUserDate

GetAuthor returns the Author field.

func (*GitCommitRef) GetChangeCounts

func (g *GitCommitRef) GetChangeCounts() map[string]int

GetChangeCounts returns the ChangeCounts field if it's non-nil, zero value otherwise.

func (*GitCommitRef) GetChanges

func (g *GitCommitRef) GetChanges() *GitChange

GetChanges returns the Changes field.

func (*GitCommitRef) GetComment

func (g *GitCommitRef) GetComment() string

GetComment returns the Comment field if it's non-nil, zero value otherwise.

func (*GitCommitRef) GetCommentTruncated

func (g *GitCommitRef) GetCommentTruncated() bool

GetCommentTruncated returns the CommentTruncated field if it's non-nil, zero value otherwise.

func (*GitCommitRef) GetCommitID

func (g *GitCommitRef) GetCommitID() string

GetCommitID returns the CommitID field if it's non-nil, zero value otherwise.

func (*GitCommitRef) GetCommitter

func (g *GitCommitRef) GetCommitter() *GitUserDate

GetCommitter returns the Committer field.

func (g *GitCommitRef) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*GitCommitRef) GetPush

func (g *GitCommitRef) GetPush() *GitPushRef

GetPush returns the Push field.

func (*GitCommitRef) GetRemoteURL

func (g *GitCommitRef) GetRemoteURL() string

GetRemoteURL returns the RemoteURL field if it's non-nil, zero value otherwise.

func (*GitCommitRef) GetURL

func (g *GitCommitRef) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*GitCommitRef) GetWorkItems

func (g *GitCommitRef) GetWorkItems() *ResourceRef

GetWorkItems returns the WorkItems field.

type GitItem

type GitItem struct {
	Links                 *map[string]Link     `json:"_links,omitempty"`
	CommitID              *string              `json:"commitId,omitempty"`
	Content               *string              `json:"content,omitempty"`
	ContentMetadata       *FileContentMetadata `json:"contentMetadata,omitempty"`
	GitObjectType         *string              `json:"gitObjectType,omitempty"`
	IsFolder              *bool                `json:"isFolder,omitempty"`
	IsSymLink             *bool                `json:"isSymLink,omitempty"`
	LatestProcessedChange *GitCommitRef        `json:"latestProcessedChange,omitempty"`
	ObjectID              *string              `json:"objectId,omitempty"`
	OriginalObjectID      *string              `json:"originalObjectId,omitempty"`
	Path                  *string              `json:"path,omitempty"`
	URL                   *string              `json:"url,omitempty"`
}

GitItem describes a single git item

func (*GitItem) GetCommitID

func (g *GitItem) GetCommitID() string

GetCommitID returns the CommitID field if it's non-nil, zero value otherwise.

func (*GitItem) GetContent

func (g *GitItem) GetContent() string

GetContent returns the Content field if it's non-nil, zero value otherwise.

func (*GitItem) GetContentMetadata

func (g *GitItem) GetContentMetadata() *FileContentMetadata

GetContentMetadata returns the ContentMetadata field.

func (*GitItem) GetGitObjectType

func (g *GitItem) GetGitObjectType() string

GetGitObjectType returns the GitObjectType field if it's non-nil, zero value otherwise.

func (*GitItem) GetIsFolder

func (g *GitItem) GetIsFolder() bool

GetIsFolder returns the IsFolder field if it's non-nil, zero value otherwise.

func (g *GitItem) GetIsSymLink() bool

GetIsSymLink returns the IsSymLink field if it's non-nil, zero value otherwise.

func (*GitItem) GetLatestProcessedChange

func (g *GitItem) GetLatestProcessedChange() *GitCommitRef

GetLatestProcessedChange returns the LatestProcessedChange field.

func (g *GitItem) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*GitItem) GetObjectID

func (g *GitItem) GetObjectID() string

GetObjectID returns the ObjectID field if it's non-nil, zero value otherwise.

func (*GitItem) GetOriginalObjectID

func (g *GitItem) GetOriginalObjectID() string

GetOriginalObjectID returns the OriginalObjectID field if it's non-nil, zero value otherwise.

func (*GitItem) GetPath

func (g *GitItem) GetPath() string

GetPath returns the Path field if it's non-nil, zero value otherwise.

func (*GitItem) GetURL

func (g *GitItem) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type GitObjectType

type GitObjectType int

GitObjectType enum declaration

const (
	Bad GitObjectType = iota
	Commit
	Tree
	Blob
	Tag
	Ext2
	OfsDelta
	RefDelta
)

GitObjectType enum declaration

func (GitObjectType) String

func (d GitObjectType) String() string

type GitPullRequest

type GitPullRequest struct {
	Links                 *map[string]Link                 `json:"_links,omitempty"`
	ArtifactID            *string                          `json:"artifactId,omitempty"`
	AutoCompleteSetBy     *IdentityRef                     `json:"autoCompleteSetBy,omitempty"`
	ClosedBy              *IdentityRef                     `json:"closedBy,omitempty"`
	ClosedDate            *Time                            `json:"closedDate,omitempty"`
	CodeReviewID          *int                             `json:"codeReviewId,omitempty"`
	Commits               []*GitCommitRef                  `json:"commits,omitempty"`
	CompletionOptions     *GitPullRequestCompletionOptions `json:"completionOptions,omitempty"`
	CompletionQueueTime   *Time                            `json:"completionQueueTime,	omitempty"`
	CreatedBy             *IdentityRef                     `json:"createdBy,omitempty"`
	CreationDate          *Time                            `json:"creationDate,omitempty"`
	Description           *string                          `json:"description,omitempty"`
	ForkSource            *GitRef                          `json:"forkSource,omitempty"`
	IsDraft               *bool                            `json:"isDraft,omitempty"`
	Labels                []*WebAPITagDefinition           `json:"labels,omitempty"`
	LastMergeCommit       *GitCommitRef                    `json:"lastMergeCommit,omitempty"`
	LastMergeSourceCommit *GitCommitRef                    `json:"lastMergeSourceCommit,omitempty"`
	LastMergeTargetCommit *GitCommitRef                    `json:"lastMergeTargetCommit,omitempty"`
	MergeFailureMessage   *string                          `json:"mergeFailureMessage,omitempty"`
	MergeFailureType      *string                          `json:"mergeFailureType,omitempty"`
	MergeID               *string                          `json:"mergeId,omitempty"`
	MergeOptions          *GitPullRequestMergeOptions      `json:"mergeOptions,omitempty"`
	MergeStatus           *string                          `json:"mergeStatus,omitempty"`
	PullRequestID         *int                             `json:"pullRequestId,omitempty"`
	Repository            *GitRepository                   `json:"repository,omitempty"`
	Reviewers             []*IdentityRefWithVote           `json:"reviewers,omitempty"`
	RemoteURL             *string                          `json:"remoteUrl,omitempty"`
	SourceRefName         *string                          `json:"sourceRefName,omitempty"`
	Status                *string                          `json:"status,omitempty"`
	SupportsIterations    *bool                            `json:"supportsIterations,omitempty"`
	TargetRefName         *string                          `json:"targetRefName,omitempty"`
	Title                 *string                          `json:"title,omitempty"`
	URL                   *string                          `json:"url,omitempty"`
	WorkItemRefs          []*ResourceRef                   `json:"workItemRefs,omitempty"`
}

GitPullRequest represents all the data associated with a pull request.

func (*GitPullRequest) GetArtifactID

func (g *GitPullRequest) GetArtifactID() string

GetArtifactID returns the ArtifactID field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetAutoCompleteSetBy

func (g *GitPullRequest) GetAutoCompleteSetBy() *IdentityRef

GetAutoCompleteSetBy returns the AutoCompleteSetBy field.

func (*GitPullRequest) GetClosedBy

func (g *GitPullRequest) GetClosedBy() *IdentityRef

GetClosedBy returns the ClosedBy field.

func (*GitPullRequest) GetClosedDate

func (g *GitPullRequest) GetClosedDate() *Time

GetClosedDate returns the ClosedDate field.

func (*GitPullRequest) GetCodeReviewID

func (g *GitPullRequest) GetCodeReviewID() int

GetCodeReviewID returns the CodeReviewID field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetCompletionOptions

func (g *GitPullRequest) GetCompletionOptions() *GitPullRequestCompletionOptions

GetCompletionOptions returns the CompletionOptions field.

func (*GitPullRequest) GetCompletionQueueTime

func (g *GitPullRequest) GetCompletionQueueTime() *Time

GetCompletionQueueTime returns the CompletionQueueTime field.

func (*GitPullRequest) GetCreatedBy

func (g *GitPullRequest) GetCreatedBy() *IdentityRef

GetCreatedBy returns the CreatedBy field.

func (*GitPullRequest) GetCreationDate

func (g *GitPullRequest) GetCreationDate() *Time

GetCreationDate returns the CreationDate field.

func (*GitPullRequest) GetDescription

func (g *GitPullRequest) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetForkSource

func (g *GitPullRequest) GetForkSource() *GitRef

GetForkSource returns the ForkSource field.

func (*GitPullRequest) GetIsDraft

func (g *GitPullRequest) GetIsDraft() bool

GetIsDraft returns the IsDraft field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetLastMergeCommit

func (g *GitPullRequest) GetLastMergeCommit() *GitCommitRef

GetLastMergeCommit returns the LastMergeCommit field.

func (*GitPullRequest) GetLastMergeSourceCommit

func (g *GitPullRequest) GetLastMergeSourceCommit() *GitCommitRef

GetLastMergeSourceCommit returns the LastMergeSourceCommit field.

func (*GitPullRequest) GetLastMergeTargetCommit

func (g *GitPullRequest) GetLastMergeTargetCommit() *GitCommitRef

GetLastMergeTargetCommit returns the LastMergeTargetCommit field.

func (g *GitPullRequest) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetMergeFailureMessage

func (g *GitPullRequest) GetMergeFailureMessage() string

GetMergeFailureMessage returns the MergeFailureMessage field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetMergeFailureType

func (g *GitPullRequest) GetMergeFailureType() string

GetMergeFailureType returns the MergeFailureType field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetMergeID

func (g *GitPullRequest) GetMergeID() string

GetMergeID returns the MergeID field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetMergeOptions

func (g *GitPullRequest) GetMergeOptions() *GitPullRequestMergeOptions

GetMergeOptions returns the MergeOptions field.

func (*GitPullRequest) GetMergeStatus

func (g *GitPullRequest) GetMergeStatus() string

GetMergeStatus returns the MergeStatus field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetPullRequestID

func (g *GitPullRequest) GetPullRequestID() int

GetPullRequestID returns the PullRequestID field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetRemoteURL

func (g *GitPullRequest) GetRemoteURL() string

GetRemoteURL returns the RemoteURL field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetRepository

func (g *GitPullRequest) GetRepository() *GitRepository

GetRepository returns the Repository field.

func (*GitPullRequest) GetSourceRefName

func (g *GitPullRequest) GetSourceRefName() string

GetSourceRefName returns the SourceRefName field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetStatus

func (g *GitPullRequest) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetSupportsIterations

func (g *GitPullRequest) GetSupportsIterations() bool

GetSupportsIterations returns the SupportsIterations field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetTargetRefName

func (g *GitPullRequest) GetTargetRefName() string

GetTargetRefName returns the TargetRefName field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetTitle

func (g *GitPullRequest) GetTitle() string

GetTitle returns the Title field if it's non-nil, zero value otherwise.

func (*GitPullRequest) GetURL

func (g *GitPullRequest) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type GitPullRequestChange added in v0.10.2

type GitPullRequestChange struct {
	ChangeTrackingID *int `json:"changeTrackingId,omitempty"`
}

GitPullRequestChange Change made in a pull request.

func (*GitPullRequestChange) GetChangeTrackingID added in v0.10.2

func (g *GitPullRequestChange) GetChangeTrackingID() int

GetChangeTrackingID returns the ChangeTrackingID field if it's non-nil, zero value otherwise.

type GitPullRequestCommentThread

type GitPullRequestCommentThread struct {
	Links                    *map[string]Link                    `json:"_links,omitempty"`
	Comments                 []*Comment                          `json:"comments,omitempty"`
	ID                       *int                                `json:"id,omitempty"`
	Identities               []*IdentityRef                      `json:"identities,omitempty"`
	IsDeleted                *bool                               `json:"isDeleted,omitempty"`
	LastUpdatedDate          *Time                               `json:"lastUpdatedDate,omitempty"`
	Properties               []*int                              `json:"properties,omitempty"`
	PublishedDate            *Time                               `json:"publishedDate,omitempty"`
	Status                   *string                             `json:"status,omitempty"`
	PullRequestThreadContext *GitPullRequestCommentThreadContext `json:"pullRequestThreadContext,omitempty"`
}

GitPullRequestCommentThread Represents a comment thread of a pull request. A thread contains meta data about the file it was left on along with one or more comments (an initial comment and the subsequent replies).

func (*GitPullRequestCommentThread) GetID

func (g *GitPullRequestCommentThread) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*GitPullRequestCommentThread) GetIsDeleted

func (g *GitPullRequestCommentThread) GetIsDeleted() bool

GetIsDeleted returns the IsDeleted field if it's non-nil, zero value otherwise.

func (*GitPullRequestCommentThread) GetLastUpdatedDate

func (g *GitPullRequestCommentThread) GetLastUpdatedDate() *Time

GetLastUpdatedDate returns the LastUpdatedDate field.

func (g *GitPullRequestCommentThread) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*GitPullRequestCommentThread) GetPublishedDate

func (g *GitPullRequestCommentThread) GetPublishedDate() *Time

GetPublishedDate returns the PublishedDate field.

func (*GitPullRequestCommentThread) GetPullRequestThreadContext

func (g *GitPullRequestCommentThread) GetPullRequestThreadContext() *GitPullRequestCommentThreadContext

GetPullRequestThreadContext returns the PullRequestThreadContext field.

func (*GitPullRequestCommentThread) GetStatus

func (g *GitPullRequestCommentThread) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

type GitPullRequestCommentThreadContext

type GitPullRequestCommentThreadContext struct {
	FilePath       *string          `json:"filePath,omitempty"`
	LeftFileEnd    *CommentPosition `json:"leftFileEnd,omitempty"`
	LeftFileStart  *CommentPosition `json:"leftFileStart,omitempty"`
	RightFileEnd   *CommentPosition `json:"rightFileEnd,omitempty"`
	RightFileStart *CommentPosition `json:"rightFileStart,omitempty"`
}

GitPullRequestCommentThreadContext Comment thread context contains details about what diffs were being viewed at the time of thread creation and whether or not the thread has been tracked from that original diff.

func (*GitPullRequestCommentThreadContext) GetFilePath

func (g *GitPullRequestCommentThreadContext) GetFilePath() string

GetFilePath returns the FilePath field if it's non-nil, zero value otherwise.

func (*GitPullRequestCommentThreadContext) GetLeftFileEnd

GetLeftFileEnd returns the LeftFileEnd field.

func (*GitPullRequestCommentThreadContext) GetLeftFileStart

func (g *GitPullRequestCommentThreadContext) GetLeftFileStart() *CommentPosition

GetLeftFileStart returns the LeftFileStart field.

func (*GitPullRequestCommentThreadContext) GetRightFileEnd

GetRightFileEnd returns the RightFileEnd field.

func (*GitPullRequestCommentThreadContext) GetRightFileStart

func (g *GitPullRequestCommentThreadContext) GetRightFileStart() *CommentPosition

GetRightFileStart returns the RightFileStart field.

type GitPullRequestCompletionOptions

type GitPullRequestCompletionOptions struct {
	BypassPolicy            *bool   `json:"bypassPolicy,omitempty"`
	BypassReason            *string `json:"bypassReason,omitempty"`
	DeleteSourceBranch      *bool   `json:"deleteSourceBranch,omitempty"`
	MergeCommitMessage      *string `json:"mergeCommitMessage,omitempty"`
	MergeStrategy           *string `json:"mergeStrategy,omitempty"`
	SquashMerge             *bool   `json:"squashMerge,omitempty"`
	TransitionWorkItems     *bool   `json:"transitionWorkItems,omitempty"`
	TriggeredByAutoComplete *bool   `json:"triggeredByAutoComplete,omitempty"`
}

GitPullRequestCompletionOptions describes preferences about how the pull request should be completed. SquashMerge is deprecated. You should explicity set the value of MergeStrategy. If MergeStrategy is set to any value, the SquashMerge value will be ignored. If MergeStrategy is not set, the merge strategy will be no-fast-forward if this flag is false, or squash if true. https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20requests/update?view=azure-devops-rest-5.1#pullrequeststatus

func (*GitPullRequestCompletionOptions) GetBypassPolicy

func (g *GitPullRequestCompletionOptions) GetBypassPolicy() bool

GetBypassPolicy returns the BypassPolicy field if it's non-nil, zero value otherwise.

func (*GitPullRequestCompletionOptions) GetBypassReason

func (g *GitPullRequestCompletionOptions) GetBypassReason() string

GetBypassReason returns the BypassReason field if it's non-nil, zero value otherwise.

func (*GitPullRequestCompletionOptions) GetDeleteSourceBranch

func (g *GitPullRequestCompletionOptions) GetDeleteSourceBranch() bool

GetDeleteSourceBranch returns the DeleteSourceBranch field if it's non-nil, zero value otherwise.

func (*GitPullRequestCompletionOptions) GetMergeCommitMessage

func (g *GitPullRequestCompletionOptions) GetMergeCommitMessage() string

GetMergeCommitMessage returns the MergeCommitMessage field if it's non-nil, zero value otherwise.

func (*GitPullRequestCompletionOptions) GetMergeStrategy

func (g *GitPullRequestCompletionOptions) GetMergeStrategy() string

GetMergeStrategy returns the MergeStrategy field if it's non-nil, zero value otherwise.

func (*GitPullRequestCompletionOptions) GetSquashMerge

func (g *GitPullRequestCompletionOptions) GetSquashMerge() bool

GetSquashMerge returns the SquashMerge field if it's non-nil, zero value otherwise.

func (*GitPullRequestCompletionOptions) GetTransitionWorkItems

func (g *GitPullRequestCompletionOptions) GetTransitionWorkItems() bool

GetTransitionWorkItems returns the TransitionWorkItems field if it's non-nil, zero value otherwise.

func (*GitPullRequestCompletionOptions) GetTriggeredByAutoComplete

func (g *GitPullRequestCompletionOptions) GetTriggeredByAutoComplete() bool

GetTriggeredByAutoComplete returns the TriggeredByAutoComplete field if it's non-nil, zero value otherwise.

type GitPullRequestIteration added in v0.10.2

type GitPullRequestIteration struct {
	Links            interface{}             `json:"_links,omitempty"`
	Author           *IdentityRef            `json:"author,omitempty"`
	ChangeList       []*GitPullRequestChange `json:"changeList,omitempty"`
	Commits          []*GitCommitRef         `json:"commits,omitempty"`
	CommonRefCommit  *GitCommitRef           `json:"commonRefCommit,omitempty"`
	CreatedDate      *Time                   `json:"createdDate,omitempty"`
	Description      *string                 `json:"description,omitempty"`
	HasMoreCommits   *bool                   `json:"hasMoreCommits,omitempty"`
	ID               *int                    `json:"id,omitempty"`
	NewTargetRefName *string                 `json:"newTargetRefName,omitempty"`
	OldTargetRefName *string                 `json:"oldTargetRefName,omitempty"`
	Push             *GitPushRef             `json:"push,omitempty"`
	Reason           *string                 `json:"reason,omitempty"`
	SourceRefCommit  *GitCommitRef           `json:"sourceRefCommit,omitempty"`
	TargetRefCommit  *GitCommitRef           `json:"targetRefCommit,omitempty"`
	UpdatedDate      *Time                   `json:"updatedDate,omitempty"`
}

GitPullRequestIteration Provides properties that describe a Git pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request.

func (*GitPullRequestIteration) GetAuthor added in v0.10.2

func (g *GitPullRequestIteration) GetAuthor() *IdentityRef

GetAuthor returns the Author field.

func (*GitPullRequestIteration) GetCommonRefCommit added in v0.10.2

func (g *GitPullRequestIteration) GetCommonRefCommit() *GitCommitRef

GetCommonRefCommit returns the CommonRefCommit field.

func (*GitPullRequestIteration) GetCreatedDate added in v0.10.2

func (g *GitPullRequestIteration) GetCreatedDate() *Time

GetCreatedDate returns the CreatedDate field.

func (*GitPullRequestIteration) GetDescription added in v0.10.2

func (g *GitPullRequestIteration) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*GitPullRequestIteration) GetHasMoreCommits added in v0.10.2

func (g *GitPullRequestIteration) GetHasMoreCommits() bool

GetHasMoreCommits returns the HasMoreCommits field if it's non-nil, zero value otherwise.

func (*GitPullRequestIteration) GetID added in v0.10.2

func (g *GitPullRequestIteration) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*GitPullRequestIteration) GetNewTargetRefName added in v0.10.2

func (g *GitPullRequestIteration) GetNewTargetRefName() string

GetNewTargetRefName returns the NewTargetRefName field if it's non-nil, zero value otherwise.

func (*GitPullRequestIteration) GetOldTargetRefName added in v0.10.2

func (g *GitPullRequestIteration) GetOldTargetRefName() string

GetOldTargetRefName returns the OldTargetRefName field if it's non-nil, zero value otherwise.

func (*GitPullRequestIteration) GetPush added in v0.10.2

func (g *GitPullRequestIteration) GetPush() *GitPushRef

GetPush returns the Push field.

func (*GitPullRequestIteration) GetReason added in v0.10.2

func (g *GitPullRequestIteration) GetReason() string

GetReason returns the Reason field if it's non-nil, zero value otherwise.

func (*GitPullRequestIteration) GetSourceRefCommit added in v0.10.2

func (g *GitPullRequestIteration) GetSourceRefCommit() *GitCommitRef

GetSourceRefCommit returns the SourceRefCommit field.

func (*GitPullRequestIteration) GetTargetRefCommit added in v0.10.2

func (g *GitPullRequestIteration) GetTargetRefCommit() *GitCommitRef

GetTargetRefCommit returns the TargetRefCommit field.

func (*GitPullRequestIteration) GetUpdatedDate added in v0.10.2

func (g *GitPullRequestIteration) GetUpdatedDate() *Time

GetUpdatedDate returns the UpdatedDate field.

type GitPullRequestIterationChanges added in v0.10.2

type GitPullRequestIterationChanges struct {
	ChangeEntries []*GitPullRequestChange `json:"changeEntries,omitempty"`
	NextSkip      *int                    `json:"nextSkip,omitempty"`
	NextTop       *int                    `json:"nextTop,omitempty"`
}

Collection of changes made in a pull request.

func (*GitPullRequestIterationChanges) GetNextSkip added in v0.10.2

func (g *GitPullRequestIterationChanges) GetNextSkip() int

GetNextSkip returns the NextSkip field if it's non-nil, zero value otherwise.

func (*GitPullRequestIterationChanges) GetNextTop added in v0.10.2

func (g *GitPullRequestIterationChanges) GetNextTop() int

GetNextTop returns the NextTop field if it's non-nil, zero value otherwise.

type GitPullRequestMergeOptions

type GitPullRequestMergeOptions struct {
	DetectRenameFalsePositives *bool `json:"detectRenameFalsePositives,omitempty"`
	DisableRenames             *bool `json:"disableRenames,omitempty"`
}

GitPullRequestMergeOptions describes the options which are used when a pull request merge is created.

func (*GitPullRequestMergeOptions) GetDetectRenameFalsePositives

func (g *GitPullRequestMergeOptions) GetDetectRenameFalsePositives() bool

GetDetectRenameFalsePositives returns the DetectRenameFalsePositives field if it's non-nil, zero value otherwise.

func (*GitPullRequestMergeOptions) GetDisableRenames

func (g *GitPullRequestMergeOptions) GetDisableRenames() bool

GetDisableRenames returns the DisableRenames field if it's non-nil, zero value otherwise.

type GitPullRequestMergeStrategy

type GitPullRequestMergeStrategy int

GitPullRequestMergeStrategy specifies the strategy used to merge the pull request during completion.

const (
	NoFastForward GitPullRequestMergeStrategy = iota
	Rebase
	SebaseMerge
	Squash
)

GitPullRequestMergeStrategy enum values

func (GitPullRequestMergeStrategy) String

type GitPullRequestStatus

type GitPullRequestStatus struct {
	GitStatus
	IterationID *int                   `json:"iterationId,omitempty"`
	Properties  map[string]interface{} `json:"properties,omitempty"`
}

GitPullRequestStatus This class contains the metadata of a service/extension posting pull request status. Status can be associated with a pull request or an iteration.

func (*GitPullRequestStatus) GetIterationID added in v0.10.2

func (g *GitPullRequestStatus) GetIterationID() int

GetIterationID returns the IterationID field if it's non-nil, zero value otherwise.

type GitPullRequestWithComment added in v0.8.4

type GitPullRequestWithComment struct {
	Comment     *Comment        `json:"comment,omitempty"`
	PullRequest *GitPullRequest `json:"pullRequest,omitempty"`
}

GitPullRequestWithComment contains a reference to an existing pull request and a comment.

func (*GitPullRequestWithComment) GetComment added in v0.8.4

func (g *GitPullRequestWithComment) GetComment() *Comment

GetComment returns the Comment field.

func (*GitPullRequestWithComment) GetPullRequest added in v0.8.4

func (g *GitPullRequestWithComment) GetPullRequest() *GitPullRequest

GetPullRequest returns the PullRequest field.

type GitPush

type GitPush struct {
	Links      *map[string]Link `json:"_links,omitempty"`
	Commits    []*GitCommitRef  `json:"commits,omitempty"`
	Date       *Time            `json:"date,omitempty"`
	PushID     *int             `json:"pushId,omitempty"`
	PushedBy   *IdentityRef     `json:"pushedBy,omitempty"`
	RefUpdates []*GitRefUpdate  `json:"refUpdates,omitempty"`
	Repository *GitRepository   `json:"repository,omitempty"`
	URL        *string          `json:"url,omitempty"`
}

GitPush describes a code push request event.

func (*GitPush) GetDate

func (g *GitPush) GetDate() *Time

GetDate returns the Date field.

func (g *GitPush) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*GitPush) GetPushID

func (g *GitPush) GetPushID() int

GetPushID returns the PushID field if it's non-nil, zero value otherwise.

func (*GitPush) GetPushedBy

func (g *GitPush) GetPushedBy() *IdentityRef

GetPushedBy returns the PushedBy field.

func (*GitPush) GetRepository

func (g *GitPush) GetRepository() *GitRepository

GetRepository returns the Repository field.

func (*GitPush) GetURL

func (g *GitPush) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type GitPushRef

type GitPushRef struct {
	Commits    []*GitCommitRef `json:"commits,omitempty"`
	RefUpdates []*GitRefUpdate `json:"refUpdates,omitempty"`
	Repository *GitRepository  `json:"repository,omitempty"`
}

GitPushRef Describes a push request

func (*GitPushRef) GetRepository

func (g *GitPushRef) GetRepository() *GitRepository

GetRepository returns the Repository field.

type GitRef

type GitRef struct {
	Links          *map[string]Link `json:"_links,omitempty"`
	Creator        *IdentityRef     `json:"creator,omitempty"`
	IsLocked       *bool            `json:"isLocked,omitempty"`
	IsLockedBy     *IdentityRef     `json:"isLockedBy,omitempty"`
	Name           *string          `json:"name,omitempty"`
	ObjectID       *string          `json:"objectId,omitempty"`
	PeeledObjectID *string          `json:"peeledObjectId,omitempty"`
	Repository     *GitRepository   `json:"repository,omitempty"`
	Statuses       []*GitStatus     `json:"statuses,omitempty"`
	URL            *string          `json:"url,omitempty"`
}

GitRef provides information about a git/fork ref.

func (*GitRef) GetCreator

func (g *GitRef) GetCreator() *IdentityRef

GetCreator returns the Creator field.

func (*GitRef) GetIsLocked

func (g *GitRef) GetIsLocked() bool

GetIsLocked returns the IsLocked field if it's non-nil, zero value otherwise.

func (*GitRef) GetIsLockedBy

func (g *GitRef) GetIsLockedBy() *IdentityRef

GetIsLockedBy returns the IsLockedBy field.

func (g *GitRef) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*GitRef) GetName

func (g *GitRef) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*GitRef) GetObjectID

func (g *GitRef) GetObjectID() string

GetObjectID returns the ObjectID field if it's non-nil, zero value otherwise.

func (*GitRef) GetPeeledObjectID

func (g *GitRef) GetPeeledObjectID() string

GetPeeledObjectID returns the PeeledObjectID field if it's non-nil, zero value otherwise.

func (*GitRef) GetRepository

func (g *GitRef) GetRepository() *GitRepository

GetRepository returns the Repository field.

func (*GitRef) GetURL

func (g *GitRef) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type GitRefListOptions

type GitRefListOptions struct {
	Filter             string `url:"filter,omitempty"`
	IncludeStatuses    bool   `url:"includeStatuses,omitempty"`
	LatestStatusesOnly bool   `url:"latestStatusesOnly,omitempty"`
}

GitRefListOptions describes what the request to the API should look like

type GitRefUpdate

type GitRefUpdate struct {
	IsLocked     *bool   `json:"isLocked,omitempty"`
	Name         *string `json:"name,omitempty"`
	NewObjectID  *string `json:"newObjectId,omitempty"`
	OldObjectID  *string `json:"oldObjectId,omitempty"`
	RepositoryID *string `json:"repositoryId,omitempty"`
}

GitRefUpdate Describes a ref update

func (*GitRefUpdate) GetIsLocked

func (g *GitRefUpdate) GetIsLocked() bool

GetIsLocked returns the IsLocked field if it's non-nil, zero value otherwise.

func (*GitRefUpdate) GetName

func (g *GitRefUpdate) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*GitRefUpdate) GetNewObjectID

func (g *GitRefUpdate) GetNewObjectID() string

GetNewObjectID returns the NewObjectID field if it's non-nil, zero value otherwise.

func (*GitRefUpdate) GetOldObjectID

func (g *GitRefUpdate) GetOldObjectID() string

GetOldObjectID returns the OldObjectID field if it's non-nil, zero value otherwise.

func (*GitRefUpdate) GetRepositoryID

func (g *GitRefUpdate) GetRepositoryID() string

GetRepositoryID returns the RepositoryID field if it's non-nil, zero value otherwise.

type GitRefsResponse

type GitRefsResponse struct {
	Count   int       `json:"count"`
	GitRefs []*GitRef `json:"value"`
}

GitRefsResponse describes the git list refs response

type GitRefsUpdateResponse added in v0.6.5

type GitRefsUpdateResponse struct {
	Count         int             `json:"count"`
	GitRefsUpdate []*GitRefUpdate `json:"value"`
}

GitRefsUpdateResponse describes the git list refs update response

type GitRepository

type GitRepository struct {
	Links            *map[string]Link      `json:"_links,omitempty"`
	DefaultBranch    *string               `json:"defaultBranch,omitempty"`
	ID               *string               `json:"id,omitempty"`
	IsFork           *bool                 `json:"isFork,omitempty"`
	Name             *string               `json:"name,omitempty"`
	ParentRepository *GitRepositoryRef     `json:"parentRepository,omitempty"`
	Project          *TeamProjectReference `json:"project,omitempty"`
	RemoteURL        *string               `json:"remoteUrl,omitempty"`
	Size             *int                  `json:"size,omitempty"`
	SSHURL           *string               `json:"sshUrl,omitempty"`
	URL              *string               `json:"url,omitempty"`
	ValidRemoteURLs  []*string             `json:"validRemoteUrls,omitempty"`
	WebURL           *string               `json:"webUrl,omitempty"`
}

GitRepository describes an Azure Devops Git repository.

func (*GitRepository) GetDefaultBranch

func (g *GitRepository) GetDefaultBranch() string

GetDefaultBranch returns the DefaultBranch field if it's non-nil, zero value otherwise.

func (*GitRepository) GetID

func (g *GitRepository) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*GitRepository) GetIsFork

func (g *GitRepository) GetIsFork() bool

GetIsFork returns the IsFork field if it's non-nil, zero value otherwise.

func (g *GitRepository) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*GitRepository) GetName

func (g *GitRepository) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*GitRepository) GetParentRepository

func (g *GitRepository) GetParentRepository() *GitRepositoryRef

GetParentRepository returns the ParentRepository field.

func (*GitRepository) GetProject

func (g *GitRepository) GetProject() *TeamProjectReference

GetProject returns the Project field.

func (*GitRepository) GetRemoteURL

func (g *GitRepository) GetRemoteURL() string

GetRemoteURL returns the RemoteURL field if it's non-nil, zero value otherwise.

func (*GitRepository) GetSSHURL

func (g *GitRepository) GetSSHURL() string

GetSSHURL returns the SSHURL field if it's non-nil, zero value otherwise.

func (*GitRepository) GetSize

func (g *GitRepository) GetSize() int

GetSize returns the Size field if it's non-nil, zero value otherwise.

func (*GitRepository) GetURL

func (g *GitRepository) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*GitRepository) GetWebURL added in v0.6.0

func (g *GitRepository) GetWebURL() string

GetWebURL returns the WebURL field if it's non-nil, zero value otherwise.

type GitRepositoryRef

type GitRepositoryRef struct {
	Collection *TeamProjectCollectionReference `json:"collection,omitempty"`
	ID         *string                         `json:"id,omitempty"`
	IsFork     *bool                           `json:"isFork,omitempty"`
	Name       *string                         `json:"name,omitempty"`
	Project    *TeamProjectReference           `json:"project,omitempty"`
	RemoteURL  *string                         `json:"remoteUrl,omitempty"`
	SSHURL     *string                         `json:"sshUrl,omitempty"`
	URL        *string                         `json:"url,omitempty"`
}

GitRepositoryRef describes a repository ref

func (*GitRepositoryRef) GetCollection

GetCollection returns the Collection field.

func (*GitRepositoryRef) GetID

func (g *GitRepositoryRef) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*GitRepositoryRef) GetIsFork

func (g *GitRepositoryRef) GetIsFork() bool

GetIsFork returns the IsFork field if it's non-nil, zero value otherwise.

func (*GitRepositoryRef) GetName

func (g *GitRepositoryRef) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*GitRepositoryRef) GetProject

func (g *GitRepositoryRef) GetProject() *TeamProjectReference

GetProject returns the Project field.

func (*GitRepositoryRef) GetRemoteURL

func (g *GitRepositoryRef) GetRemoteURL() string

GetRemoteURL returns the RemoteURL field if it's non-nil, zero value otherwise.

func (*GitRepositoryRef) GetSSHURL

func (g *GitRepositoryRef) GetSSHURL() string

GetSSHURL returns the SSHURL field if it's non-nil, zero value otherwise.

func (*GitRepositoryRef) GetURL

func (g *GitRepositoryRef) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type GitService

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

GitService handles communication with the git methods on the API See: https://docs.microsoft.com/en-us/rest/api/vsts/git/

func (*GitService) CreateStatus

func (s *GitService) CreateStatus(ctx context.Context, owner, project, repoName, ref string, status GitStatus) (*GitStatus, *http.Response, error)

CreateStatus creates a new status for a repository at the specified reference. Ref can be a SHA, a branch name, or a tag name. https://docs.microsoft.com/en-us/rest/api/azure/devops/git/statuses/create?view=azure-devops-rest-5.0

func (*GitService) GetChanges added in v0.7.1

func (s *GitService) GetChanges(ctx context.Context, owner, project, repoName, commitID string) (*GitCommitChanges, *http.Response, error)

GetChanges Return a single GitRepository https://docs.microsoft.com/en-us/rest/api/azure/devops/git/commits/get%20changes?view=azure-devops-rest-5.1

func (*GitService) GetDiffs added in v0.12.0

func (s *GitService) GetDiffs(ctx context.Context, owner string, project string, repoName string, baseVersion string, targetVersion string) (*GitCommitDiffs, *http.Response, error)

GetDiffs finds the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits. https://docs.microsoft.com/en-us/rest/api/azure/devops/git/diffs/get?view=azure-devops-rest-5.1

func (*GitService) GetRepository

func (s *GitService) GetRepository(ctx context.Context, owner, project, repoName string) (*GitRepository, *http.Response, error)

GetRepository Return a single GitRepository https://docs.microsoft.com/en-us/rest/api/azure/devops/git/repositories/get%20repository?view=azure-devops-rest-5.1

func (*GitService) ListRefs

func (s *GitService) ListRefs(ctx context.Context, owner, project, repo, refType string, opts *GitRefListOptions) ([]*GitRef, *http.Response, error)

ListRefs returns a list of the references for a git repo

func (*GitService) UpdateRefs added in v0.6.5

func (s *GitService) UpdateRefs(ctx context.Context, owner, project, repo, refType string, opts *GitRefListOptions) ([]*GitRef, *http.Response, error)

UpdateRefs returns a list of the references for a git repo

type GitStatus

type GitStatus struct {
	Links        *map[string]Link  `json:"_links,omitempty"`
	Context      *GitStatusContext `json:"context,omitempty"`
	CreatedBy    *IdentityRef      `json:"createdBy,omitempty"`
	CreationDate *Time             `json:"creationDate,omitempty"`
	Description  *string           `json:"description,omitempty"`
	ID           *int              `json:"id,omitempty"`
	State        *string           `json:"state,omitempty"`
	TargetURL    *string           `json:"targetUrl,omitempty"`
	UpdatedDate  *Time             `json:"updatedDate,omitempty"`
}

GitStatus describes a git status entity

func (*GitStatus) GetContext

func (g *GitStatus) GetContext() *GitStatusContext

GetContext returns the Context field.

func (*GitStatus) GetCreatedBy

func (g *GitStatus) GetCreatedBy() *IdentityRef

GetCreatedBy returns the CreatedBy field.

func (*GitStatus) GetCreationDate

func (g *GitStatus) GetCreationDate() *Time

GetCreationDate returns the CreationDate field.

func (*GitStatus) GetDescription

func (g *GitStatus) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*GitStatus) GetID

func (g *GitStatus) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (g *GitStatus) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*GitStatus) GetState

func (g *GitStatus) GetState() string

GetState returns the State field if it's non-nil, zero value otherwise.

func (*GitStatus) GetTargetURL

func (g *GitStatus) GetTargetURL() string

GetTargetURL returns the TargetURL field if it's non-nil, zero value otherwise.

func (*GitStatus) GetUpdatedDate

func (g *GitStatus) GetUpdatedDate() *Time

GetUpdatedDate returns the UpdatedDate field.

type GitStatusContext

type GitStatusContext struct {
	Genre *string `json:"genre,omitempty"`
	Name  *string `json:"name,omitempty"`
}

GitStatusContext Status context that uniquely identifies the status.

func (*GitStatusContext) GetGenre

func (g *GitStatusContext) GetGenre() string

GetGenre returns the Genre field if it's non-nil, zero value otherwise.

func (*GitStatusContext) GetName

func (g *GitStatusContext) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

type GitStatusState

type GitStatusState int

GitStatusState contains the metadata of a service/extension posting a status.

const (
	GitNotSet GitStatusState = iota
	GitPending
	GitSucceeded
	GitFailed
	GitError
	GitNotApplicable
)

GitStatusState enum values

func (GitStatusState) String

func (d GitStatusState) String() string

type GitStatusesResponse

type GitStatusesResponse struct {
	Count       int          `json:"count"`
	GitStatuses []*GitStatus `json:"value"`
}

GitStatusesResponse describes the git statuses response

type GitTemplate

type GitTemplate struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

GitTemplate describes a git template

func (*GitTemplate) GetName

func (g *GitTemplate) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*GitTemplate) GetType

func (g *GitTemplate) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

type GitUserDate

type GitUserDate struct {
	Name  *string `json:"name,omitempty"`
	Email *string `json:"email,omitempty"`
	Date  *Time   `json:"date,omitempty"`
}

GitUserDate User info and date for Git operations.

func (*GitUserDate) GetDate

func (g *GitUserDate) GetDate() *Time

GetDate returns the Date field.

func (*GitUserDate) GetEmail

func (g *GitUserDate) GetEmail() string

GetEmail returns the Email field if it's non-nil, zero value otherwise.

func (*GitUserDate) GetName

func (g *GitUserDate) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

type GraphDescriptorResult added in v0.7.2

type GraphDescriptorResult struct {
	Links map[string]Link `json:"_links,omitempty"`
	Value *string         `json:"value,omitempty"`
}

GraphDescriptorResult Returns user descriptor and links related to the request

func (*GraphDescriptorResult) GetValue added in v0.7.2

func (g *GraphDescriptorResult) GetValue() string

GetValue returns the Value field if it's non-nil, zero value otherwise.

type GraphGroup added in v0.7.2

type GraphGroup struct {
	GraphMember
	/**
	 * A short phrase to help human readers disambiguate groups with similar names
	 */
	Description         *string `json:"description,omitempty"`
	IsCrossProject      *bool   `json:"isCrossProject,omitempty"`
	IsDeleted           *bool   `json:"isDeleted,omitempty"`
	IsGlobalScope       *bool   `json:"isGlobalScope,omitempty"`
	IsRestrictedVisible *bool   `json:"isRestrictedVisible,omitempty"`
	LocalScopeID        *string `json:"localScopeId,omitempty"`
	ScopeID             *string `json:"scopeId,omitempty"`
	ScopeName           *string `json:"scopeName,omitempty"`
	ScopeType           *string `json:"scopeType,omitempty"`
	SecuringHostID      *string `json:"securingHostId,omitempty"`
	SpecialType         *string `json:"specialType,omitempty"`
}

GraphGroup is the parent struct describing a Microsoft Graph group for Azure Devops

func (*GraphGroup) GetDescription added in v0.7.2

func (g *GraphGroup) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*GraphGroup) GetIsCrossProject added in v0.7.2

func (g *GraphGroup) GetIsCrossProject() bool

GetIsCrossProject returns the IsCrossProject field if it's non-nil, zero value otherwise.

func (*GraphGroup) GetIsDeleted added in v0.7.2

func (g *GraphGroup) GetIsDeleted() bool

GetIsDeleted returns the IsDeleted field if it's non-nil, zero value otherwise.

func (*GraphGroup) GetIsGlobalScope added in v0.7.2

func (g *GraphGroup) GetIsGlobalScope() bool

GetIsGlobalScope returns the IsGlobalScope field if it's non-nil, zero value otherwise.

func (*GraphGroup) GetIsRestrictedVisible added in v0.7.2

func (g *GraphGroup) GetIsRestrictedVisible() bool

GetIsRestrictedVisible returns the IsRestrictedVisible field if it's non-nil, zero value otherwise.

func (*GraphGroup) GetLocalScopeID added in v0.7.2

func (g *GraphGroup) GetLocalScopeID() string

GetLocalScopeID returns the LocalScopeID field if it's non-nil, zero value otherwise.

func (*GraphGroup) GetScopeID added in v0.7.2

func (g *GraphGroup) GetScopeID() string

GetScopeID returns the ScopeID field if it's non-nil, zero value otherwise.

func (*GraphGroup) GetScopeName added in v0.7.2

func (g *GraphGroup) GetScopeName() string

GetScopeName returns the ScopeName field if it's non-nil, zero value otherwise.

func (*GraphGroup) GetScopeType added in v0.7.2

func (g *GraphGroup) GetScopeType() string

GetScopeType returns the ScopeType field if it's non-nil, zero value otherwise.

func (*GraphGroup) GetSecuringHostID added in v0.7.2

func (g *GraphGroup) GetSecuringHostID() string

GetSecuringHostID returns the SecuringHostID field if it's non-nil, zero value otherwise.

func (*GraphGroup) GetSpecialType added in v0.7.2

func (g *GraphGroup) GetSpecialType() string

GetSpecialType returns the SpecialType field if it's non-nil, zero value otherwise.

type GraphMember added in v0.7.2

type GraphMember struct {
	GraphSubject
	/**
	 * This represents the name of the container of origin for a graph member.
	 * (For MSA this is "Windows Live ID", for AD the name of the domain, for
	 * AAD the tenantID of the directory, for VSTS groups the ScopeId, etc)
	 */
	Domain *string `json:"domain,omitempty"`
	/**
	 * The email address of record for a given graph member. This may be
	 * different than the principal name.
	 */
	MailAddress *string `json:"mailAddress,omitempty"`
	/**
	 * This is the PrincipalName of this graph member from the source
	 * provider. The source provider may change this field over time and it
	 * is not guaranteed to be immutable for the life of the graph member by
	 * VSTS.
	 */
	PrincipalName *string `json:"principalName,omitempty"`
}

GraphMember is a child of the GraphUser struct

func (*GraphMember) GetDomain added in v0.7.2

func (g *GraphMember) GetDomain() string

GetDomain returns the Domain field if it's non-nil, zero value otherwise.

func (*GraphMember) GetMailAddress added in v0.7.2

func (g *GraphMember) GetMailAddress() string

GetMailAddress returns the MailAddress field if it's non-nil, zero value otherwise.

func (*GraphMember) GetPrincipalName added in v0.7.2

func (g *GraphMember) GetPrincipalName() string

GetPrincipalName returns the PrincipalName field if it's non-nil, zero value otherwise.

type GraphSubject added in v0.7.2

type GraphSubject struct {
	GraphSubjectBase
	/**
	 * [Internal Use Only] The legacy descriptor is here in case you need to
	 * access old version IMS using identity descriptor.
	 */
	LegacyDescriptor *string `json:"legacyDescriptor,omitempty"`
	/**
	 * The type of source provider for the origin identifier (ex:AD, AAD, MSA)
	 */
	Origin *string `json:"origin,omitempty"`
	/**
	 * The unique identifier from the system of origin. Typically a sid, object
	 * id or Guid. Linking and unlinking operations can cause this value to
	 * change for a user because the user is not backed by a different provider
	 * and has a different unique id in the new provider.
	 */
	OriginID *string `json:"originId,omitempty"`
	/**
	 * This field identifies the type of the graph subject (ex: Group, Scope, User).
	 */
	SubjectKind *string `json:"subjectKind,omitempty"`
}

GraphSubject A graph subject entity

func (*GraphSubject) GetLegacyDescriptor added in v0.7.2

func (g *GraphSubject) GetLegacyDescriptor() string

GetLegacyDescriptor returns the LegacyDescriptor field if it's non-nil, zero value otherwise.

func (*GraphSubject) GetOrigin added in v0.7.2

func (g *GraphSubject) GetOrigin() string

GetOrigin returns the Origin field if it's non-nil, zero value otherwise.

func (*GraphSubject) GetOriginID added in v0.7.2

func (g *GraphSubject) GetOriginID() string

GetOriginID returns the OriginID field if it's non-nil, zero value otherwise.

func (*GraphSubject) GetSubjectKind added in v0.7.2

func (g *GraphSubject) GetSubjectKind() string

GetSubjectKind returns the SubjectKind field if it's non-nil, zero value otherwise.

type GraphSubjectBase added in v0.7.2

type GraphSubjectBase struct {
	/*
	 * This field contains zero or more interesting links about the graph
	 * subject. These links may be invoked to obtain additional relationships
	 * or more detailed information about this graph subject.
	 */
	Links map[string]Link `json:"_links,omitempty"`
	/**
	 * The descriptor is the primary way to reference the graph subject while
	 * the system is running. This field will uniquely identify the same
	 * graph subject across both Accounts and Organizations.
	 */
	Descriptor *string `json:"descriptor,omitempty"`
	/**
	 * This is the non-unique display name of the graph subject. To change
	 * this field, you must alter its value in the source provider.
	 */
	DisplayName *string `json:"displayName,omitempty"`
	/**
	 * This url is the full route to the source resource of this graph subject.
	 */
	URL *string `json:"url,omitempty"`
}

GraphSubjectBase Base struct for other graph entities

func (*GraphSubjectBase) GetDescriptor added in v0.7.2

func (g *GraphSubjectBase) GetDescriptor() string

GetDescriptor returns the Descriptor field if it's non-nil, zero value otherwise.

func (*GraphSubjectBase) GetDisplayName added in v0.7.2

func (g *GraphSubjectBase) GetDisplayName() string

GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise.

func (*GraphSubjectBase) GetURL added in v0.7.2

func (g *GraphSubjectBase) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type GraphUser added in v0.7.2

type GraphUser struct {
	GraphMember
	IsDeletedInOrigin  *bool `json:"isDeletedOrigin,omitempty"`
	MetadataUpdateDate *Time `json:"metadataUpdateDate,omitempty"`
	/**
	* The meta type of the user in the origin, such as "member", "guest",
	* etc. See UserMetaType for the set of possible values.
	 */
	MetaType *string `json:"metaType,omitempty"`
}

GraphUser is the parent struct describing a Microsoft Graph user for Azure Devops

func (*GraphUser) GetIsDeletedInOrigin added in v0.7.2

func (g *GraphUser) GetIsDeletedInOrigin() bool

GetIsDeletedInOrigin returns the IsDeletedInOrigin field if it's non-nil, zero value otherwise.

func (*GraphUser) GetMetaType added in v0.7.2

func (g *GraphUser) GetMetaType() string

GetMetaType returns the MetaType field if it's non-nil, zero value otherwise.

func (*GraphUser) GetMetadataUpdateDate added in v0.7.2

func (g *GraphUser) GetMetadataUpdateDate() *Time

GetMetadataUpdateDate returns the MetadataUpdateDate field.

type GraphUsersListResponse added in v0.7.2

type GraphUsersListResponse struct {
	Count      int          `json:"count"`
	GraphUsers []*GraphUser `json:"value"`
}

GraphUsersListResponse describes what a response from the Users.List() API should look like

type IdentityRef

type IdentityRef struct {
	Links             *map[string]Link `json:"_links,omitempty"`
	Descriptor        *string          `json:"descriptor,omitempty"`
	DirectoryAlias    *string          `json:"directoryAlias,omitempty"`
	DisplayName       *string          `json:"displayName,omitempty"`
	ID                *string          `json:"id,omitempty"`
	ImageURL          *string          `json:"imageUrl,omitempty"`
	Inactive          *bool            `json:"inactive,omitempty"`
	IsAadIdentity     *bool            `json:"isAadIdentity,omitempty"`
	IsContainer       *bool            `json:"isContainer,omitempty"`
	IsDeletedInOrigin *bool            `json:"isDeletedInOrigin,omitempty"`
	ProfileURL        *string          `json:"profileUrl,omitempty"`
	URL               *string          `json:"url,omitempty"`
	UniqueName        *string          `json:"uniqueName,omitempty"`
}

IdentityRef describes an Azure Devops identity

func (*IdentityRef) GetDescriptor

func (i *IdentityRef) GetDescriptor() string

GetDescriptor returns the Descriptor field if it's non-nil, zero value otherwise.

func (*IdentityRef) GetDirectoryAlias

func (i *IdentityRef) GetDirectoryAlias() string

GetDirectoryAlias returns the DirectoryAlias field if it's non-nil, zero value otherwise.

func (*IdentityRef) GetDisplayName

func (i *IdentityRef) GetDisplayName() string

GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise.

func (*IdentityRef) GetID

func (i *IdentityRef) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*IdentityRef) GetImageURL

func (i *IdentityRef) GetImageURL() string

GetImageURL returns the ImageURL field if it's non-nil, zero value otherwise.

func (*IdentityRef) GetInactive

func (i *IdentityRef) GetInactive() bool

GetInactive returns the Inactive field if it's non-nil, zero value otherwise.

func (*IdentityRef) GetIsAadIdentity

func (i *IdentityRef) GetIsAadIdentity() bool

GetIsAadIdentity returns the IsAadIdentity field if it's non-nil, zero value otherwise.

func (*IdentityRef) GetIsContainer

func (i *IdentityRef) GetIsContainer() bool

GetIsContainer returns the IsContainer field if it's non-nil, zero value otherwise.

func (*IdentityRef) GetIsDeletedInOrigin

func (i *IdentityRef) GetIsDeletedInOrigin() bool

GetIsDeletedInOrigin returns the IsDeletedInOrigin field if it's non-nil, zero value otherwise.

func (i *IdentityRef) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*IdentityRef) GetProfileURL

func (i *IdentityRef) GetProfileURL() string

GetProfileURL returns the ProfileURL field if it's non-nil, zero value otherwise.

func (*IdentityRef) GetURL

func (i *IdentityRef) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*IdentityRef) GetUniqueName

func (i *IdentityRef) GetUniqueName() string

GetUniqueName returns the UniqueName field if it's non-nil, zero value otherwise.

type IdentityRefWithVote

type IdentityRefWithVote struct {
	IdentityRef
	IsRequired  *bool                  `json:"isRequired,omitempty"`
	ReviewerURL *string                `json:"reviewerUrl,omitempty"`
	Vote        *int                   `json:"vote,omitempty"`
	VotedFor    []*IdentityRefWithVote `json:"votedFor,omitempty"`
}

IdentityRefWithVote Identity information including a vote on a pull request.

func (*IdentityRefWithVote) GetIsRequired

func (i *IdentityRefWithVote) GetIsRequired() bool

GetIsRequired returns the IsRequired field if it's non-nil, zero value otherwise.

func (*IdentityRefWithVote) GetReviewerURL

func (i *IdentityRefWithVote) GetReviewerURL() string

GetReviewerURL returns the ReviewerURL field if it's non-nil, zero value otherwise.

func (*IdentityRefWithVote) GetVote

func (i *IdentityRefWithVote) GetVote() int

GetVote returns the Vote field if it's non-nil, zero value otherwise.

type Item added in v0.12.0

type Item struct {
	ID                  string        `json:"id,omitempty"`
	User                User          `json:"user"`
	AccessLevel         AccessLevel   `json:"accessLevel"`
	LastAccessedDate    string        `json:"lastAccessedDate,omitempty"`
	DateCreated         string        `json:"dateCreated,omitempty"`
	ProjectEntitlements []interface{} `json:"projectEntitlements,omitempty"`
	Extensions          []interface{} `json:"extensions,omitempty"`
	GroupAssignments    []interface{} `json:"groupAssignments,omitempty"`
}

Item is a wrapper class used by UserEntitlements

type ItemContent

type ItemContent struct {
	Content     *string          `json:"content,omitempty"`
	ContentType *ItemContentType `json:"contentType,omitempty"`
}

ItemContent describes an item

func (*ItemContent) GetContent

func (i *ItemContent) GetContent() string

GetContent returns the Content field if it's non-nil, zero value otherwise.

func (*ItemContent) GetContentType

func (i *ItemContent) GetContentType() *ItemContentType

GetContentType returns the ContentType field.

type ItemContentType

type ItemContentType struct {
	Base64Encoded *string `json:"base64Encoded,omitempty"`
	RawText       *string `json:"rawText,omitempty"`
}

ItemContentType describes an item content type

func (*ItemContentType) GetBase64Encoded

func (i *ItemContentType) GetBase64Encoded() string

GetBase64Encoded returns the Base64Encoded field if it's non-nil, zero value otherwise.

func (*ItemContentType) GetRawText

func (i *ItemContentType) GetRawText() string

GetRawText returns the RawText field if it's non-nil, zero value otherwise.

type Iteration

type Iteration struct {
	ID        *string         `json:"id,omitempty"`
	Name      *string         `json:"name,omitempty"`
	Path      *string         `json:"path,omitempty"`
	URL       *string         `json:"url,omitempty"`
	StartDate *string         `json:"startDate,omitempty"`
	EndDate   *string         `json:"finishDate,omitempty"`
	WorkItems [][]interface{} `json:"workItems,omitempty"`
}

Iteration describes an iteration

func (*Iteration) GetEndDate added in v0.7.2

func (i *Iteration) GetEndDate() string

GetEndDate returns the EndDate field if it's non-nil, zero value otherwise.

func (*Iteration) GetID added in v0.7.2

func (i *Iteration) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Iteration) GetName added in v0.7.2

func (i *Iteration) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Iteration) GetPath added in v0.7.2

func (i *Iteration) GetPath() string

GetPath returns the Path field if it's non-nil, zero value otherwise.

func (*Iteration) GetStartDate added in v0.7.2

func (i *Iteration) GetStartDate() string

GetStartDate returns the StartDate field if it's non-nil, zero value otherwise.

func (*Iteration) GetURL added in v0.7.2

func (i *Iteration) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type IterationReason added in v0.10.2

type IterationReason int

IterationReason The reason for which the pull request iteration was created.

const (
	IterationPush IterationReason = iota
	IterationForcePush
	IterationCreate
	IterationRebase
	IterationUnknown
	IterationRetarget
)

IterationReason enum declaration

func (IterationReason) String added in v0.10.2

func (d IterationReason) String() string

type IterationWorkItems

type IterationWorkItems struct {
	Links             *map[string]Link `json:"_links,omitempty"`
	WorkItemRelations []*WorkItemLink  `json:"workItemRelations"`
	URL               *string          `json:"url,omitempty"`
}

IterationWorkItems Represents work items in an iteration backlog

func (i *IterationWorkItems) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*IterationWorkItems) GetURL

func (i *IterationWorkItems) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type IterationsResponse

type IterationsResponse struct {
	Count      int          `json:"count,omitempty"`
	Iterations []*Iteration `json:"value,omitempty"`
}

IterationsResponse describes the iterations response

type IterationsService

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

IterationsService handles communication with the work items methods on the API utilising https://docs.microsoft.com/en-gb/rest/api/vsts/work/iterations

func (*IterationsService) GetByName

func (s *IterationsService) GetByName(ctx context.Context, owner, project, team string, name string) (*Iteration, *http.Response, error)

GetByName will search the iterations for the account and project and return a single iteration if the names match

func (*IterationsService) List

func (s *IterationsService) List(ctx context.Context, owner, project, team string) ([]*Iteration, *http.Response, error)

List returns list of the iterations available to the user utilising https://docs.microsoft.com/en-gb/rest/api/vsts/work/iterations/list

type Link struct {
	Href *string `json:"href,omitempty"`
}

Link A single item in a collection of Links.

func (*Link) GetHref added in v0.6.0

func (l *Link) GetHref() string

GetHref returns the Href field if it's non-nil, zero value otherwise.

type Links struct {
	Self            Avatar `json:"self"`
	Memberships     Avatar `json:"memberships"`
	MembershipState Avatar `json:"membershipState"`
	StorageKey      Avatar `json:"storageKey"`
	Avatar          Avatar `json:"avatar"`
}

Links is a wrapper class used by User

type ListBoardsResponse

type ListBoardsResponse struct {
	Count           *int              `json:"count,omitempty"`
	BoardReferences []*BoardReference `json:"value,omitempty"`
}

ListBoardsResponse describes the boards response

func (*ListBoardsResponse) GetCount

func (l *ListBoardsResponse) GetCount() int

GetCount returns the Count field if it's non-nil, zero value otherwise.

type Message

type Message struct {
	Text     *string `json:"text,omitempty"`
	HTML     *string `json:"html,omitempty"`
	Markdown *string `json:"markdown,omitempty"`
}

Message represents an Azure Devops webhook message property

func (*Message) GetHTML

func (m *Message) GetHTML() string

GetHTML returns the HTML field if it's non-nil, zero value otherwise.

func (*Message) GetMarkdown

func (m *Message) GetMarkdown() string

GetMarkdown returns the Markdown field if it's non-nil, zero value otherwise.

func (*Message) GetText

func (m *Message) GetText() string

GetText returns the Text field if it's non-nil, zero value otherwise.

type PayloadType

type PayloadType int

PayloadType Used to describe the event area

const (
	// PullRequestCommentedEvent Resource field is parsed as a pull
	// request commented event (note this maps to resourceVersion
	// 2.0 of the payload struct, which is incompatible with 1.0
	PullRequestCommentedEvent PayloadType = iota
	// PullRequestEvent Resource field is parsed as a pull request event
	PullRequestEvent
	// PushEvent Git push service event
	PushEvent
	// WorkItemCommentedEvent Resource field is parsed as a work item
	// commented event
	WorkItemCommentedEvent
	// WorkItemUpdatedEvent Resource field is parsed as a work item
	// updated event
	WorkItemUpdatedEvent
)

type PolicyConfiguration added in v0.11.1

type PolicyConfiguration struct {
	Links       interface{}    `json:"_links,omitempty"`
	CreatedBy   *IdentityRef   `json:"createdBy,omitempty"`
	CreatedDate *string        `json:"createdDate,omitempty"`
	ID          *int           `json:"id,omitempty"`
	IsBlocking  *bool          `json:"isBlocking,omitempty"`
	IsDeleted   *bool          `json:"isDeleted,omitempty"`
	IsEnabled   *bool          `json:"isEnabled,omitempty"`
	Revision    *int           `json:"revision,omitempty"`
	Settings    interface{}    `json:"settings,omitempty"`
	Type        *PolicyTypeRef `json:"type,omitempty"`
	Url         *string        `json:"url,omitempty"`
}

PolicyConfiguration is the full policy configuration with settings.

func (*PolicyConfiguration) GetCreatedBy added in v0.12.0

func (p *PolicyConfiguration) GetCreatedBy() *IdentityRef

GetCreatedBy returns the CreatedBy field.

func (*PolicyConfiguration) GetCreatedDate added in v0.12.0

func (p *PolicyConfiguration) GetCreatedDate() string

GetCreatedDate returns the CreatedDate field if it's non-nil, zero value otherwise.

func (*PolicyConfiguration) GetID added in v0.12.0

func (p *PolicyConfiguration) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*PolicyConfiguration) GetIsBlocking added in v0.12.0

func (p *PolicyConfiguration) GetIsBlocking() bool

GetIsBlocking returns the IsBlocking field if it's non-nil, zero value otherwise.

func (*PolicyConfiguration) GetIsDeleted added in v0.12.0

func (p *PolicyConfiguration) GetIsDeleted() bool

GetIsDeleted returns the IsDeleted field if it's non-nil, zero value otherwise.

func (*PolicyConfiguration) GetIsEnabled added in v0.12.0

func (p *PolicyConfiguration) GetIsEnabled() bool

GetIsEnabled returns the IsEnabled field if it's non-nil, zero value otherwise.

func (*PolicyConfiguration) GetRevision added in v0.12.0

func (p *PolicyConfiguration) GetRevision() int

GetRevision returns the Revision field if it's non-nil, zero value otherwise.

func (*PolicyConfiguration) GetType added in v0.12.0

func (p *PolicyConfiguration) GetType() *PolicyTypeRef

GetType returns the Type field.

func (*PolicyConfiguration) GetUrl added in v0.12.0

func (p *PolicyConfiguration) GetUrl() string

GetUrl returns the Url field if it's non-nil, zero value otherwise.

type PolicyEvaluationRecord added in v0.11.1

type PolicyEvaluationRecord struct {
	Links         *map[string]Link     `json:"_links,omitempty"`
	ArtifactID    *string              `json:"artifactId,omitempty"`
	CompletedDate *string              `json:"completedDate,omitempty"`
	Configuration *PolicyConfiguration `json:"configuration,omitempty"`
	Context       interface{}          `json:"context,omitempty"`
	EvaluationID  *string              `json:"evaluationId,omitempty"`
	StartedDate   *string              `json:"startedDate,omitempty"`
	Status        *string              `json:"status,omitempty"`
}

PolicyEvaluationRecord encapsulates the current state of a policy as it applies to one specific pull request.

func (*PolicyEvaluationRecord) GetArtifactID added in v0.12.0

func (p *PolicyEvaluationRecord) GetArtifactID() string

GetArtifactID returns the ArtifactID field if it's non-nil, zero value otherwise.

func (*PolicyEvaluationRecord) GetCompletedDate added in v0.12.0

func (p *PolicyEvaluationRecord) GetCompletedDate() string

GetCompletedDate returns the CompletedDate field if it's non-nil, zero value otherwise.

func (*PolicyEvaluationRecord) GetConfiguration added in v0.12.0

func (p *PolicyEvaluationRecord) GetConfiguration() *PolicyConfiguration

GetConfiguration returns the Configuration field.

func (*PolicyEvaluationRecord) GetEvaluationID added in v0.12.0

func (p *PolicyEvaluationRecord) GetEvaluationID() string

GetEvaluationID returns the EvaluationID field if it's non-nil, zero value otherwise.

func (p *PolicyEvaluationRecord) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*PolicyEvaluationRecord) GetStartedDate added in v0.12.0

func (p *PolicyEvaluationRecord) GetStartedDate() string

GetStartedDate returns the StartedDate field if it's non-nil, zero value otherwise.

func (*PolicyEvaluationRecord) GetStatus added in v0.12.0

func (p *PolicyEvaluationRecord) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

type PolicyEvaluationsListOptions added in v0.11.1

type PolicyEvaluationsListOptions struct{}

PolicyEvaluationsListOptions describes what the request to the API should look like

type PolicyEvaluationsListResponse added in v0.11.1

type PolicyEvaluationsListResponse struct {
	Count             int                       `json:"count"`
	PolicyEvaluations []*PolicyEvaluationRecord `json:"value"`
}

PolicyEvaluationsListResponse describes a pull requests list response

type PolicyEvaluationsService added in v0.11.1

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

PolicyEvaluationsService handles communication with the evaluations methods on the API utilising https://docs.microsoft.com/en-us/rest/api/azure/devops/policy/evaluations

func (*PolicyEvaluationsService) GetPullRequestArtifactID added in v0.11.1

func (s *PolicyEvaluationsService) GetPullRequestArtifactID(projectID string, pullRequestID int) string

GetPullRequestArtifactID gets the Artifact ID of a pull request. ex: vstfs:///CodeReview/CodeReviewId/{projectId}/{pullRequestId}

func (*PolicyEvaluationsService) List added in v0.11.1

List retrieves a list of all the policy evaluation statuses for a specific pull request. https://docs.microsoft.com/en-us/rest/api/azure/devops/policy/evaluations/list?view=azure-devops-rest-5.1

type PolicyTypeRef added in v0.11.1

type PolicyTypeRef struct {
	DisplayName *string `json:"displayName,omitempty"`
	ID          *string `json:"id,omitempty"`
	Url         *string `json:"url,omitempty"`
}

PolicyTypeRef is the policy type reference.

func (*PolicyTypeRef) GetDisplayName added in v0.12.0

func (p *PolicyTypeRef) GetDisplayName() string

GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise.

func (*PolicyTypeRef) GetID added in v0.12.0

func (p *PolicyTypeRef) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*PolicyTypeRef) GetUrl added in v0.12.0

func (p *PolicyTypeRef) GetUrl() string

GetUrl returns the Url field if it's non-nil, zero value otherwise.

type Project

type Project struct {
	ID             *string `json:"id,omitempty"`
	Name           *string `json:"name,omitempty"`
	Description    *string `json:"description,omitempty"`
	URL            *string `json:"url,omitempty"`
	State          *string `json:"state,omitempty"`
	Revision       *int    `json:"revision,omitempty"`
	Visibility     *string `json:"visibility,omitempty"`
	LastUpdateTime *Time   `json:"lastUpdateTime,omitempty"`
}

Project Describes a project

func (*Project) GetDescription

func (p *Project) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*Project) GetID

func (p *Project) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Project) GetLastUpdateTime

func (p *Project) GetLastUpdateTime() *Time

GetLastUpdateTime returns the LastUpdateTime field.

func (*Project) GetName

func (p *Project) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Project) GetRevision

func (p *Project) GetRevision() int

GetRevision returns the Revision field if it's non-nil, zero value otherwise.

func (*Project) GetState

func (p *Project) GetState() string

GetState returns the State field if it's non-nil, zero value otherwise.

func (*Project) GetURL

func (p *Project) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*Project) GetVisibility

func (p *Project) GetVisibility() string

GetVisibility returns the Visibility field if it's non-nil, zero value otherwise.

type PullRequestAsyncStatus

type PullRequestAsyncStatus int

PullRequestAsyncStatus The current status of a pull request merge.

const (
	MergeNotSet PullRequestAsyncStatus = iota
	MergeQueued
	MergeConflicts
	MergeSucceeded
	MergeRejectedByPolicy
	MergeFailure
)

PullRequestAsyncStatus enum values

func (PullRequestAsyncStatus) String

func (d PullRequestAsyncStatus) String() string

type PullRequestGetOptions added in v0.7.1

type PullRequestGetOptions struct {
	IncludeCommits      bool   `url:"includeCommits,omitempty"`
	IncludeWorkItemRefs bool   `url:"includeWorkItemRefs,omitempty"`
	Project             string `url:"project,omitempty"`
	Organization        string `url:"organization,omitempty"`
	RepositoryID        string `url:"repositoryId,omitempty"`
	// maxCommentLength Not used.
	MaxCommentLength int `url:"maxCommentLength,omitempty"`
	PullRequestID    int `url:"pullRequestId,omitempty"`
	// $skip Not used.
	Skip int `url:"$skip,omitempty"`
	// $top Not used.
	Top int `url:"$top,omitempty"`
}

PullRequestGetOptions describes what the request to the API should look like

type PullRequestIterationsListOptions added in v0.10.2

type PullRequestIterationsListOptions struct {
	IncludeCommits bool `url:"includeCommits,omitempty"`
}

PullRequestIterationsListOptions describes what the request to the API should look like

type PullRequestListOptions

type PullRequestListOptions struct {
	CreatorID          string `url:"searchCriteria.creatorId,omitempty"`
	IncludeLinks       string `url:"searchCriteria.includeLinks,omitempty"`
	Project            string `url:"project,omitempty"`
	RepositoryID       string `url:"searchCriteria.repositoryId,omitempty"`
	ReviewerID         string `url:"searchCriteria.reviewerId,omitempty"`
	Skip               string `url:"$skip,omitempty"`
	SourceRefName      string `url:"searchCriteria.sourceRefName,omitempty"`
	SourceRepositoryID string `url:"searchCriteria.sourceRepositoryId,omitempty"`
	Status             string `url:"searchCriteria.status,omitempty"`
	TargetRefName      string `url:"searchCriteria.targetRefName,omitempty"`
	Top                string `url:"$top,omitempty"`
}

PullRequestListOptions describes what the request to the API should look like

type PullRequestMergeFailureType

type PullRequestMergeFailureType int

PullRequestMergeFailureType The specific type of merge request failure

const (
	NoFailure PullRequestMergeFailureType = iota
	UnknownFailure
	CaseSensitive
	ObjectTooLarge
)

PullRequestMergeFailureType enum values

func (PullRequestMergeFailureType) String

type PullRequestStatus

type PullRequestStatus int

PullRequestStatus The current status of a pull request merge.

const (
	PullAbandoned PullRequestStatus = iota
	PullActive
	PullIncludeAll
	PullCompleted
	PullNotSet
)

PullRequestStatus enum values

func (PullRequestStatus) String

func (d PullRequestStatus) String() string

type PullRequestsCommitsResponse

type PullRequestsCommitsResponse struct {
	Count         int             `json:"count"`
	GitCommitRefs []*GitCommitRef `json:"value"`
}

PullRequestsCommitsResponse describes a pull requests commits response

type PullRequestsIterationsListResponse added in v0.10.2

type PullRequestsIterationsListResponse struct {
	Count                    int                        `json:"count"`
	GitPullRequestIterations []*GitPullRequestIteration `json:"value"`
}

PullRequestsIterationsListResponse describes a pull requests list response

type PullRequestsListCommitsResponse added in v0.6.5

type PullRequestsListCommitsResponse struct {
	Count         int             `json:"count"`
	GitCommitRefs []*GitCommitRef `json:"value"`
}

PullRequestsListCommitsResponse describes a pull requests list commits response

type PullRequestsListResponse

type PullRequestsListResponse struct {
	Count           int               `json:"count"`
	GitPullRequests []*GitPullRequest `json:"value"`
}

PullRequestsListResponse describes a pull requests list response

type PullRequestsService

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

PullRequestsService handles communication with the pull requests methods on the API utilising https://docs.microsoft.com/en-us/rest/api/vsts/git/pull%20requests

func (*PullRequestsService) Create added in v0.6.5

func (s *PullRequestsService) Create(ctx context.Context, owner, project string, repoName string, pull *GitPullRequest) (*GitPullRequest, *http.Response, error)

Create Creates a pull request Required fields in the GitPullRequest{} are: * Title * Description * SourceRefName * TargetRefName

SourceRefName can be either the full ref name "refs/heads/branchname" or just "branchname". The latter will be converted before submission. https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20requests/create?view=azure-devops-rest-5.1

func (*PullRequestsService) CreateComment added in v0.8.4

func (s *PullRequestsService) CreateComment(ctx context.Context, owner, project, repo string, pullNum int, threadId int, comment *Comment) (*Comment, *http.Response, error)

CreateComment adds a comment to a pull request thread. Azure Devops API docs: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20request%20thread%20comments/create

func (*PullRequestsService) CreateComments added in v0.8.4

func (s *PullRequestsService) CreateComments(ctx context.Context, owner, project, repo string, pullNum int, body *GitPullRequestCommentThread) (*GitPullRequestCommentThread, *http.Response, error)

CreateComments adds one or more comments to a new or existing thread and may include additional context Azure Devops API docs: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20request%20threads/create

func (*PullRequestsService) CreateStatus added in v0.10.2

func (s *PullRequestsService) CreateStatus(ctx context.Context, owner, project, repo string, pullNum int, status *GitPullRequestStatus) (*GitPullRequestStatus, *http.Response, error)

CreateStatus Create a pull request status. Azure Devops API docs: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20request%20statuses/create

func (*PullRequestsService) Get

func (s *PullRequestsService) Get(ctx context.Context, owner, project string, pullNum int, opts *PullRequestListOptions) (*GitPullRequest, *http.Response, error)

Get returns a single pull request utilising https://docs.microsoft.com/en-us/rest/api/vsts/git/pull%20requests/get%20pull%20requests%20by%20project

func (*PullRequestsService) GetIteration added in v0.10.2

func (s *PullRequestsService) GetIteration(ctx context.Context, owner, project, repo string, pullNum int, iterationID int) (*GitPullRequestIteration, *http.Response, error)

GetIteration Gets a single pull request iteration. Azure Devops API docs: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20request%20iterations/get?view=azure-devops-rest-5.1

func (*PullRequestsService) GetWithRepo added in v0.7.1

func (s *PullRequestsService) GetWithRepo(ctx context.Context, owner, project, repo string, pullNum int, opts *PullRequestGetOptions) (*GitPullRequest, *http.Response, error)

GetWithRepo returns a single pull request with additional information https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20requests/get%20pull%20request?view=azure-devops-rest-5.1

func (*PullRequestsService) List

List returns list of pull requests in the specified Team Project with optional filters https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20requests/get%20pull%20requests%20by%20project

func (*PullRequestsService) ListCommits

func (s *PullRequestsService) ListCommits(ctx context.Context, owner, project, repo string, pullNum int) ([]*GitCommitRef, *http.Response, error)

ListCommits lists the commits in a pull request. Azure Devops API docs: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20request%20commits/get%20pull%20request%20commits

func (*PullRequestsService) ListIterations added in v0.10.2

func (s *PullRequestsService) ListIterations(ctx context.Context, owner, project, repo string, pullNum int, opts *PullRequestIterationsListOptions) ([]*GitPullRequestIteration, *http.Response, error)

ListIterations Lists all iterations on a pull request. Azure Devops API docs: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20request%20iterations/list?view=azure-devops-rest-5.1

func (*PullRequestsService) Merge

func (s *PullRequestsService) Merge(ctx context.Context, owner, project string, repoName string, pullNum int, pull *GitPullRequest, completionOpts GitPullRequestCompletionOptions, id IdentityRef) (*GitPullRequest, *http.Response, error)

Merge Completes a pull request pull may be nil https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20requests/update?view=azure-devops-rest-5.1

type QueueBuildOptions

type QueueBuildOptions struct {
	IgnoreWarnings bool   `url:"ignoreWarnings,omitempty"`
	CheckInTicket  string `url:"checkInTicket,omitempty"`
}

QueueBuildOptions describes what the request to the API should look like

type ResourceContainers

type ResourceContainers struct {
	Collection *ResourceRef `json:"text,omitempty"`
	Account    *ResourceRef `json:"html,omitempty"`
	Project    *ResourceRef `json:"markdown,omitempty"`
}

ResourceContainers provides information related to the Resources in a payload

func (*ResourceContainers) GetAccount

func (r *ResourceContainers) GetAccount() *ResourceRef

GetAccount returns the Account field.

func (*ResourceContainers) GetCollection

func (r *ResourceContainers) GetCollection() *ResourceRef

GetCollection returns the Collection field.

func (*ResourceContainers) GetProject

func (r *ResourceContainers) GetProject() *ResourceRef

GetProject returns the Project field.

type ResourceRef

type ResourceRef struct {
	ID      *string `json:"id,omitempty"`
	BaseURL *string `json:"baseUrl,omitempty"`
	URL     *string `json:"url,omitempty"`
}

ResourceRef Describes properties to identify a resource

func (*ResourceRef) GetBaseURL

func (r *ResourceRef) GetBaseURL() string

GetBaseURL returns the BaseURL field if it's non-nil, zero value otherwise.

func (*ResourceRef) GetID

func (r *ResourceRef) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*ResourceRef) GetURL

func (r *ResourceRef) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type TaskAgentPoolReference added in v0.6.0

type TaskAgentPoolReference struct {
	ID       *int    `json:"id,omitempty"`
	IsHosted *bool   `json:"is_hosted,omitempty"`
	Name     *string `json:"name,omitempty"`
}

TaskAgentPoolReference Represents a reference to an agent pool.

func (*TaskAgentPoolReference) GetID added in v0.6.0

func (t *TaskAgentPoolReference) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*TaskAgentPoolReference) GetIsHosted added in v0.6.0

func (t *TaskAgentPoolReference) GetIsHosted() bool

GetIsHosted returns the IsHosted field if it's non-nil, zero value otherwise.

func (*TaskAgentPoolReference) GetName added in v0.6.0

func (t *TaskAgentPoolReference) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

type TaskOrchestrationPlanReference added in v0.6.0

type TaskOrchestrationPlanReference struct {
	Type   *int    `json:"orchestrationType,omitempty"`
	PlanID *string `json:"planId,omitempty"`
}

TaskOrchestrationPlanReference The orchestration plan for the build.

func (*TaskOrchestrationPlanReference) GetPlanID added in v0.6.0

func (t *TaskOrchestrationPlanReference) GetPlanID() string

GetPlanID returns the PlanID field if it's non-nil, zero value otherwise.

func (*TaskOrchestrationPlanReference) GetType added in v0.6.0

func (t *TaskOrchestrationPlanReference) GetType() int

GetType returns the Type field if it's non-nil, zero value otherwise.

type Team

type Team struct {
	ID          *string `url:"id,omitempty"`
	Name        *string `url:"name,omitempty"`
	URL         *string `url:"url,omitempty"`
	Description *string `url:"description,omitempty"`
}

Team describes what a team looks like

func (*Team) GetDescription added in v0.6.0

func (t *Team) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*Team) GetID added in v0.6.0

func (t *Team) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Team) GetName added in v0.6.0

func (t *Team) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Team) GetURL added in v0.6.0

func (t *Team) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type TeamProjectCollectionReference

type TeamProjectCollectionReference struct {
	ID   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	URL  *string `json:"url,omitempty"`
}

TeamProjectCollectionReference Reference object for a TeamProjectCollection.

func (*TeamProjectCollectionReference) GetID

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*TeamProjectCollectionReference) GetName

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*TeamProjectCollectionReference) GetURL

GetURL returns the URL field if it's non-nil, zero value otherwise.

type TeamProjectReference

type TeamProjectReference struct {
	Abbreviation        *string `json:"abbreviation,omitempty"`
	DefaultTeamImageURL *string `json:"defaultTeamImageUrl,omitempty"`
	Description         *string `json:"description,omitempty"`
	ID                  *string `json:"id,omitempty"`
	Name                *string `json:"name,omitempty"`
	Revision            *int    `json:"revision,omitempty"`
	State               *string `json:"state,omitempty"`
	URL                 *string `json:"url,omitempty"`
	Visibility          *string `json:"visibility,omitempty"`
	LastUpdateTime      *Time   `json:"lastUpdateTime,omitempty"`
}

TeamProjectReference Represents a shallow reference to a TeamProject.

func (*TeamProjectReference) GetAbbreviation

func (t *TeamProjectReference) GetAbbreviation() string

GetAbbreviation returns the Abbreviation field if it's non-nil, zero value otherwise.

func (*TeamProjectReference) GetDefaultTeamImageURL

func (t *TeamProjectReference) GetDefaultTeamImageURL() string

GetDefaultTeamImageURL returns the DefaultTeamImageURL field if it's non-nil, zero value otherwise.

func (*TeamProjectReference) GetDescription

func (t *TeamProjectReference) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*TeamProjectReference) GetID

func (t *TeamProjectReference) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*TeamProjectReference) GetLastUpdateTime added in v0.8.4

func (t *TeamProjectReference) GetLastUpdateTime() *Time

GetLastUpdateTime returns the LastUpdateTime field.

func (*TeamProjectReference) GetName

func (t *TeamProjectReference) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*TeamProjectReference) GetRevision

func (t *TeamProjectReference) GetRevision() int

GetRevision returns the Revision field if it's non-nil, zero value otherwise.

func (*TeamProjectReference) GetState

func (t *TeamProjectReference) GetState() string

GetState returns the State field if it's non-nil, zero value otherwise.

func (*TeamProjectReference) GetURL

func (t *TeamProjectReference) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*TeamProjectReference) GetVisibility

func (t *TeamProjectReference) GetVisibility() string

GetVisibility returns the Visibility field if it's non-nil, zero value otherwise.

type TeamsListOptions

type TeamsListOptions struct {
	Mine *bool `url:"$mine,omitempty"`
	Top  *int  `url:"$top,omitempty"`
	Skip *int  `url:"$skip,omitempty"`
}

TeamsListOptions describes what the request to the API should look like

func (*TeamsListOptions) GetMine added in v0.6.0

func (t *TeamsListOptions) GetMine() bool

GetMine returns the Mine field if it's non-nil, zero value otherwise.

func (*TeamsListOptions) GetSkip added in v0.6.0

func (t *TeamsListOptions) GetSkip() int

GetSkip returns the Skip field if it's non-nil, zero value otherwise.

func (*TeamsListOptions) GetTop added in v0.6.0

func (t *TeamsListOptions) GetTop() int

GetTop returns the Top field if it's non-nil, zero value otherwise.

type TeamsListResponse

type TeamsListResponse struct {
	Count int     `json:"count,omitempty"`
	Teams []*Team `json:"value,omitempty"`
}

TeamsListResponse Requests that may return multiple entities use this format

type TeamsService

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

TeamsService handles communication with the teams methods on the API utilising https://docs.microsoft.com/en-us/rest/api/vsts/core/teams/get%20all%20teams

type Test

type Test struct {
	ID          *int    `json:"id,omitempty"`
	Name        *string `json:"name,omitempty"`
	URL         *string `json:"url,omitempty"`
	IsAutomated *bool   `json:"isAutomated,omitempty"`
	Iteration   *string `json:"iteration,omitempty"`
	Owner       *struct {
		ID          string `json:"id,omitempty"`
		DisplayName string `json:"displayName,omitempty"`
	} `json:"owner,omitempty"`
	StartedDate   *string `json:"startedDate,omitempty"`
	CompletedDate *string `json:"completedDate,omitempty"`
	State         *string `json:"state,omitempty"`
	Plan          *struct {
		ID string `json:"id,omitempty"`
	} `json:"plan,omitempty"`
	Revision *int `json:"revision,omitempty"`
}

Test represents a test

func (*Test) GetCompletedDate added in v0.6.0

func (t *Test) GetCompletedDate() string

GetCompletedDate returns the CompletedDate field if it's non-nil, zero value otherwise.

func (*Test) GetID added in v0.6.0

func (t *Test) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Test) GetIsAutomated added in v0.6.0

func (t *Test) GetIsAutomated() bool

GetIsAutomated returns the IsAutomated field if it's non-nil, zero value otherwise.

func (*Test) GetIteration added in v0.6.0

func (t *Test) GetIteration() string

GetIteration returns the Iteration field if it's non-nil, zero value otherwise.

func (*Test) GetName added in v0.6.0

func (t *Test) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Test) GetRevision added in v0.6.0

func (t *Test) GetRevision() int

GetRevision returns the Revision field if it's non-nil, zero value otherwise.

func (*Test) GetStartedDate added in v0.6.0

func (t *Test) GetStartedDate() string

GetStartedDate returns the StartedDate field if it's non-nil, zero value otherwise.

func (*Test) GetState added in v0.6.0

func (t *Test) GetState() string

GetState returns the State field if it's non-nil, zero value otherwise.

func (*Test) GetURL added in v0.6.0

func (t *Test) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type TestListResponse

type TestListResponse struct {
	Count int     `json:"count,omitempty"`
	Tests []*Test `json:"value,omitempty"`
}

TestListResponse is the wrapper around the main response for the List of Tests

type TestResult

type TestResult struct {
	ID      int `json:"id"`
	Project struct {
		ID   string `json:"id"`
		Name string `json:"name"`
		URL  string `json:"url"`
	} `json:"project"`
	StartedDate   Time    `json:"startedDate"`
	CompletedDate Time    `json:"completedDate"`
	DurationInMs  float64 `json:"durationInMs"`
	Outcome       string  `json:"outcome"`
	Revision      int     `json:"revision"`
	RunBy         struct {
		ID          string `json:"id"`
		DisplayName string `json:"displayName"`
		UniqueName  string `json:"uniqueName"`
		URL         string `json:"url"`
		ImageURL    string `json:"imageUrl"`
	} `json:"runBy"`
	State    string `json:"state"`
	TestCase struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"testCase"`
	TestRun struct {
		ID   string `json:"id"`
		Name string `json:"name"`
		URL  string `json:"url"`
	} `json:"testRun"`
	LastUpdatedDate Time `json:"lastUpdatedDate"`
	LastUpdatedBy   struct {
		ID          string `json:"id"`
		DisplayName string `json:"displayName"`
		UniqueName  string `json:"uniqueName"`
		URL         string `json:"url"`
		ImageURL    string `json:"imageUrl"`
	} `json:"lastUpdatedBy"`
	Priority     int    `json:"priority"`
	ComputerName string `json:"computerName"`
	Build        struct {
		ID   string `json:"id"`
		Name string `json:"name"`
		URL  string `json:"url"`
	} `json:"build"`
	CreatedDate          Time   `json:"createdDate"`
	URL                  string `json:"url"`
	FailureType          string `json:"failureType"`
	AutomatedTestStorage string `json:"automatedTestStorage"`
	AutomatedTestType    string `json:"automatedTestType"`
	AutomatedTestTypeID  string `json:"automatedTestTypeId"`
	AutomatedTestID      string `json:"automatedTestId"`
	Area                 struct {
		ID   string `json:"id"`
		Name string `json:"name"`
		URL  string `json:"url"`
	} `json:"area"`
	TestCaseTitle     string        `json:"testCaseTitle"`
	CustomFields      []interface{} `json:"customFields"`
	AutomatedTestName string        `json:"automatedTestName"`
	StackTrace        string        `json:"stackTrace"`
}

TestResult represents a test result

type TestResultsListOptions

type TestResultsListOptions struct {
	Count int    `url:"$top,omitempty"`
	RunID string `url:"runId,omitempty"`
}

TestResultsListOptions describes what the request to the API should look like

type TestResultsListResponse

type TestResultsListResponse struct {
	Results []TestResult `json:"value"`
}

TestResultsListResponse is the wrapper around the main response for the List of Tests

type TestsListOptions

type TestsListOptions struct {
	Count    *int    `url:"$top,omitempty"`
	BuildURI *string `url:"buildUri,omitempty"`
}

TestsListOptions describes what the request to the API should look like

func (*TestsListOptions) GetBuildURI added in v0.6.0

func (t *TestsListOptions) GetBuildURI() string

GetBuildURI returns the BuildURI field if it's non-nil, zero value otherwise.

func (*TestsListOptions) GetCount added in v0.6.0

func (t *TestsListOptions) GetCount() int

GetCount returns the Count field if it's non-nil, zero value otherwise.

type TestsService

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

TestsService handles communication with the Tests methods on the API utilising https://docs.microsoft.com/en-gb/rest/api/vsts/test

func (*TestsService) List

func (s *TestsService) List(ctx context.Context, owner, project string, opts *TestsListOptions) ([]*Test, *http.Response, error)

List returns list of the tests utilising https://docs.microsoft.com/en-gb/rest/api/vsts/test/runs/list

func (*TestsService) ResultsList

func (s *TestsService) ResultsList(ctx context.Context, owner, project string, opts *TestResultsListOptions) ([]TestResult, error)

ResultsList returns list of the test results utilising https://docs.microsoft.com/en-gb/rest/api/vsts/test/runs/list

type Time added in v0.10.2

type Time struct {
	Time time.Time
}

func (Time) Equal added in v0.10.2

func (t Time) Equal(u Time) bool

func (*Time) MarshalJSON added in v0.10.2

func (t *Time) MarshalJSON() ([]byte, error)

func (Time) String added in v0.10.2

func (t Time) String() string

func (*Time) UnmarshalJSON added in v0.10.2

func (t *Time) UnmarshalJSON(b []byte) error

type TriggerInfo added in v0.6.0

type TriggerInfo struct {
	CiSourceBranch *string `json:"ci.sourceBranch,omitempty"`
	CiSourceSha    *string `json:"ci.sourceSha,omitempty"`
	CiMessage      *string `json:"ci.message,omitempty"`
}

TriggerInfo Source provider-specific information about what triggered the build.

func (*TriggerInfo) GetCiMessage added in v0.6.0

func (t *TriggerInfo) GetCiMessage() string

GetCiMessage returns the CiMessage field if it's non-nil, zero value otherwise.

func (*TriggerInfo) GetCiSourceBranch added in v0.6.0

func (t *TriggerInfo) GetCiSourceBranch() string

GetCiSourceBranch returns the CiSourceBranch field if it's non-nil, zero value otherwise.

func (*TriggerInfo) GetCiSourceSha added in v0.6.0

func (t *TriggerInfo) GetCiSourceSha() string

GetCiSourceSha returns the CiSourceSha field if it's non-nil, zero value otherwise.

type UpdateRefsBody added in v0.6.5

type UpdateRefsBody struct {
	IsLocked     *bool   `json:"isLocked,omitempty"`
	Name         *string `json:"name,omitempty"`
	NewObjectID  *string `json:"newObjectId,omitempty"`
	OldObjectID  *string `json:"oldObjectId,omitempty"`
	RepositoryID *string `json:"repositoryId,omitempty"`
}

UpdateRefsBody Request body for UpdateRefs()

func (*UpdateRefsBody) GetIsLocked added in v0.6.5

func (u *UpdateRefsBody) GetIsLocked() bool

GetIsLocked returns the IsLocked field if it's non-nil, zero value otherwise.

func (*UpdateRefsBody) GetName added in v0.6.5

func (u *UpdateRefsBody) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*UpdateRefsBody) GetNewObjectID added in v0.6.5

func (u *UpdateRefsBody) GetNewObjectID() string

GetNewObjectID returns the NewObjectID field if it's non-nil, zero value otherwise.

func (*UpdateRefsBody) GetOldObjectID added in v0.6.5

func (u *UpdateRefsBody) GetOldObjectID() string

GetOldObjectID returns the OldObjectID field if it's non-nil, zero value otherwise.

func (*UpdateRefsBody) GetRepositoryID added in v0.6.5

func (u *UpdateRefsBody) GetRepositoryID() string

GetRepositoryID returns the RepositoryID field if it's non-nil, zero value otherwise.

type User added in v0.12.0

type User struct {
	SubjectKind   string  `json:"subjectKind,omitempty"`
	MetaType      *string `json:"metaType,omitempty"`
	Domain        string  `json:"domain,omitempty"`
	PrincipalName string  `json:"principalName,omitempty"`
	MailAddress   string  `json:"mailAddress,omitempty"`
	Origin        string  `json:"origin,omitempty"`
	OriginID      string  `json:"originId,omitempty"`
	DisplayName   string  `json:"displayName,omitempty"`
	Links         Links   `json:"_links,omitempty"`
	URL           string  `json:"url,omitempty"`
	Descriptor    string  `json:"descriptor,omitempty"`
}

User is a wrapper class used by Item

type UserEntitlements added in v0.12.0

type UserEntitlements struct {
	Members           []Item      `json:"members,omitempty"`
	ContinuationToken interface{} `json:"continuationToken"`
	TotalCount        int64       `json:"totalCount,omitempty"`
	Items             []Item      `json:"items,omitempty"`
}

UserEntitlements is a wrapper class around the main response for the Get of UserEntitlement

type UserEntitlementsService added in v0.12.0

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

UserEntitlementsService handles communication with the user entitlements methods on the API utilising https://docs.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/user%20entitlements?view=azure-devops-rest-6.0

func (*UserEntitlementsService) Get added in v0.12.0

Get returns a single user entitlement filtering by the user name in the organization https://docs.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/user%20entitlements/search%20user%20entitlements?view=azure-devops-rest-6.0

func (*UserEntitlementsService) GetUserID added in v0.12.0

func (s *UserEntitlementsService) GetUserID(ctx context.Context, userName string, orgName string) (*string, error)

GetUserID returns the user id by the user name and the organizatino name

type UsersService added in v0.7.2

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

UsersService handles communication with the Graph.Users methods on the API utilising https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/users/get

func (*UsersService) Get added in v0.7.2

func (s *UsersService) Get(ctx context.Context, owner, descriptor string) (*GraphUser, *http.Response, error)

Get returns information about a single user in an org https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/users/get

func (*UsersService) GetDescriptors added in v0.7.2

func (s *UsersService) GetDescriptors(ctx context.Context, owner, storageKey string) (*GraphDescriptorResult, *http.Response, error)

GetDescriptors returns descriptors for one or more users based on filter criteria https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/descriptors/get?view=azure-devops-rest-5.1

func (*UsersService) List added in v0.7.2

func (s *UsersService) List(ctx context.Context, owner string) ([]*GraphUser, *http.Response, error)

List returns a list of users in an org utilising https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/users/list

type ValidationResult added in v0.6.0

type ValidationResult struct {
	Message *string `json:"message,omitempty"`
	Result  *string `json:"result,omitempty"`
}

ValidationResult Represents the result of validating a build request.

func (*ValidationResult) GetMessage added in v0.6.0

func (v *ValidationResult) GetMessage() string

GetMessage returns the Message field if it's non-nil, zero value otherwise.

func (*ValidationResult) GetResult added in v0.6.0

func (v *ValidationResult) GetResult() string

GetResult returns the Result field if it's non-nil, zero value otherwise.

type VersionControlChangeType

type VersionControlChangeType int

VersionControlChangeType enum declaration

const (
	None VersionControlChangeType = iota
	Add
	Edit
	Encoding
	Rename
	Delete
	Undelete
	Branch
	Merge
	Lock
	Rollback
	SourceRename
	TargetRename
	Property
	All
)

VersionControlChangeType valid enum values

func (VersionControlChangeType) String

func (d VersionControlChangeType) String() string

type WebAPITagDefinition

type WebAPITagDefinition struct {
	Active *bool   `json:"active,omitempty"`
	ID     *string `json:"id,omitempty"`
	Name   *string `json:"name,omitempty"`
	URL    *string `json:"url,omitempty"`
}

WebAPITagDefinition The representation of a tag definition which is sent across the wire.

func (*WebAPITagDefinition) GetActive

func (w *WebAPITagDefinition) GetActive() bool

GetActive returns the Active field if it's non-nil, zero value otherwise.

func (*WebAPITagDefinition) GetID

func (w *WebAPITagDefinition) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*WebAPITagDefinition) GetName

func (w *WebAPITagDefinition) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*WebAPITagDefinition) GetURL

func (w *WebAPITagDefinition) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type WorkItem

type WorkItem struct {
	Links             *map[string]Link        `json:"_links,omitempty"`
	CommentVersionRef *CommentVersionRef      `json:"commentVersionRef,omitempty"`
	Fields            *map[string]interface{} `json:"fields,omitempty"`
	ID                *int                    `json:"id,omitempty"`
	Relations         []*WorkItemRelation     `json:"relations,omitempty"`
	Rev               *int                    `json:"rev,omitempty"`
	URL               *string                 `json:"url,omitempty"`
}

WorkItem describes an individual work item in TFS

func (*WorkItem) GetCommentVersionRef

func (w *WorkItem) GetCommentVersionRef() *CommentVersionRef

GetCommentVersionRef returns the CommentVersionRef field.

func (*WorkItem) GetID

func (w *WorkItem) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (w *WorkItem) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*WorkItem) GetRev

func (w *WorkItem) GetRev() int

GetRev returns the Rev field if it's non-nil, zero value otherwise.

func (*WorkItem) GetURL

func (w *WorkItem) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type WorkItemComment added in v0.6.0

type WorkItemComment struct {
	CreatedBy    *IdentityRef `json:"createdBy,omitempty"`
	CreatedDate  *Time        `json:"createdDate,omitempty"`
	ID           *int         `json:"id,omitempty"`
	ModifiedBy   *IdentityRef `json:"modifiedBy,omitempty"`
	ModifiedDate *Time        `json:"modifiedDate,omitempty"`
	Text         *string      `json:"text,omitempty"`
	URL          *string      `json:"url,omitempty"`
	Version      *int         `json:"version,omitempty"`
	WorkItemID   *int         `json:"workItemId,omitempty"`
}

WorkItemComment Describes a response to CreateComment

func (*WorkItemComment) GetCreatedBy added in v0.6.0

func (w *WorkItemComment) GetCreatedBy() *IdentityRef

GetCreatedBy returns the CreatedBy field.

func (*WorkItemComment) GetCreatedDate added in v0.6.0

func (w *WorkItemComment) GetCreatedDate() *Time

GetCreatedDate returns the CreatedDate field.

func (*WorkItemComment) GetID added in v0.6.0

func (w *WorkItemComment) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*WorkItemComment) GetModifiedBy added in v0.6.0

func (w *WorkItemComment) GetModifiedBy() *IdentityRef

GetModifiedBy returns the ModifiedBy field.

func (*WorkItemComment) GetModifiedDate added in v0.6.0

func (w *WorkItemComment) GetModifiedDate() *Time

GetModifiedDate returns the ModifiedDate field.

func (*WorkItemComment) GetText added in v0.6.0

func (w *WorkItemComment) GetText() string

GetText returns the Text field if it's non-nil, zero value otherwise.

func (*WorkItemComment) GetURL added in v0.6.0

func (w *WorkItemComment) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*WorkItemComment) GetVersion added in v0.6.0

func (w *WorkItemComment) GetVersion() int

GetVersion returns the Version field if it's non-nil, zero value otherwise.

func (*WorkItemComment) GetWorkItemID added in v0.6.0

func (w *WorkItemComment) GetWorkItemID() int

GetWorkItemID returns the WorkItemID field if it's non-nil, zero value otherwise.

type WorkItemCommentList added in v0.7.1

type WorkItemCommentList struct {
	Links             *map[string]Link   `json:"_links,omitempty"`
	Comments          []*WorkItemComment `json:"comments,omitempty"`
	ContinuationToken *string            `json:"continuationToken,omitempty"`
	Count             *int               `json:"count,omitempty"`
	NextPage          *string            `json:"nextPage,omitempty"`
	TotalCount        *int               `json:"totalCount,omitempty"`
	URL               *string            `json:"url,omitempty"`
}

WorkItemCommentList Represents a list of work item comments.

func (*WorkItemCommentList) GetContinuationToken added in v0.7.1

func (w *WorkItemCommentList) GetContinuationToken() string

GetContinuationToken returns the ContinuationToken field if it's non-nil, zero value otherwise.

func (*WorkItemCommentList) GetCount added in v0.7.1

func (w *WorkItemCommentList) GetCount() int

GetCount returns the Count field if it's non-nil, zero value otherwise.

func (w *WorkItemCommentList) GetLinks() map[string]Link

GetLinks returns the Links field if it's non-nil, zero value otherwise.

func (*WorkItemCommentList) GetNextPage added in v0.7.1

func (w *WorkItemCommentList) GetNextPage() string

GetNextPage returns the NextPage field if it's non-nil, zero value otherwise.

func (*WorkItemCommentList) GetTotalCount added in v0.7.1

func (w *WorkItemCommentList) GetTotalCount() int

GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise.

func (*WorkItemCommentList) GetURL added in v0.7.1

func (w *WorkItemCommentList) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type WorkItemCommentListOptions added in v0.7.1

type WorkItemCommentListOptions struct {
	IDs            []int  `url:"ids,omitempty"`
	IncludeDeleted bool   `url:"includeDeleted,omitempty"`
	Expand         string `url:"$expand,omitempty"`
}

WorkItemCommentListOptions URI parameters for ListComments Valid Expand strings are: all, mentions, none, reactions, renderedText, renderedTextOnly

type WorkItemFieldUpdate

type WorkItemFieldUpdate struct {
	NewValue interface{} `json:"newValue,omitempty"`
	OldValue interface{} `json:"oldValue,omitempty"`
}

WorkItemFieldUpdate Describes an update to a work item field.

type WorkItemLink struct {
	Rel    *string            `json:"rel,omitempty"`
	Source *WorkItemReference `json:"source,omitempty"`
	Target *WorkItemReference `json:"target,omitempty"`
}

WorkItemLink A link between two work items.

func (*WorkItemLink) GetRel

func (w *WorkItemLink) GetRel() string

GetRel returns the Rel field if it's non-nil, zero value otherwise.

func (*WorkItemLink) GetSource

func (w *WorkItemLink) GetSource() *WorkItemReference

GetSource returns the Source field.

func (*WorkItemLink) GetTarget

func (w *WorkItemLink) GetTarget() *WorkItemReference

GetTarget returns the Target field.

type WorkItemListResponse

type WorkItemListResponse struct {
	Count     int         `json:"count,omitempty"`
	WorkItems []*WorkItem `json:"value,omitempty"`
}

WorkItemListResponse describes the list response for work items

type WorkItemReference

type WorkItemReference struct {
	ID  *int    `json:"id,omitempty"`
	URL *string `json:"url,omitempty"`
}

WorkItemReference Contains reference to a work item.

func (*WorkItemReference) GetID

func (w *WorkItemReference) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*WorkItemReference) GetURL

func (w *WorkItemReference) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type WorkItemRelation

type WorkItemRelation struct {
	Attributes *map[string]interface{} `json:"attributes,omitempty"`
	Rel        *string                 `json:"rel,omitempty"`
	URL        *string                 `json:"url,omitempty"`
}

WorkItemRelation describes an intermediary between iterations and work items

func (*WorkItemRelation) GetRel

func (w *WorkItemRelation) GetRel() string

GetRel returns the Rel field if it's non-nil, zero value otherwise.

func (*WorkItemRelation) GetURL

func (w *WorkItemRelation) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

type WorkItemRelationUpdates

type WorkItemRelationUpdates struct {
	Added   []*WorkItemRelation `json:"added,omitempty"`
	Removed []*WorkItemRelation `json:"removed,omitempty"`
	Updated []*WorkItemRelation `json:"updated,omitempty"`
}

WorkItemRelationUpdates Describes updates to a work item's relations.

type WorkItemUpdate

type WorkItemUpdate struct {
	Links       *map[string]interface{}         `json:"attributes,omitempty"`
	Fields      *map[string]WorkItemFieldUpdate `json:"fields,omitempty"`
	ID          *int                            `json:"id,omitempty"`
	Relations   *WorkItemRelationUpdates        `json:"relations,omitempty"`
	Rev         *int                            `json:"rev,omitempty"`
	RevisedBy   *IdentityRef                    `json:"revisedBy,omitempty"`
	RevisedDate *Time                           `json:"revisedDate,omitempty"`
	WorkItemID  *int                            `json:"workItemId,omitempty"`
	URL         *string                         `json:"url,omitempty"`
}

WorkItemUpdate Describes an update to a work item.

func (*WorkItemUpdate) GetFields

func (w *WorkItemUpdate) GetFields() map[string]WorkItemFieldUpdate

GetFields returns the Fields field if it's non-nil, zero value otherwise.

func (*WorkItemUpdate) GetID

func (w *WorkItemUpdate) GetID() int

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*WorkItemUpdate) GetRelations added in v0.6.0

func (w *WorkItemUpdate) GetRelations() *WorkItemRelationUpdates

GetRelations returns the Relations field.

func (*WorkItemUpdate) GetRev

func (w *WorkItemUpdate) GetRev() int

GetRev returns the Rev field if it's non-nil, zero value otherwise.

func (*WorkItemUpdate) GetRevisedBy

func (w *WorkItemUpdate) GetRevisedBy() *IdentityRef

GetRevisedBy returns the RevisedBy field.

func (*WorkItemUpdate) GetRevisedDate

func (w *WorkItemUpdate) GetRevisedDate() *Time

GetRevisedDate returns the RevisedDate field.

func (*WorkItemUpdate) GetURL

func (w *WorkItemUpdate) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*WorkItemUpdate) GetWorkItemID

func (w *WorkItemUpdate) GetWorkItemID() int

GetWorkItemID returns the WorkItemID field if it's non-nil, zero value otherwise.

type WorkItemsService

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

WorkItemsService handles communication with the work items methods on the API utilising https://docs.microsoft.com/en-gb/rest/api/vsts/wit/work%20items

func (*WorkItemsService) CreateComment added in v0.6.0

func (s *WorkItemsService) CreateComment(ctx context.Context, owner, project string, workItemID int, comment *WorkItemComment) (*WorkItemComment, *http.Response, error)

CreateComment Posts a comment to a work item https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/comments/add

func (*WorkItemsService) GetComment added in v0.7.1

func (s *WorkItemsService) GetComment(ctx context.Context, owner, project string, workItemID, commentID int, opts *WorkItemCommentListOptions) (*WorkItemComment, *http.Response, error)

GetComment Gets a work item comment https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/comments/get%20comments%20batch?view=azure-devops-rest-5.1#commentlist

func (*WorkItemsService) GetForIteration

func (s *WorkItemsService) GetForIteration(ctx context.Context, owner, project, team string, iteration Iteration) ([]*WorkItem, *http.Response, error)

GetForIteration will get a list of work items based on an iteration name utilising https://docs.microsoft.com/en-gb/rest/api/vsts/wit/work%20items/list

func (*WorkItemsService) GetIdsForIteration

func (s *WorkItemsService) GetIdsForIteration(ctx context.Context, owner, project, team string, iteration Iteration) (*IterationWorkItems, *http.Response, error)

GetIdsForIteration will return an array of ids for a given iteration utilising https://docs.microsoft.com/en-gb/rest/api/vsts/work/iterations/get%20iteration%20work%20items

func (*WorkItemsService) ListComments added in v0.7.1

func (s *WorkItemsService) ListComments(ctx context.Context, owner, project string, workItemID int, opts *WorkItemCommentListOptions) (*WorkItemCommentList, *http.Response, error)

ListComments Lists all comments on a work item https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/comments/get%20comment?view=azure-devops-rest-5.1#comment

Jump to

Keyboard shortcuts

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