MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / PRBodyFromPRD

Function PRBodyFromPRD

internal/git/push.go:60–75  ·  view source on GitHub ↗

PRBodyFromPRD generates a PR body with a summary and list of completed stories.

(p *prd.PRD)

Source from the content-addressed store, hash-verified

58
59// PRBodyFromPRD generates a PR body with a summary and list of completed stories.
60func PRBodyFromPRD(p *prd.PRD) string {
61 var b strings.Builder
62
63 b.WriteString("## Summary\n\n")
64 b.WriteString(p.Description)
65 b.WriteString("\n\n")
66
67 b.WriteString("## Changes\n\n")
68 for _, story := range p.UserStories {
69 if story.Passes {
70 b.WriteString(fmt.Sprintf("- %s: %s\n", story.ID, story.Title))
71 }
72 }
73
74 return b.String()
75}
76
77// DeleteBranch deletes a local branch.
78func DeleteBranch(repoDir, branch string) error {

Callers 3

runAutoCreatePRMethod · 0.92
TestPRBodyFromPRDFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by 1

TestPRBodyFromPRDFunction · 0.68