11
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
package issue
|
||||
|
||||
// Column is the kanban board column identifier.
|
||||
type Column string
|
||||
|
||||
const (
|
||||
ColumnTodo Column = "todo"
|
||||
ColumnInProgress Column = "in-progress"
|
||||
ColumnReview Column = "review"
|
||||
ColumnDone Column = "done"
|
||||
)
|
||||
|
||||
var validColumns = map[Column]bool{
|
||||
ColumnTodo: true,
|
||||
ColumnInProgress: true,
|
||||
ColumnReview: true,
|
||||
ColumnDone: true,
|
||||
}
|
||||
|
||||
// Issue is the domain model for a kanban card, mirroring the TypeScript Issue
|
||||
// type in types.ts (youtrack fields omitted: source, externalId, attachments).
|
||||
// JSON tags use camelCase to match the state blob format in comments.
|
||||
type Issue struct {
|
||||
Number int `json:"number"`
|
||||
Title string `json:"title"`
|
||||
Column Column `json:"column"`
|
||||
SessionID string `json:"sessionId,omitempty"`
|
||||
ProfilePath string `json:"profilePath,omitempty"`
|
||||
TestProfilePath string `json:"testProfilePath,omitempty"`
|
||||
SpecFile string `json:"specFile,omitempty"`
|
||||
PlanFile string `json:"planFile,omitempty"`
|
||||
PrDiffFile string `json:"prDiffFile,omitempty"`
|
||||
PR string `json:"pr,omitempty"`
|
||||
PrMerged bool `json:"prMerged,omitempty"`
|
||||
PrMergedAt string `json:"prMergedAt,omitempty"`
|
||||
Branch string `json:"branch,omitempty"`
|
||||
WorktreePath string `json:"worktreePath,omitempty"`
|
||||
WorktreeExists bool `json:"worktreeExists,omitempty"`
|
||||
ImplementStatus string `json:"implementStatus,omitempty"`
|
||||
ImplementSessionID string `json:"implementSessionId,omitempty"`
|
||||
ReviewSessionID string `json:"reviewSessionId,omitempty"`
|
||||
TestSessionID string `json:"testSessionId,omitempty"`
|
||||
HTMLURL string `json:"htmlUrl,omitempty"`
|
||||
Prerequisite int `json:"prerequisite,omitempty"`
|
||||
Color string `json:"color,omitempty"`
|
||||
AutoReview *bool `json:"autoReview,omitempty"`
|
||||
BrainstormTabOpen bool `json:"brainstormTabOpen,omitempty"`
|
||||
ImplementTabOpen bool `json:"implementTabOpen,omitempty"`
|
||||
ReviewTabOpen bool `json:"reviewTabOpen,omitempty"`
|
||||
TestTabOpen bool `json:"testTabOpen,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user