You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/tests
wxiaoguang dd8bc1d61d
Refactor issue template parsing and fix API endpoint (#29069) (#29140)
Backport #29069

The old code `GetTemplatesFromDefaultBranch(...) ([]*api.IssueTemplate,
map[string]error)` doesn't really follow Golang's habits, then the
second returned value might be misused. For example, the API function
`GetIssueTemplates` incorrectly checked the second returned value and
always responds 500 error.

This PR refactors GetTemplatesFromDefaultBranch to
ParseTemplatesFromDefaultBranch and clarifies its behavior, and fixes
the API endpoint bug, and adds some tests.

And by the way, add proper prefix `X-` for the header generated in
`checkDeprecatedAuthMethods`, because non-standard HTTP headers should
have `X-` prefix, and it is also consistent with the new code in
`GetIssueTemplates`
1 year ago
..
e2e Change green buttons to primary color (#27099) 1 year ago
fuzz Rework markup link rendering (#26745) (#28803) 1 year ago
gitea-lfs-meta Test views of LFS files (#22196) 2 years ago
gitea-repositories-meta Fix reverting a merge commit failing (#28794) (#28825) 1 year ago
integration Refactor issue template parsing and fix API endpoint (#29069) (#29140) 1 year ago
testdata/data/attachments/a/0 Allow get release download files and lfs files with oauth2 token format (#26430) (#27379) 1 year ago
mssql.ini.tmpl Remove duplicated notify mail configuration on tests (#26912) 1 year ago
mysql.ini.tmpl Remove duplicated notify mail configuration on tests (#26912) 1 year ago
mysql8.ini.tmpl Do not use deprecated log config options by default (#26592) 2 years ago
pgsql.ini.tmpl Remove duplicated notify mail configuration on tests (#26912) 1 year ago
sqlite.ini.tmpl Do not use deprecated log config options by default (#26592) 2 years ago
test_utils.go Allow get release download files and lfs files with oauth2 token format (#26430) (#27379) 1 year ago