Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2023-09-30 01:07:50 +03:00
parent 3ef2a5d7ce
commit 67058f3883

View File

@ -95,6 +95,14 @@ func main() {
}
}
if cfg.PullRequestBody == "" {
cfg.PullRequestBody = DefaultPullRequestBody
}
if cfg.PullRequestTitle == "" {
cfg.PullRequestTitle = DefaultPullRequestTitle
}
path := "."
if len(os.Args) > 1 {
path = os.Args[1]
@ -185,7 +193,7 @@ func giteaPullRequest(ctx context.Context, cfg *Config, mods map[string]modules.
wTitle := bytes.NewBuffer(nil)
tplBody, err := template.New("pull_request_title").Parse(cfg.PullRequestBody)
tplBody, err := template.New("pull_request_body").Parse(cfg.PullRequestBody)
if err != nil {
logger.Fatalf(ctx, "failed to parse template: %v", err)
}