Files
devops-tui/internal/models/area.go
T
Samuel Enocsson 2555afce19 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>
2025-12-04 09:56:11 +01:00

26 lines
492 B
Go

package models
import "strings"
// Area represents an Azure DevOps area
type Area struct {
ID int `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
}
// DisplayName returns a shortened display name
func (a Area) DisplayName() string {
parts := strings.Split(a.Path, "\\")
if len(parts) > 1 {
// Return the last part for brevity
return parts[len(parts)-1]
}
return a.Name
}
// FullPath returns the full path
func (a Area) FullPath() string {
return a.Path
}