github

package
v0.0.0-...-d9f3949 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilPullRequest = errors.New("nil pull request")
	ErrNilIssue       = errors.New("nil issue")
)

Functions

func DeriveOverallCIStatus

func DeriveOverallCIStatus(checks []platform.CICheck, combined *gh.CombinedStatus) string

func NormalizeCIChecks

func NormalizeCIChecks(
	repo platform.RepoRef,
	runs []*gh.CheckRun,
	combined *gh.CombinedStatus,
) []platform.CICheck

func NormalizeCheckRuns

func NormalizeCheckRuns(repo platform.RepoRef, runs []*gh.CheckRun) []platform.CICheck

func NormalizeCommentEvent

func NormalizeCommentEvent(
	repo platform.RepoRef,
	mrNumber int,
	c *gh.IssueComment,
) platform.MergeRequestEvent

func NormalizeCommitEvent

func NormalizeCommitEvent(
	repo platform.RepoRef,
	mrNumber int,
	c *gh.RepositoryCommit,
) platform.MergeRequestEvent

func NormalizeForcePushEvent

func NormalizeForcePushEvent(
	repo platform.RepoRef,
	mrNumber int,
	fp ForcePushEvent,
) platform.MergeRequestEvent

func NormalizeIssue

func NormalizeIssue(repo platform.RepoRef, ghIssue *gh.Issue) (platform.Issue, error)

func NormalizeIssueCommentEvent

func NormalizeIssueCommentEvent(
	repo platform.RepoRef,
	issueNumber int,
	c *gh.IssueComment,
) platform.IssueEvent

func NormalizePullRequest

func NormalizePullRequest(repo platform.RepoRef, ghPR *gh.PullRequest) (platform.MergeRequest, error)

func NormalizeReviewEvent

func NormalizeReviewEvent(
	repo platform.RepoRef,
	mrNumber int,
	r *gh.PullRequestReview,
) platform.MergeRequestEvent

func NormalizeTimelineEvent

func NormalizeTimelineEvent(
	repo platform.RepoRef,
	mrNumber int,
	event PullRequestTimelineEvent,
) *platform.MergeRequestEvent

Types

type ForcePushEvent

type ForcePushEvent struct {
	Actor     string
	BeforeSHA string
	AfterSHA  string
	Ref       string
	CreatedAt time.Time
}

type PullRequestTimelineEvent

type PullRequestTimelineEvent struct {
	NodeID            string
	EventType         string
	Actor             string
	CreatedAt         time.Time
	BeforeSHA         string
	AfterSHA          string
	Ref               string
	PreviousTitle     string
	CurrentTitle      string
	PreviousRefName   string
	CurrentRefName    string
	SourceType        string
	SourceOwner       string
	SourceRepo        string
	SourceNumber      int
	SourceTitle       string
	SourceURL         string
	IsCrossRepository bool
	WillCloseTarget   bool
}

Jump to

Keyboard shortcuts

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