Initial commit: Azure DevOps TUI client
A terminal-based user interface for browsing and managing Azure DevOps work items. Features include: - Browse work items with filtering by area, iteration, state, and type - View work item details with markdown rendering - Open work items in browser - Create git branches from work items - Update work item state - Keyboard-driven navigation 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// Iteration represents an Azure DevOps iteration (sprint)
|
||||
type Iteration struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Path string `json:"path"`
|
||||
StartDate time.Time `json:"startDate"`
|
||||
FinishDate time.Time `json:"finishDate"`
|
||||
TimeFrame string `json:"timeFrame"` // "past", "current", "future"
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
// IsCurrent returns true if this is the current iteration
|
||||
func (i *Iteration) IsCurrent() bool {
|
||||
return i.TimeFrame == "current"
|
||||
}
|
||||
|
||||
// IsPast returns true if this iteration is in the past
|
||||
func (i *Iteration) IsPast() bool {
|
||||
return i.TimeFrame == "past"
|
||||
}
|
||||
|
||||
// IsFuture returns true if this iteration is in the future
|
||||
func (i *Iteration) IsFuture() bool {
|
||||
return i.TimeFrame == "future"
|
||||
}
|
||||
|
||||
// DisplayName returns a formatted name for display
|
||||
func (i *Iteration) DisplayName() string {
|
||||
if i.IsCurrent() {
|
||||
return i.Name + " (current)"
|
||||
}
|
||||
return i.Name
|
||||
}
|
||||
Reference in New Issue
Block a user