use our libraries and include pr categories

This commit is contained in:
2024-01-14 10:52:48 +01:00
parent 73b432ec85
commit 56650ff20f
6 changed files with 48 additions and 23 deletions

View File

@@ -20,6 +20,11 @@ type DrafterConfig struct {
ConfigPath string
}
type Category struct {
Title string `yaml:"title"`
Labels []string `yaml:"labels"`
}
// NewFromInputs creates a new drafter config by using the action inputs and the github context
func NewFromInputs(action *githubactions.Action) (*DrafterConfig, error) {
actionCtx, err := action.Context()

View File

@@ -14,7 +14,8 @@ type RepoConfig struct {
// NameTemplate template for the release name
NameTemplate string `mapstructure:"name-template"`
// TagTemplate template for the release tag
TagTemplate string `mapstructure:"tag-template"`
TagTemplate string `mapstructure:"tag-template"`
Categories []Category `yaml:"categories"`
VersionResolver struct {
Major struct {
Labels []string