Skip to content

Commit

Permalink
Ensure branch template and PR title are not empty strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Oct 23, 2023
1 parent 85da7f4 commit eeec816
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/webhooks/github/actions/distribute_releases.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ func newDistributeReleases(logger *zap.SugaredLogger, client *clients.Github, ra
if typedConfig.SourceRepositoryURL == "" {
return nil, fmt.Errorf("source repository-url must be specified")
}
if typedConfig.BranchTemplate != nil {
if typedConfig.BranchTemplate != nil && *typedConfig.BranchTemplate != "" {
branchTemplate = *typedConfig.BranchTemplate
}
if typedConfig.CommitMsgTemplate != nil {
commitMessageTemplate = *typedConfig.CommitMsgTemplate
}
if typedConfig.PullRequestTitle != nil {
if typedConfig.PullRequestTitle != nil && *typedConfig.PullRequestTitle != "" {
pullRequestTitle = *typedConfig.PullRequestTitle
}

Expand Down

0 comments on commit eeec816

Please sign in to comment.