github

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package github publishes pipeline report comments to GitHub pull requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider posts report comments via the GitHub Issues comments API (pull request conversation comments are issue comments).

func New

func New(host, token string) (*Provider, error)

New creates a GitHub provider. For hosts other than github.com the GitHub Enterprise API prefix (/api/v3) is used.

func NewWithClient

func NewWithClient(client *github.Client) *Provider

NewWithClient creates a provider with a pre-configured client (used in tests).

func (*Provider) SetCommitStatus

func (p *Provider) SetCommitStatus(ctx context.Context, ref types.CommitRef, status types.CommitStatus) error

func (*Provider) SupportsCollapsibleSections

func (p *Provider) SupportsCollapsibleSections() bool

SupportsCollapsibleSections reports that GitHub renders embedded HTML (<details>/<summary>) inside markdown comments.

func (*Provider) UpsertComment

func (p *Provider) UpsertComment(ctx context.Context, ref types.PullRequestRef, comment types.Comment) error

UpsertComment publishes the report comment per comment.Strategy: update edits the previous report comment identified by the marker, recreate posts a new comment and then deletes the stale ones (create-first, so a cleanup failure never leaves the pull request without a report), new always posts.

Jump to

Keyboard shortcuts

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