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
repo.diff.committed_by GitHub
repo.diff.parent 1f00bc44b2
repo.diff.commit 1c039b4e1e
repo.diff.stats_desc%!(EXTRA int=3, int=172, int=16)

repo.diff.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
}