api

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAreaDisplayName

func GetAreaDisplayName(path string) string

GetAreaDisplayName returns a shortened display name for an area

Types

type Client

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

Client is the Azure DevOps API client

func NewClient

func NewClient(cfg *config.Config) *Client

NewClient creates a new Azure DevOps API client

func (*Client) AssignWorkItem

func (c *Client) AssignWorkItem(id int, userEmail string) error

AssignWorkItem assigns a work item to a user Pass empty string to unassign

func (*Client) CreateComment

func (c *Client) CreateComment(workItemID int, text string) error

CreateComment creates a new comment on a work item

func (*Client) CreateParentWorkItem

func (c *Client) CreateParentWorkItem(workItemType, title, description, acceptanceCriteria, state, iterationPath, areaPath, assignedTo string, effort float64, priority int, tags []string, defectCause string) (int, error)

CreateParentWorkItem creates a parent work item (PBI or Bug) with state and effort

func (*Client) CreateWorkItem

func (c *Client) CreateWorkItem(workItemType, title, description string, parentID int, areaPath, iterationPath, assignedTo string) (int, error)

CreateWorkItem creates a new work item

func (*Client) DeleteComment

func (c *Client) DeleteComment(workItemID, commentID int) error

DeleteComment deletes a comment from a work item

func (*Client) DeleteWorkItem

func (c *Client) DeleteWorkItem(id int) error

DeleteWorkItem deletes a work item

func (*Client) GetAllWorkItemTypeStates

func (c *Client) GetAllWorkItemTypeStates() (map[string][]models.WorkItemStateInfo, error)

GetAllWorkItemTypeStates fetches states for all work item types

func (*Client) GetAreas

func (c *Client) GetAreas() ([]models.Area, error)

GetAreas fetches all areas for the project

func (*Client) GetComments

func (c *Client) GetComments(workItemID int) ([]models.Comment, error)

GetComments fetches comments for a work item

func (*Client) GetCurrentIteration

func (c *Client) GetCurrentIteration() (*models.Iteration, error)

GetCurrentIteration returns the current iteration

func (*Client) GetIterations

func (c *Client) GetIterations() ([]models.Iteration, error)

GetIterations fetches all iterations (sprints) for the team

func (*Client) GetTeamMembers

func (c *Client) GetTeamMembers() ([]models.TeamMember, error)

GetTeamMembers fetches all members of the configured team

func (*Client) GetWorkItem

func (c *Client) GetWorkItem(id int) (*models.WorkItem, error)

GetWorkItem fetches a single work item by ID

func (*Client) GetWorkItemTypeStates

func (c *Client) GetWorkItemTypeStates(workItemType string) ([]models.WorkItemStateInfo, error)

GetWorkItemTypeStates fetches all states for a specific work item type

func (*Client) GetWorkItemTypes

func (c *Client) GetWorkItemTypes() ([]string, error)

GetWorkItemTypes fetches all work item types for the project

func (*Client) GetWorkItems

func (c *Client) GetWorkItems(ids []string) ([]models.WorkItem, error)

GetWorkItems fetches multiple work items by ID

func (*Client) Organization

func (c *Client) Organization() string

Organization returns the organization name

func (*Client) Project

func (c *Client) Project() string

Project returns the project name

func (*Client) QueryWorkItems

func (c *Client) QueryWorkItems(sprintPath, state, assigned, areaPath string) ([]models.WorkItem, error)

QueryWorkItems queries work items using WIQL

func (*Client) Team

func (c *Client) Team() string

Team returns the team name

func (*Client) UpdateComment

func (c *Client) UpdateComment(workItemID, commentID int, text string) error

UpdateComment updates an existing comment on a work item

func (*Client) UpdatePBI

func (c *Client) UpdatePBI(id int, title, description string, priority int, effort float64, tags []string, assignedTo string) error

UpdatePBI updates a PBI's title, description, priority, effort, tags, and assigned user

func (*Client) UpdateWorkItem

func (c *Client) UpdateWorkItem(id int, newTitle, description string) error

UpdateWorkItem updates a work item's title and/or description

func (*Client) UpdateWorkItemState

func (c *Client) UpdateWorkItemState(id int, newState string) error

UpdateWorkItemState updates a work item's state

func (*Client) UpdateWorkItemTitle

func (c *Client) UpdateWorkItemTitle(id int, newTitle string) error

UpdateWorkItemTitle updates a work item's title

func (*Client) WorkItemWebURL

func (c *Client) WorkItemWebURL(id int) string

WorkItemWebURL returns the web URL for a work item

Jump to

Keyboard shortcuts

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