You've already forked go-semantic-release
feat(config): add option for draft, prerelease, provider: user, accesstoken
This commit is contained in:
@@ -17,12 +17,16 @@ type ChangelogConfig struct {
|
|||||||
|
|
||||||
// GithubConfig struct
|
// GithubConfig struct
|
||||||
type GithubConfig struct {
|
type GithubConfig struct {
|
||||||
URL string `yaml:"url"`
|
URL string `yaml:"url"`
|
||||||
|
User string `yaml:"user"`
|
||||||
|
AccessToken string `yaml:"accessToken"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GitlabConfig struct
|
// GitlabConfig struct
|
||||||
type GitlabConfig struct {
|
type GitlabConfig struct {
|
||||||
URL string `yaml:"url"`
|
URL string `yaml:"url"`
|
||||||
|
User string `yaml:"user"`
|
||||||
|
AccessToken string `yaml:"accessToken"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Asset struct {
|
type Asset struct {
|
||||||
@@ -32,13 +36,14 @@ type Asset struct {
|
|||||||
|
|
||||||
// ReleaseConfig struct
|
// ReleaseConfig struct
|
||||||
type ReleaseConfig struct {
|
type ReleaseConfig struct {
|
||||||
CommitFormat string `yaml:"commitFormat"`
|
CommitFormat string `yaml:"commitFormat"`
|
||||||
Branch map[string]string `yaml:"branch"`
|
Branch map[string]string `yaml:"branch"`
|
||||||
Changelog ChangelogConfig `yaml:"changelog,omitempty"`
|
Changelog ChangelogConfig `yaml:"changelog,omitempty"`
|
||||||
Release string `yaml:"release,omitempty"`
|
Release string `yaml:"release,omitempty"`
|
||||||
Github map[string]string `yaml:"github"`
|
Github GitlabConfig `yaml:"github, omitempty"`
|
||||||
Gitlab map[string]string `yaml:"gitlab"`
|
Gitlab GitlabConfig `yaml:"gitlab, omitempty"`
|
||||||
Assets []Asset `yaml:"assets"`
|
Assets []Asset `yaml:"assets"`
|
||||||
|
IsPreRelease, IsDraft bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read ReleaseConfig
|
// Read ReleaseConfig
|
||||||
@@ -57,5 +62,7 @@ func Read(configPath string) (*ReleaseConfig, error) {
|
|||||||
|
|
||||||
log.Debugf("Found config %+v", releaseConfig)
|
log.Debugf("Found config %+v", releaseConfig)
|
||||||
|
|
||||||
return &releaseConfig, nil
|
return &ReleaseConfig{
|
||||||
|
IsPreRelease: false,
|
||||||
|
IsDraft: false}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user