Fix Bug in Issue Config when only contact links are set (#26521)

Blank Issues should be enabled if they are not explicit disabled through
the `blank_issues_enabled` field of the Issue Config. The Implementation
has currently a Bug: If you create a Issue Config file with only
`contact_links` and without a `blank_issues_enabled` field,
`blank_issues_enabled` is set to false by default.

The fix is only one line, but I decided to also improve the tests to
make sure there are no other problems with the Implementation.

This is a bugfix, so it should be backported to 1.20.
This commit is contained in:
JakobDev 2023-09-28 14:16:40 +02:00 committed by GitHub
parent 1f00bc44b2
commit 1c039b4e1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 172 additions and 16 deletions

View file

@ -72,7 +72,7 @@ func GetTemplateConfig(gitRepo *git.Repository, path string, commit *git.Commit)
return GetDefaultTemplateConfig(), err
}
issueConfig := api.IssueConfig{}
issueConfig := GetDefaultTemplateConfig()
if err := yaml.Unmarshal(configContent, &issueConfig); err != nil {
return GetDefaultTemplateConfig(), err
}