Help us shape the future of Go! Take the 2026 Go Developer Survey

githubfeedback

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultChannel = "lintpal"

Variables

View Source
var ErrGitHubAPI = errors.New("GitHub API request failed")
View Source
var ErrInvalidChannel = errors.New("invalid GitHub feedback channel")
View Source
var ErrInvalidContext = errors.New("invalid GitHub feedback context")
View Source
var ErrInvalidFinding = errors.New("invalid GitHub inline finding")
View Source
var ErrUnsafeFork = errors.New("GitHub publication disabled for fork pull request")

Functions

This section is empty.

Types

type Comment

type Comment struct {
	FindingID string
	Body      string
	Path      string
	StartLine int
	EndLine   int
	Side      string
	Digest    string
}

type Context

type Context struct {
	Repo       string
	PRNumber   int
	BaseSHA    string
	HeadSHA    string
	BaseRepo   string
	HeadRepo   string
	UnsafeFork bool
}

func ResolveContext

func ResolveContext(options ContextOptions) (Context, error)

type ContextOptions

type ContextOptions struct {
	Repo, BaseSHA, HeadSHA string
	PRNumber               int
	EventPath              string
}

type Identity

type Identity struct{ Channel string }

func NewIdentity

func NewIdentity(channel string) (Identity, error)

func (Identity) FindingMarker

func (identity Identity) FindingMarker(findingID, digest string) string

func (Identity) ResultMarker

func (identity Identity) ResultMarker(headSHA string) string

type Plan

type Plan struct {
	Comments      []Comment
	SkippedIDs    []string
	UnanchoredIDs []string
}

func PlanComments

func PlanComments(bundle report.Bundle, activeFindings map[string]string) Plan

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

func NewPublisher

func NewPublisher(apiBase string, client *http.Client) (*Publisher, error)

func (*Publisher) ActiveFindings

func (publisher *Publisher) ActiveFindings(ctx context.Context, token string, reviewCtx Context, identity Identity) (map[string]string, error)

func (*Publisher) Publish

func (publisher *Publisher) Publish(ctx context.Context, token string, reviewCtx Context, identity Identity, result string, plan Plan) error

Jump to

Keyboard shortcuts

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