Closed
Description
Gitea Version
1.15.6
Git Version
2.34.1
Operating System
FreeBSD
How are you running Gitea?
I run Gitea in a FreeBSD jail, installed from the package.
Database
MySQL
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
Description
Hey,
when using an issue template that has an empty labels string (which github accepts), gitea bails out at reading the template with an
2021/12/02 00:31:21 ...ules/context/repo.go:927:IssueTemplatesFromDefaultBranch() [D] ExtractMetadata: yaml: unmarshal errors:
line 4: cannot unmarshal !!str `` into []string
error.
Upon investigating the source, this seems to be coming from the labels key having an empty value in the issue template:
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: ''
assignees: ''
---
<!-- Please don't delete this template or we'll close your issue -->
- [ ] I have read and understood the [FAQ](https://gitea.ksol.io/karolyi/py3-validate-email/src/branch/master/FAQ.md)
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
**My debug output**
Output from the debug run described in the FAQ:
**Expected behavior**
A clear and concise description of what you expected to happen.
**Please complete the following information:**
- OS: [e.g. Linux, FreeBSD, Windows]
- Flavor and Version [e.g. Debian 22, FreeBSD 12.2]
- Your network environment (ISP provided home connecton, or testing from an actual whitelisted server)
- Your exact `py3-validate-email` module version
**Additional context**
Add any other context about the problem here.
I will try and remove that key now and see if it works, but this behavior was accepted with github, whereas it isn't with gitea. A quick fix would be nice to have for it, so other people won't bump into the same problem wondering why issue templates doesn't work after migrating from github.
Screenshots
No response