Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commit ¶
type Commit struct {
AuthoredAt time.Time
AuthorEmail string
AuthorName string
CommittedAt time.Time
CommitterEmail string
CommitterName string
Message string
SHA string
TreeSHA string
}
Commit represents the metadata for a Git commit.
type CommitResolver ¶
A CommitResolver provides the ability to look up a commit.
func NewRepositoryCommitResolver ¶
func NewRepositoryCommitResolver(path string, logger logger.Logger) (CommitResolver, error)
NewRepositoryCommitResolver returns a CommitResolver for looking up commits in the repository located at path.
func NewStaticCommitResolver ¶
func NewStaticCommitResolver(c *Commit, logger logger.Logger) CommitResolver
NewStaticCommitResolver returns a CommitResolver whose Lookup method always produces a Commit with values matching the fields in c.
type Metadata ¶
type Metadata struct {
AuthoredAt time.Time `yaml:":authored_at,omitempty"`
AuthorEmail string `yaml:":author_email,omitempty"`
AuthorName string `yaml:":author_name,omitempty"`
Branch string `yaml:":branch"`
BuildURL string `yaml:":build_url"`
Check string `yaml:":check"`
CIProvider string `yaml:":ci_provider"`
CommitMessage string `yaml:":commit_message,omitempty"`
CommitMetadataSource string `yaml:":commit_metadata_source"`
CommitSHA string `yaml:":commit"`
CommittedAt time.Time `yaml:":committed_at,omitempty"`
CommitterEmail string `yaml:":committer_email,omitempty"`
CommitterName string `yaml:":committer_name,omitempty"`
QuotaID string `yaml:":quota_id,omitempty"`
RepoNameWithOwner string `yaml:":repo_name_with_owner"`
ReporterOS string `yaml:":reporter_os"`
ReporterVersion string `yaml:":reporter_version"`
Tags []string `yaml:":tags,omitempty"`
Timestamp time.Time `yaml:":timestamp"`
TreeSHA string `yaml:":tree,omitempty"`
// contains filtered or unexported fields
}
A Metadata instance provides metadata about a set of test results. It identifies the CI provider, the commit SHA, the time at which the tests were executed, etc.
func NewMetadata ¶
func NewMetadata(version *Version, envs map[string]string, tags []string, quotaID string, resolver CommitResolver, now func() time.Time, logger logger.Logger) (*Metadata, error)
NewMetadata creates a new Metadata instance from the given args.
func (*Metadata) MarshalYAML ¶
MarshalYAML serializes the metadata into a YAML document.