gitea/templates
Gregorius Bima Kharisma Wicaksana b6ffe0e4e9
refactor: extract helper functions from SearchIssues (#36158)
## Summary

This PR refactors the `SearchIssues` function in
`routers/api/v1/repo/issue.go` by extracting common logic into reusable
helper functions:

- `parseIssueIsClosed()`: Parses the "state" query parameter and returns
the corresponding `isClosed` option
- `parseIssueIsPull()`: Parses the "type" query parameter and returns
the corresponding `isPull` option
- `buildSearchIssuesRepoIDs()`: Builds the list of repository IDs for
issue search based on query parameters

### Benefits:
- Improved code readability
- Smaller, more focused functions
- Easier to test individual components
- Potential for reuse in other handlers

### Changes:
- Extracted 3 helper functions from the ~292 line `SearchIssues`
function
- No functional changes - behavior remains the same
- Proper error handling preserved

## Test plan
- [ ] Verify existing API tests pass
- [ ] Manual testing of `/repos/issues/search` endpoint

Ref: #35015

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-20 17:57:41 -08:00
..
admin Allow admins to rename non-local users (#35970) 2025-11-23 20:59:55 +00:00
api/packages/pypi Fix links in PyPI Simple Repository API page (#30594) 2024-04-20 01:15:14 +00:00
base Convert locale files from ini to json format (#35489) 2025-12-19 09:50:48 -08:00
custom
devtest Refactor mail template and support preview (#34990) 2025-07-09 10:25:25 +08:00
explore Forks repository list page follow other repositories page (#34784) 2025-06-21 12:27:25 -07:00
mail Fix various bugs (#35684) 2025-10-19 00:37:50 +08:00
org Fix package link setting can only list limited repositories (#35394) 2025-09-11 01:50:17 +02:00
package Fix various bugs (#36139) 2025-12-12 18:56:05 +00:00
projects Change project default column icon to 'star' (#35967) 2025-11-18 10:55:27 +02:00
repo Convert locale files from ini to json format (#35489) 2025-12-19 09:50:48 -08:00
shared Convert locale files from ini to json format (#35489) 2025-12-19 09:50:48 -08:00
status Convert locale files from ini to json format (#35489) 2025-12-19 09:50:48 -08:00
swagger refactor: extract helper functions from SearchIssues (#36158) 2025-12-20 17:57:41 -08:00
user Contribution heatmap improvements (#35876) 2025-11-06 09:23:48 +01:00
webhook Fix incorrect tailwind migration (#30007) 2024-03-22 20:51:29 +01:00
home.tmpl Convert locale files from ini to json format (#35489) 2025-12-19 09:50:48 -08:00
install.tmpl Fix various trivial frontend problems (#34263) 2025-04-24 09:11:54 +08:00
post-install.tmpl Add post-installation redirect based on admin account status (#34493) 2025-06-21 18:48:06 +00:00