Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Commit ¶
type Commit struct { SHA string AuthorName string AuthorEmail string Time time.Time Message string }
Commit defines information for a given commit. This information is normally populated from the local vcs environment. Attributes can be overwritten by CI specific properties and variables.
type GetMetadataFunc ¶
GetMetadataFunc defines a function that fetches data for a given vcs implementation.
type Metadata ¶
type Metadata struct { Branch Branch Commit Commit PullRequest *PullRequest Pipeline *Pipeline }
Metadata holds a snapshot of information for a given environment and vcs system. PullRequest and Pipeline properties are only populated if running in a CI system.
func GetMetadata ¶
GetMetadata fetches vcs metadata for the given environment. GetMetadata will attempt to try and find a GetMetadataFunc for the environment using env variables to determine the CI system. If GetMetadata cannot determine the CI system it falls back to getting the metadata from the local git filesystem.