Internal

internal/core/reviewcontext

Package reviewcontext models the exact context packet given to review providers.

import "github.com/nilstate/scafld/v2/internal/core/reviewcontext"

Package reviewcontext models the exact context packet given to review providers.

Functions

func RenderMarkdown(packet Packet, opts Options) string

Source: internal/core/reviewcontext/model.go:56

RenderMarkdown renders a packet into deterministic provider-readable Markdown.

func SourceForContent(kind string, path string, content []byte) Source

Source: internal/core/reviewcontext/model.go:45

SourceForContent returns stable provenance for source text.

Types

type Options

Source: internal/core/reviewcontext/model.go:40

Options controls packet rendering.

type Options struct {
	MaxBytes int
}
Fields
  • MaxBytes int

type Packet

Source: internal/core/reviewcontext/model.go:15

Packet is the deterministic reviewer brief before provider-specific transport.

type Packet struct {
	TaskID   string
	Title    string
	Status   string
	Sections []Section
}
Fields
  • TaskID string
  • Title string
  • Status string
  • Sections []Section

type Section

Source: internal/core/reviewcontext/model.go:23

Section is one ordered part of the reviewer brief.

type Section struct {
	Key     string
	Title   string
	Order   int
	Body    string
	Sources []Source
}
Fields
  • Key string
  • Title string
  • Order int
  • Body string
  • Sources []Source

type Source

Source: internal/core/reviewcontext/model.go:32

Source identifies material used to construct a section.

type Source struct {
	Kind   string
	Path   string
	SHA256 string
	Bytes  int
}
Fields
  • Kind string
  • Path string
  • SHA256 string
  • Bytes int