Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/bd/prime.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ git push # Push to remote
### Creating & Updating
- ` + "`bd create --title=\"Summary of this issue\" --description=\"Why this issue exists and what needs to be done\" --type=task|bug|feature --priority=2`" + ` - New issue
- Priority: 0-4 or P0-P4 (0=critical, 2=medium, 4=backlog). NOT "high"/"medium"/"low"
- ` + "`bd update <id> --status=in_progress`" + ` - Claim work
- ` + "`bd update <id> --claim`" + ` - Claim work
- ` + "`bd update <id> --assignee=username`" + ` - Assign to someone
- ` + "`bd update <id> --title/--description/--notes/--design`" + ` - Update fields inline
- ` + "`bd close <id>`" + ` - Mark complete
Expand All @@ -468,7 +468,7 @@ git push # Push to remote
` + "```bash" + `
bd ready # Find available work
bd show <id> # Review issue details
bd update <id> --status=in_progress # Claim it
bd update <id> --claim # Claim it
` + "```" + `

` + completingWorkflow + `
Expand Down
18 changes: 18 additions & 0 deletions cmd/bd/prime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,24 @@ func TestOutputContextFunction(t *testing.T) {
}
}

func TestPrimeClaimGuidanceUsesAtomicClaim(t *testing.T) {
defer stubIsEphemeralBranch(false)()
defer stubPrimeHasGitRemote(true)()

var buf bytes.Buffer
if err := outputPrimeContext(&buf, false, false); err != nil {
t.Fatalf("outputPrimeContext failed: %v", err)
}

output := buf.String()
if !strings.Contains(output, "bd update <id> --claim") {
t.Fatal("prime output should teach bd update <id> --claim")
}
if strings.Contains(output, "bd update <id> --status=in_progress") {
t.Fatal("prime output should not teach bd update <id> --status=in_progress")
}
}

// stubIsEphemeralBranch temporarily replaces isEphemeralBranch
// with a stub returning returnValue.
//
Expand Down
Loading