Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type IssueDraft ¶
IssueDraft is a rendered issue body ready for review.
type IssueInput ¶
type IssueInput struct {
Opportunity *investigation.Opportunity
Evidence []*evidence.Evidence
Guidance string
Repo domain.RepoRef
Success string
}
IssueInput supplies the verified facts and repository guidance used to render an issue.
type PullRequestDraft ¶
PullRequestDraft is a rendered PR body ready for review.
type PullRequestInput ¶
type PullRequestInput struct {
Opportunity *investigation.Opportunity
Evidence []*evidence.Evidence
Guidance string
Repo domain.RepoRef
Approach string
Changes string
Compatibility string
Limitations string
LinkedIssue string
}
PullRequestInput supplies the verified facts and repository guidance used to render a PR.
type Renderer ¶
type Renderer struct{}
Renderer builds deterministic Markdown drafts from verified facts only.
func NewRenderer ¶
func NewRenderer() *Renderer
NewRenderer returns a deterministic contribution renderer.
func (*Renderer) RenderIssue ¶
func (r *Renderer) RenderIssue(in IssueInput) (*IssueDraft, error)
RenderIssue builds an issue draft from the supplied opportunity, evidence, and repository guidance. It does not invent claims beyond the input.
func (*Renderer) RenderPullRequest ¶
func (r *Renderer) RenderPullRequest(in PullRequestInput) (*PullRequestDraft, error)
RenderPullRequest builds a PR draft from the supplied opportunity, evidence, repository guidance, and explicit approach details.
type Repository ¶
type Repository interface {
SaveIssueDraft(ctx context.Context, d *IssueDraft) error
GetIssueDraft(ctx context.Context, opportunityID string) (*IssueDraft, error)
SavePullRequestDraft(ctx context.Context, d *PullRequestDraft) error
GetPullRequestDraft(ctx context.Context, opportunityID string) (*PullRequestDraft, error)
}
Repository is a narrow persistence boundary for contribution drafts. Concrete stores live outside this package; production code never uses an in-memory store.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service prepares contribution drafts and persists them through a narrow Repository.
func NewService ¶
func NewService(repo Repository) *Service
NewService returns a ContributionService backed by repo and renderer.
func (*Service) PrepareIssue ¶
func (s *Service) PrepareIssue(ctx context.Context, in IssueInput) (*IssueDraft, error)
PrepareIssue renders an issue draft and stores it.
func (*Service) PreparePullRequest ¶
func (s *Service) PreparePullRequest(ctx context.Context, in PullRequestInput) (*PullRequestDraft, error)
PreparePullRequest renders a pull request draft and stores it.