Documentation ¶
Overview ¶
Package azuredevops is a Go client library for accessing the Azure DevOps API. Installation
$ go get github.com/benmatselby/go-azuredevops/azuredevops or $ dep ensure -add github.com/benmatselby/go-azuredevops/azuredevops
Usage Interaction with the Azure DevOps API is done through a Client instance.
import "github.com/benmatselby/go-azuredevops/azuredevops v := azuredevops.NewClient(account, project, token)
Services The client has services that you can use to access resources from the API:
iterations, error := v.Iterations.List(team) if error != nil { fmt.Println(error) }
Index ¶
- Constants
- type Board
- type BoardColumn
- type BoardsService
- type Build
- type BuildController
- type BuildDefinition
- type BuildDefinitionsListOptions
- type BuildDefinitionsListResponse
- type BuildDefinitionsService
- type BuildListOrder
- type BuildsListOptions
- type BuildsListResponse
- type BuildsService
- type Client
- type DeliveryPlan
- type DeliveryPlanTimeLine
- type DeliveryPlansListOptions
- type DeliveryPlansListResponse
- type DeliveryPlansService
- type DeliveryTeam
- type Favourite
- type FavouritesResponse
- type FavouritesService
- type GitListRefsResponse
- type GitRefListOptions
- type GitService
- type IdentityRef
- type Iteration
- type IterationsResponse
- type IterationsService
- type ListBoardsResponse
- type Person
- type PullRequest
- type PullRequestListOptions
- type PullRequestRepo
- type PullRequestsResponse
- type PullRequestsService
- type QueueBuildOptions
- type Ref
- type Repository
- type Team
- type TeamsListOptions
- type TeamsListResponse
- type TeamsService
- type Test
- type TestListResponse
- type TestResult
- type TestResultsListOptions
- type TestResultsListResponse
- type TestsListOptions
- type TestsService
- type WorkItem
- type WorkItemFields
- type WorkItemListResponse
- type WorkItemRelation
- type WorkItemRelationship
- type WorkItemsResponse
- type WorkItemsService
Constants ¶
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 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Board ¶
type Board struct { ID string `json:"id"` Name string `json:"name"` Columns []BoardColumn `json:"columns,omitempty"` }
Board describes a board
type BoardColumn ¶
BoardColumn describes a column on the board
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(team string, id string) (*Board, 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(team string) ([]Board, 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"` 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"` Branch string `json:"sourceBranch"` Repository Repository `json:"repository"` Demands []struct { Name string `json:"name"` Value string `json:"value"` } `json:"demands"` Logs *struct { ID int `json:"id"` Type string `json:"type"` URL string `json:"url"` } `json:"logs,omitempty"` Project *struct { Abbreviation string `json:"abbreviation"` Description string `json:"description"` ID string `json:"id"` Name string `json:"name"` Revision int `json:"revision"` State string `json:"state"` URL string `json:"url"` Visibility string `json:"visibility"` } `json:"project,omitempty"` Properties map[string]string Priority string `json:"priority,omitempty"` OrchestrationPlan *buildOrchestrationPlanSchema `json:"orchestrationPlan,omitempty"` Plans []buildOrchestrationPlanSchema `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 struct { ID int `json:"id"` Name string `json:"name"` URL string `json:"url"` Pool *struct { ID int `json:"id"` IsHosted bool `json:"is_hosted"` Name string `json:"name"` } `json:"pool,omitempty"` } `json:"queue"` QueueOptions map[string]string `json:"queue_options"` 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 []struct { Message string `json:"message"` Result string `json:"result"` } Tags []string `json:"tags,omitempty"` TriggerBuild *Build `json:"triggeredByBuild,omitempty"` URI string `json:"uri,omitempty"` URL string `json:"url,omitempty"` TriggerInfo struct { CiSourceBranch string `json:"ci.sourceBranch"` CiSourceSha string `json:"ci.sourceSha"` CiMessage string `json:"ci.message"` } `json:"triggerInfo"` }
Build represents a build
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
type BuildDefinition ¶
type BuildDefinition struct { ID int `json:"id"` Name string `json:"name"` Repository *Repository `json:"repository,omitempty"` }
BuildDefinition represents a build definition
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
type BuildDefinitionsListResponse ¶
type BuildDefinitionsListResponse struct { BuildDefinitions []BuildDefinition `json:"value"` Count int `json:"count"` }
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 ¶
func (s *BuildDefinitionsService) List(opts *BuildDefinitionsListOptions) ([]BuildDefinition, error)
List returns a list of build definitions utilising https://docs.microsoft.com/en-gb/rest/api/vsts/build/definitions/list
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 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 BuildListOrder `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
type BuildsListResponse ¶
type BuildsListResponse struct {
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(opts *BuildsListOptions) ([]Build, 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(build *Build, opts *QueueBuildOptions) error
Queue inserts new build creation to queue utilising https://docs.microsoft.com/en-us/rest/api/vsts/build/builds/queue?view=vsts-rest-4.1
type Client ¶
type Client struct { BaseURL string UserAgent string Account string Project string AuthToken string // Services used to proxy to other API endpoints Boards *BoardsService BuildDefinitions *BuildDefinitionsService Builds *BuildsService DeliveryPlans *DeliveryPlansService Favourites *FavouritesService Git *GitService Iterations *IterationsService PullRequests *PullRequestsService Teams *TeamsService Tests *TestsService WorkItems *WorkItemsService // contains filtered or unexported fields }
Client for interacting with the Azure DevOps API
func (*Client) NewBaseRequest ¶
NewBaseRequest does not take into consideration the project and simply uses the base https://%s.visualstudio.com base URL
type DeliveryPlan ¶
type DeliveryPlan struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` Created string `json:"createdDate"` URL string `json:"url"` }
DeliveryPlan describes an plan
type DeliveryPlanTimeLine ¶
type DeliveryPlanTimeLine struct { StartDate string `json:"startDate"` EndDate string `json:"endDate"` ID string `json:"id"` Revision int `json:"revision"` Teams []DeliveryTeam `json:"teams"` }
DeliveryPlanTimeLine describes the delivery plan get response
type DeliveryPlansListOptions ¶
type DeliveryPlansListOptions struct { }
DeliveryPlansListOptions describes what the request to the API should look like
type DeliveryPlansListResponse ¶
type DeliveryPlansListResponse struct { DeliveryPlans []DeliveryPlan `json:"value"` Count int `json:"count"` }
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(ID string, startDate, endDate string) (*DeliveryPlanTimeLine, error)
GetTimeLine will fetch the details about a specific delivery plan
func (*DeliveryPlansService) List ¶
func (s *DeliveryPlansService) List(opts *DeliveryPlansListOptions) ([]DeliveryPlan, int, error)
List returns a list of delivery plans
type DeliveryTeam ¶
type DeliveryTeam struct { ID string `json:"id"` Name string `json:"name"` Iterations []Iteration `json:"iterations"` }
DeliveryTeam describes the teams in a specific plan
type Favourite ¶
type Favourite struct { ID string `json:"id"` ArtifactName string `json:"artifactName"` ArtifactType string `json:"artifactType"` ArtifactID string `json:"artifactId"` }
Favourite describes what a favourite is
type FavouritesResponse ¶
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
type GitListRefsResponse ¶
GitListRefsResponse describes the git refs list response
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 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) ListRefs ¶
func (s *GitService) ListRefs(repo, refType string, opts *GitRefListOptions) ([]Ref, int, error)
ListRefs returns a list of the references for a git repo
type IdentityRef ¶
type IdentityRef struct { Descriptor string `json:"descriptor"` DirectoryAlias string `json:"directoryAlias"` DisplayName string `json:"displayName"` ID string `json:"id"` ImageURL string `json:"imageUrl"` Inactive bool `json:"inactive"` IsAadIdentity bool `json:"isAadIdentity"` IsContainer bool `json:"isContainer"` ProfileURL string `json:"profileUrl"` UniqueName string `json:"uniqueName"` URL string `json:"url"` }
IdentityRef represents a Azure Devops user
type Iteration ¶
type Iteration struct { ID string `json:"id"` Name string `json:"name"` Path string `json:"path"` URL string `json:"url"` StartDate string `json:"startDate,omitempty"` EndDate string `json:"finishDate,omitempty"` WorkItems [][]interface{} `json:"workItems,omitempty"` }
Iteration describes an iteration
type IterationsResponse ¶
type IterationsResponse struct {
Iterations []Iteration `json:"value"`
}
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(team string, name string) (*Iteration, 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(team string) ([]Iteration, 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 ListBoardsResponse ¶
type ListBoardsResponse struct {
Boards []Board `json:"value"`
}
ListBoardsResponse describes the boards response
type Person ¶ added in v0.4.0
type Person struct {
DisplayName string `json:"displayName"`
}
Person represents the object coming back from the API.
type PullRequest ¶
type PullRequest struct { ID int `json:"pullRequestId,omitempty"` Title string `json:"title"` Description string `json:"description"` Status string `json:"status"` Created string `json:"creationDate"` Repo PullRequestRepo `json:"repository"` URL string `json:"url"` }
PullRequest describes the pull request
type PullRequestListOptions ¶
type PullRequestListOptions struct { // https://docs.microsoft.com/en-us/rest/api/vsts/git/pull%20requests/get%20pull%20requests%20by%20project#pullrequeststatus State string `url:"searchCriteria.status,omitempty"` }
PullRequestListOptions describes what the request to the API should look like
type PullRequestRepo ¶
type PullRequestRepo struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` }
PullRequestRepo describes the repo within the pull request
type PullRequestsResponse ¶
type PullRequestsResponse struct { PullRequests []PullRequest `json:"value"` Count int `json:"count"` }
PullRequestsResponse describes the pull requests 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) List ¶
func (s *PullRequestsService) List(opts *PullRequestListOptions) ([]PullRequest, int, error)
List returns list of the pull requests utilising https://docs.microsoft.com/en-us/rest/api/vsts/git/pull%20requests/get%20pull%20requests%20by%20project
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 Ref ¶
type Ref struct { Name string `json:"name,omitempty"` ObjectID string `json:"objectId,omitempty"` URL string `json:"url,omitempty"` Statuses []struct { ID int `json:"id,omitempty"` State string `json:"state,omitempty"` Description string `json:"description,omitempty"` Context struct { Name string `json:"name,omitempty"` Genre string `json:"genre,omitempty"` } `json:"context,omitempty"` CreationDate time.Time `json:"creationDate,omitempty"` CreatedBy struct { ID string `json:"id,omitempty"` DisplayName string `json:"displayName,omitempty"` UniqueName string `json:"uniqueName,omitempty"` URL string `json:"url,omitempty"` ImageURL string `json:"imageUrl,omitempty"` } `json:"createdBy,omitempty"` TargetURL string `json:"targetUrl,omitempty"` } `json:"statuses,omitempty"` }
Ref describes what the git reference looks like
type Repository ¶
type Repository 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"` }
Repository represents a repository used by a build definition
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
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
type TeamsListResponse ¶
TeamsListResponse describes what the list API call returns for teams
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
func (*TeamsService) List ¶
func (s *TeamsService) List(opts *TeamsListOptions) ([]Team, int, error)
List returns list of the teams
type Test ¶
type Test struct { ID int `json:"id"` Name string `json:"name"` URL string `json:"url"` IsAutomated bool `json:"isAutomated"` Iteration string `json:"iteration"` Owner *struct { ID string `json:"id"` DisplayName string `json:"displayName"` } `json:"owner,omitempty"` StartedDate string `json:"startedDate"` CompletedDate string `json:"completedDate"` State string `json:"state"` Plan *struct { ID string `json:"id"` } `json:"plan,omitempty"` Revision int `json:"revision"` }
Test represents a test
type TestListResponse ¶
type TestListResponse struct {
Tests []Test `json:"value"`
}
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.Time `json:"startedDate"` CompletedDate time.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.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.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
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(opts *TestsListOptions) ([]Test, 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(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 WorkItem ¶
type WorkItem struct { ID int `json:"id"` Rev int `json:"rev"` Fields WorkItemFields `json:"fields"` }
WorkItem describes an individual work item in TFS
type WorkItemFields ¶
type WorkItemFields struct { ID int `json:"System.Id"` Title string `json:"System.Title"` State string `json:"System.State"` Type string `json:"System.WorkItemType"` Points float64 `json:"Microsoft.VSTS.Scheduling.StoryPoints"` BoardColumn string `json:"System.BoardColumn"` CreatedBy Person `json:"System.CreatedBy"` AssignedTo Person `json:"System.AssignedTo"` Tags string `json:"System.Tags"` TagList []string }
WorkItemFields describes all the fields for a given work item
type WorkItemListResponse ¶
type WorkItemListResponse struct {
WorkItems []WorkItem `json:"value"`
}
WorkItemListResponse describes the list response for work items
type WorkItemRelation ¶
type WorkItemRelation struct {
ID int `json:"id"`
}
WorkItemRelation describes an intermediary between iterations and work items
type WorkItemRelationship ¶
type WorkItemRelationship struct {
Target WorkItemRelation `json:"target"`
}
WorkItemRelationship describes the workitem section of the response
type WorkItemsResponse ¶
type WorkItemsResponse struct {
WorkItemRelationships []WorkItemRelationship `json:"workItemRelations"`
}
WorkItemsResponse describes the relationships between work items
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) GetForIteration ¶
func (s *WorkItemsService) GetForIteration(team string, iteration Iteration) ([]WorkItem, 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(team string, iteration Iteration) ([]int, 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