< Summary - go-semantic-release Coverage

Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 69
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
String0%00100%

File(s)

/home/runner/work/go-semantic-release/go-semantic-release/internal/domain/lifecycle.go

#LineLine coverage
 1package domain
 2
 3// Step represents a named step in the release lifecycle.
 4type Step string
 5
 6const (
 7  StepVerifyConditions Step = "verifyConditions"
 8  StepAnalyzeCommits   Step = "analyzeCommits"
 9  StepVerifyRelease    Step = "verifyRelease"
 10  StepGenerateNotes    Step = "generateNotes"
 11  StepPrepare          Step = "prepare"
 12  StepPublish          Step = "publish"
 13  StepAddChannel       Step = "addChannel"
 14  StepSuccess          Step = "success"
 15  StepFail             Step = "fail"
 16)
 17
 18// String returns the string representation of the lifecycle step.
 919func (s Step) String() string {
 920  return string(s)
 921}
 22
 23// StepOrder defines the canonical execution order for lifecycle steps.
 24var StepOrder = []Step{
 25  StepVerifyConditions,
 26  StepAnalyzeCommits,
 27  StepVerifyRelease,
 28  StepGenerateNotes,
 29  StepPrepare,
 30  StepPublish,
 31  StepAddChannel,
 32  StepSuccess,
 33  StepFail,
 34}
 35
 36// ReleaseContext holds all state passed through the lifecycle pipeline.
 37type ReleaseContext struct {
 38  Config         Config
 39  Branch         string
 40  BranchPolicy   *BranchPolicy
 41  Projects       []Project
 42  Commits        []Commit
 43  Plan           *ReleasePlan
 44  Result         *ReleaseResult
 45  DryRun         bool
 46  CI             bool
 47  RepositoryURL  string
 48  RepositoryRoot string
 49
 50  // Per-project state populated during pipeline execution.
 51  CurrentProject *ProjectReleasePlan
 52  Notes          string // generated release notes for current project
 53  TagName        string
 54  Error          error // set when fail step is invoked
 55}
 56
 57// GitIdentity configures the git author/committer for automated commits.
 58type GitIdentity struct {
 59  Name  string `mapstructure:"name"`
 60  Email string `mapstructure:"email"`
 61}
 62
 63// DefaultGitIdentity returns the default bot identity.
 64func DefaultGitIdentity() GitIdentity {
 65  return GitIdentity{
 66    Name:  "semantic-release-bot",
 67    Email: "semantic-release-bot@users.noreply.github.com",
 68  }
 69}

Methods/Properties

String