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/routers/web/repo
Giteabot a014d071e4
Rework suggestion backend (#33538) (#33546)
Backport #33538 by @lunny

Fix #33522 

The suggestion backend logic now is

- If the keyword is empty, returned the latest 5 issues/prs with index
desc order
- If the keyword is digital, find all issues/prs which `index` has a
prefix with that, with index asc order
- If the keyword is non-digital or if the queried records less than 5,
searching issues/prs title with a `like`, with index desc order

## Empty keyword
<img width="310" alt="image"
src="https://github.com/user-attachments/assets/1912c634-0d98-4eeb-8542-d54240901f77"
/>

## Digital
<img width="479" alt="image"
src="https://github.com/user-attachments/assets/0356a936-7110-4a24-b21e-7400201bf9b8"
/>

## Digital and title contains the digital
<img width="363" alt="image"
src="https://github.com/user-attachments/assets/6e12f908-28fe-48de-8ccc-09cbeab024d4"
/>

## non-Digital
<img width="435" alt="image"
src="https://github.com/user-attachments/assets/2722bb53-baa2-4d67-a224-522a65f73856"
/>
<img width="477" alt="image"
src="https://github.com/user-attachments/assets/06708dd9-80d1-4a88-b32b-d29072dd1ba6"
/>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 weeks ago
..
actions Trivial fixes (#33304) (#33312) 1 month ago
setting Fix commit status events (#33320) (#33493) 3 weeks ago
activity.go Replace DateTime with DateUtils (#32383) 4 months ago
attachment.go Fix `missing signature key` error when pulling Docker images with `SERVE_DIRECT` enabled (#32365) 4 months ago
blame.go GitHub like repo home page (#32213) 3 months ago
branch.go Support "merge upstream branch" (Sync fork) (#32741) 3 months ago
cherry_pick.go Refactor names (#31405) 8 months ago
code_frequency.go Move context from modules to services (#29440) 1 year ago
commit.go GitHub like repo home page (#32213) 3 months ago
compare.go Refactor markup render system (#32589) 3 months ago
contributors.go Fix Activity Page Contributors dropdown (#31264) 9 months ago
download.go Use gitrepo.GetTreePathLatestCommit to get file lastest commit instead from latest commit cache (#32987) (#33046) 2 months ago
editor.go Notify the user when the file path contains leading or trailing spaces and fix the error message for invalid file names. (#31507) 5 months ago
editor_test.go Refactor names (#31405) 8 months ago
find.go Refactor names (#31405) 8 months ago
fork.go Allow to fork repository into the same owner (#32819) 2 months ago
githttp.go Fix git error handling (#32401) 4 months ago
githttp_test.go Fix http protocol auth (#27875) 1 year ago
helper.go Add option to filter board cards by labels and assignees (#31999) 5 months ago
issue.go Make API "compare" accept commit IDs (#32801) 2 months ago
issue_comment.go Refactor markup render system (#32612) 3 months ago
issue_content_history.go Refactor DateUtils and merge TimeSince (#32409) 4 months ago
issue_dependency.go Trivial fixes (#33304) (#33312) 1 month ago
issue_label.go Refactor sidebar label selector (#32460) 3 months ago
issue_label_test.go Refactor sidebar label selector (#32460) 3 months ago
issue_list.go Add label/author/assignee filters to the user/org home issue list (#32779) 2 months ago
issue_lock.go Move context from modules to services (#29440) 1 year ago
issue_new.go Use project's redirect url instead of composing url (#33058) (#33064) 2 months ago
issue_page_meta.go Filter reviews of one pull request in memory instead of database to reduce slow response because of lacking database index (#33106) (#33128) 2 months ago
issue_pin.go Refactor names (#31405) 8 months ago
issue_poster.go Move some functions from issue.go to standalone files (#32468) 3 months ago
issue_stopwatch.go Issue time estimate, meaningful time tracking (#23113) 3 months ago
issue_suggestions.go Rework suggestion backend (#33538) (#33546) 2 weeks ago
issue_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue_timetrack.go Make tracked time representation display as hours (#33315) (#33334) 1 month ago
issue_view.go Split issue/pull view router function as multiple smaller functions (#32749) 3 months ago
issue_watch.go Trivial fixes (#33304) (#33312) 1 month ago
main_test.go make writing main test easier (#27270) 1 year ago
middlewares.go Move context from modules to services (#29440) 1 year ago
migrate.go Fix javascript error when an anonymous user visiting migration page (#32144) 5 months ago
milestone.go Refactor issue filter (labels, poster, assignee) (#32771) 2 months ago
packages.go Remove AddParamIfExist(AddParam) (#29841) 11 months ago
patch.go Move context from modules to services (#29440) 1 year ago
projects.go Use project's redirect url instead of composing url (#33058) (#33064) 2 months ago
projects_test.go Refactor names (#31405) 8 months ago
pull.go Update go tool dependencies (#32916) (#33355) 1 month ago
pull_review.go Move some functions from issue.go to standalone files (#32468) 3 months ago
pull_review_test.go Fix template error when comment review doesn't exist (#29888) 11 months ago
recent_commits.go Move context from modules to services (#29440) 1 year ago
release.go GitHub like repo home page (#32213) 3 months ago
release_test.go Move context from modules to services (#29440) 1 year ago
render.go Refactor markup render system (#32612) 3 months ago
repo.go Fix broken forms (#33082) 2 months ago
search.go Fix bleve fuzziness search (#33078) (#33087) 2 months ago
search_test.go Improve grep search (#30843) 10 months ago
topic.go Move context from modules to services (#29440) 1 year ago
treelist.go Move context from modules to services (#29440) 1 year ago
view.go GitHub like repo home page (#32213) 3 months ago
view_file.go Support "merge upstream branch" (Sync fork) (#32741) 3 months ago
view_home.go Fix push message behavior (#33215) (#33317) 1 month ago
view_readme.go GitHub like repo home page (#32213) 3 months ago
view_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
wiki.go Make wiki pages visit fast (#32732) 3 months ago
wiki_test.go Enable tenv and testifylint rules (#32852) 2 months ago