CanMerge returns true if the selected entry is a completed PRD with a branch set.
()
| 316 | |
| 317 | // CanMerge returns true if the selected entry is a completed PRD with a branch set. |
| 318 | func (p *PRDPicker) CanMerge() bool { |
| 319 | entry := p.GetSelectedEntry() |
| 320 | if entry == nil || entry.Branch == "" { |
| 321 | return false |
| 322 | } |
| 323 | // Allow merge for completed loop state or all stories passed |
| 324 | return entry.LoopState == loop.LoopStateComplete || (entry.Completed == entry.Total && entry.Total > 0) |
| 325 | } |
| 326 | |
| 327 | // SetMergeResult sets the merge result for display. |
| 328 | func (p *PRDPicker) SetMergeResult(result *MergeResult) { |