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/services/issue
wxiaoguang ee242a08e9
Refactor issue template parsing and fix API endpoint (#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`
12 months ago
..
assignee.go Move notification interface to services layer (#26915) 1 year ago
assignee_test.go Remove deadcode under models/issues (#28536) 1 year ago
comments.go More `db.DefaultContext` refactor (#27265) 1 year ago
commit.go Add context parameter to some database functions (#26055) 2 years ago
commit_test.go Replace 'userxx' with 'orgxx' in all test files when the user type is org (#27052) 1 year ago
content.go More `db.DefaultContext` refactor (#27265) 1 year ago
issue.go Avoid run change title process when the title is same (#27467) 1 year ago
issue_test.go Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
label.go Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
label_test.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
main_test.go make writing main test easier (#27270) 1 year ago
milestone.go Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
milestone_test.go Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
status.go Move notification interface to services layer (#26915) 1 year ago
template.go Refactor issue template parsing and fix API endpoint (#29069) 12 months ago