autofixpr

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package autofixpr turns GitHub pull request comments into focused fix prompts.

Package autofixpr parses pull request review feedback into actionable fixes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderMarkdown

func RenderMarkdown(report Report) string

RenderMarkdown returns a Markdown task document for the autofix report.

func RenderPrompt

func RenderPrompt(report Report) string

RenderPrompt returns the prompt that should be given to the coding agent.

func RenderText

func RenderText(out io.Writer, report Report)

RenderText writes a human-readable autofix report.

Types

type Item

type Item struct {
	Index        int    `json:"index"`
	Source       string `json:"source"`
	Author       string `json:"author"`
	Body         string `json:"body"`
	Path         string `json:"path,omitempty"`
	Line         int    `json:"line,omitempty"`
	DiffHunk     string `json:"diff_hunk,omitempty"`
	URL          string `json:"url,omitempty"`
	CreatedAt    string `json:"created_at,omitempty"`
	Instruction  string `json:"instruction"`
	Actionable   bool   `json:"actionable"`
	OriginalLine int    `json:"original_line,omitempty"`
}

Item describes one actionable pull request feedback item.

type Report

type Report struct {
	Kind        string `json:"kind"`
	Action      string `json:"action"`
	Status      string `json:"status"`
	Repository  string `json:"repository"`
	PullRequest int    `json:"pull_request"`
	URL         string `json:"url,omitempty"`
	Total       int    `json:"total_comments"`
	Actionable  int    `json:"actionable_comments"`
	Limit       int    `json:"limit,omitempty"`
	File        string `json:"file,omitempty"`
	Bytes       int    `json:"bytes,omitempty"`
	Items       []Item `json:"items,omitempty"`
	Prompt      string `json:"prompt"`
}

Report contains the prepared autofix prompt and its source comments.

func Build

func Build(comments githubcomments.Report, limit int) Report

Build creates an autofix report from fetched pull request comments.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL