template

package
v1.21.5 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CouldBe

func CouldBe(filename string) bool

CouldBe indicates a file with the filename could be a template, it is a low cost check before further processing.

func RenderToMarkdown

func RenderToMarkdown(template *api.IssueTemplate, values url.Values) string

RenderToMarkdown renders template to markdown with specified values

func Unmarshal

func Unmarshal(filename string, content []byte) (*api.IssueTemplate, error)

Unmarshal parses out a valid template from the content

func UnmarshalFromCommit

func UnmarshalFromCommit(commit *git.Commit, filename string) (*api.IssueTemplate, error)

UnmarshalFromCommit parses out a valid template from the commit

func UnmarshalFromEntry

func UnmarshalFromEntry(entry *git.TreeEntry, dir string) (*api.IssueTemplate, error)

UnmarshalFromEntry parses out a valid template from the blob in entry

func UnmarshalFromRepo

func UnmarshalFromRepo(repo *git.Repository, branch, filename string) (*api.IssueTemplate, error)

UnmarshalFromRepo parses out a valid template from the head commit of the branch

func Validate

func Validate(template *api.IssueTemplate) error

Validate checks whether an IssueTemplate is considered valid, and returns the first error

Types

This section is empty.

Jump to

Keyboard shortcuts

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