input

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package input provides input parsing utilities for agent-code-review.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePRNumber

func ParsePRNumber(s string) (int, error)

ParsePRNumber parses a PR number from a string.

func ReadBody

func ReadBody(src BodySource) (string, error)

ReadBody reads the body from the specified source. Priority: Text > File > Stdin

func ValidateReviewEvent

func ValidateReviewEvent(event string) error

ValidateReviewEvent validates a review event string.

Types

type BodySource

type BodySource struct {
	// Text is the body text provided directly.
	Text string
	// File is the path to read the body from.
	File string
	// Stdin is the reader for stdin input (nil to skip stdin).
	Stdin io.Reader
	// StdinIsPipe indicates whether stdin is a pipe (not a terminal).
	StdinIsPipe bool
}

BodySource specifies where to read the body from.

Jump to

Keyboard shortcuts

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