github

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(token, baseURL string) (vcs.VCSProvider, error)

NewProvider creates a GitHub VCSProvider.

Types

type Provider

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

Provider implements vcs.VCSProvider for GitHub.

func (*Provider) FetchMR

func (p *Provider) FetchMR(ctx context.Context, projectID string, mrIID int64) (*vcs.MergeRequest, error)

func (*Provider) FetchMRDiffs

func (p *Provider) FetchMRDiffs(ctx context.Context, projectID string, mrIID int64) ([]vcs.FileDiff, error)

func (*Provider) FetchMRRawDiff

func (p *Provider) FetchMRRawDiff(ctx context.Context, projectID string, mrIID int64) (string, error)

func (*Provider) FormatSuggestionBlock

func (p *Provider) FormatSuggestionBlock(suggestion string) string

FormatSuggestionBlock returns a GitHub-native suggestion code block.

func (*Provider) Info

func (p *Provider) Info() vcs.ProviderInfo

func (*Provider) ListMRDiscussions

func (p *Provider) ListMRDiscussions(ctx context.Context, projectID string, mrIID int64) ([]vcs.MRDiscussion, error)

func (*Provider) ListMRNotes

func (p *Provider) ListMRNotes(ctx context.Context, projectID string, mrIID int64) ([]vcs.MRNote, error)

func (*Provider) ListOpenMRs

func (p *Provider) ListOpenMRs(ctx context.Context, projectID string) ([]*vcs.MergeRequest, error)

func (*Provider) PostInlineComment

func (p *Provider) PostInlineComment(ctx context.Context, projectID string, mrIID int64, refs vcs.DiffRefs, comment vcs.InlineComment) error

func (*Provider) PostSummaryNote

func (p *Provider) PostSummaryNote(ctx context.Context, projectID string, mrIID int64, body string) error

func (*Provider) ReplyToMRDiscussion

func (p *Provider) ReplyToMRDiscussion(ctx context.Context, projectID string, mrIID int64, discussionID, body string) error

func (*Provider) Validate

func (p *Provider) Validate() error

Jump to

Keyboard shortcuts

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