service

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package service wraps engine interfaces with common logic unrelated to any particular engine implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Title        string
	Labels       []string
	BranchRegexp *regexp.Regexp
}

Category describes pull request category with its title, which will be derived to template and labels, that indicates the belonging to this category.

type ReleaseNotesBuilder

type ReleaseNotesBuilder struct {
	Template     string
	Categories   []Category
	IgnoreLabels []string
	UnusedTitle  string
	SortField    string
	// contains filtered or unexported fields
}

ReleaseNotesBuilder provides methods to form changelog.

func (*ReleaseNotesBuilder) Build

func (s *ReleaseNotesBuilder) Build(version string, closedPRs []git.PullRequest) (string, error)

Build builds the changelog for the tag.

type Service

type Service struct {
	Engine              engine.Interface
	ReleaseNotesBuilder *ReleaseNotesBuilder
	Notifier            notify.Destination
}

Service wraps repository storage and services

func (*Service) ReleaseBetween

func (s *Service) ReleaseBetween(ctx context.Context, from, to string) error

ReleaseBetween makes a release between two commit SHAs.

func (*Service) ReleaseTag

func (s *Service) ReleaseTag(ctx context.Context, tagName string) error

ReleaseTag aggregates the changelog from the changes of the latest tag and its predecessor and notifies consumers via provided notifier.

Jump to

Keyboard shortcuts

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