git

package
v0.0.0-...-a658ca0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const PublishingCompletedString = "Publishing Completed"

Variables

This section is empty.

Functions

func ArtifactMatchesRelease

func ArtifactMatchesRelease(assetName, goos, goarch string) bool

func GetRepo

func GetRepo() string

func IsGitDiffSignificant

func IsGitDiffSignificant(diff string, ignoreChangePatterns map[string]string) (bool, string, error)

func PRVersionMetadata

func PRVersionMetadata(m *versioning.MergedVersionReport, labelTypes map[string]github.Label) (string, *versioning.BumpType, []*github.Label)

Types

type Git

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

func New

func New(accessToken string) *Git

func (*Git) Add

func (g *Git) Add(arg string) error

func (*Git) AttachMCPReleaseTag

func (g *Git) AttachMCPReleaseTag(path, tagName string, outputs map[string]string) error

func (*Git) CheckDirDirty

func (g *Git) CheckDirDirty(dir string, ignoreChangePatterns map[string]string) (bool, string, error)

func (*Git) CloneRepo

func (g *Git) CloneRepo() error

func (*Git) CommitAndPush

func (g *Git) CommitAndPush(openAPIDocVersion, speakeasyVersion, doc string, action environment.Action, sourcesOnly bool, mergedVersionReport *versioning.MergedVersionReport) (string, error)

func (*Git) CreateOrUpdateDocsPR

func (g *Git) CreateOrUpdateDocsPR(branchName string, releaseInfo releases.ReleasesInfo, previousGenVersion string, pr *github.PullRequest) error

func (*Git) CreateOrUpdatePR

func (g *Git) CreateOrUpdatePR(info PRInfo) (*github.PullRequest, error)

func (*Git) CreateRelease

func (g *Git) CreateRelease(oldReleaseContent string, languages map[string]releases.LanguageReleaseInfo, outputs map[string]string, targetSpecificReleaseNotes releases.TargetReleaseNotes) error

func (*Git) CreateSuggestionPR

func (g *Git) CreateSuggestionPR(branchName, output string) (*int, string, error)

func (*Git) CreateTag

func (g *Git) CreateTag(tag string, hash string) error

func (*Git) DeleteBranch

func (g *Git) DeleteBranch(branchName string) error

func (*Git) DeleteIssueComment

func (g *Git) DeleteIssueComment(commentID int64) error

func (*Git) FindAndCheckoutBranch

func (g *Git) FindAndCheckoutBranch(branchName string) (string, error)

func (*Git) FindExistingPR

func (g *Git) FindExistingPR(branchName string, action environment.Action, sourceGeneration bool) (string, *github.PullRequest, error)

func (*Git) FindOrCreateBranch

func (g *Git) FindOrCreateBranch(branchName string, action environment.Action) (string, error)

func (*Git) GetChangedFilesForPRorBranch

func (g *Git) GetChangedFilesForPRorBranch() ([]string, *int, error)

func (*Git) GetCommitedFiles

func (g *Git) GetCommitedFiles() ([]string, error)

func (*Git) GetCurrentBranch

func (g *Git) GetCurrentBranch() (string, error)
func (g *Git) GetDownloadLink(version string) (string, string, error)

func (*Git) GetLatestTag

func (g *Git) GetLatestTag() (string, error)

func (*Git) GetReleaseByTag

func (g *Git) GetReleaseByTag(ctx context.Context, tag string) (*github.RepositoryRelease, *github.Response, error)

func (*Git) ListIssueComments

func (g *Git) ListIssueComments(prNumber int) ([]*github.IssueComment, error)

func (*Git) MergeBranch

func (g *Git) MergeBranch(branchName string) (string, error)

func (*Git) Reset

func (g *Git) Reset(args ...string) error

func (*Git) SetReleaseToPublished

func (g *Git) SetReleaseToPublished(version, directory string) error

func (*Git) UpsertLabelTypes

func (g *Git) UpsertLabelTypes(ctx context.Context) map[string]github.Label

func (*Git) WriteIssueComment

func (g *Git) WriteIssueComment(prNumber int, body string) error

func (*Git) WritePRBody

func (g *Git) WritePRBody(prNumber int, body string) error

func (*Git) WritePRComment

func (g *Git) WritePRComment(prNumber int, fileName, body string, line int) error

type PRInfo

type PRInfo struct {
	BranchName           string
	ReleaseInfo          *releases.ReleasesInfo
	PreviousGenVersion   string
	PR                   *github.PullRequest
	SourceGeneration     bool
	LintingReportURL     string
	ChangesReportURL     string
	OpenAPIChangeSummary string
	VersioningInfo       versionbumps.VersioningInfo
}

Jump to

Keyboard shortcuts

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