template

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderBranchModified

func RenderBranchModified(in BranchModifiedInput) (string, error)

func RenderPullRequestDescription

func RenderPullRequestDescription(in PullRequestDescriptionInput) (string, error)

func UpdateContext added in v0.12.0

func UpdateContext(ctx context.Context, data Data) context.Context

UpdateContext sets or overwrites the template data in the given context.

Types

type BranchModifiedInput

type BranchModifiedInput struct {
	Checksums     []string
	DefaultBranch string
}

type Data added in v0.12.0

type Data struct {
	Run        map[string]string
	Repository DataRepository
	TaskName   string
}

Data is the root structure passed to templates.

func FromContext added in v0.12.0

func FromContext(ctx context.Context) Data

FromContext reads template data from the given context. It initializes the template data if the context doesn't contain it.

type DataRepository added in v0.12.0

type DataRepository struct {
	FullName string
	Host     string
	Name     string
	Owner    string
	WebUrl   string
}

DataRepository is the sub-resource in templates that exposes info about a repository.

type PullRequestDescriptionInput

type PullRequestDescriptionInput struct {
	AutoMergeText string
	Body          string
	IgnoreText    string
}

Jump to

Keyboard shortcuts

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