gitea/routers/web/repo
Lunny Xiao 72518a8dab
Rework suggestion backend (#33538)
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: wxiaoguang <wxiaoguang@gmail.com>
2025-02-10 16:24:05 +07:00
..
actions Revert "Feature: Support workflow event dispatch via API (#32059)" (#33541) 2025-02-10 17:44:42 +07:00
setting Fix commit status events (#33320) 2025-02-04 03:25:59 +07:00
activity.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
attachment.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
blame.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
branch.go Fix "redirect link" handling (#33440) 2025-01-31 04:12:14 +07:00
cherry_pick.go Support choose email when creating a commit via web UI (more) (#33445) 2025-01-31 02:36:18 +07:00
code_frequency.go Fix incorrect ref commit ID usage (#33331) 2025-01-20 07:43:49 +07:00
commit.go Move gitgraph from modules to services layer (#33527) 2025-02-07 03:05:25 +07:00
compare.go Refactor "string truncate" (#32984) 2024-12-26 11:56:03 +07:00
contributors.go Fix incorrect ref commit ID usage (#33331) 2025-01-20 07:43:49 +07:00
download.go Use gitrepo.GetTreePathLatestCommit to get file lastest commit instead from latest commit cache (#32987) 2024-12-30 03:30:01 +07:00
editor.go Support choose email when creating a commit via web UI (more) (#33445) 2025-01-31 02:36:18 +07:00
editor_test.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
find.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
fork.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
githttp.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
githttp_test.go
helper.go Refactor context RefName and RepoAssignment (#33226) 2025-01-13 01:07:05 +07:00
issue.go Merge updatecommentattachment functions (#33044) 2024-12-30 18:21:57 +07:00
issue_comment.go Use `CloseIssue` and `ReopenIssue` instead of `ChangeStatus` (#32467) 2024-12-25 07:38:30 +07:00
issue_content_history.go Refactor DateUtils and merge TimeSince (#32409) 2024-11-04 11:30:00 +07:00
issue_dependency.go Trivial fixes (#33304) 2025-01-17 08:55:02 +07:00
issue_label.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
issue_label_test.go Remove duplicate "ResponseWriter.Status" method (#33346) 2025-01-22 06:37:52 +07:00
issue_list.go Use `CloseIssue` and `ReopenIssue` instead of `ChangeStatus` (#32467) 2024-12-25 07:38:30 +07:00
issue_lock.go
issue_new.go Use project's redirect url instead of composing url (#33058) 2024-12-31 19:19:53 +07:00
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) 2025-01-07 10:50:09 +07:00
issue_pin.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
issue_poster.go Support public code/issue access for private repositories (#33127) 2025-01-14 01:53:34 +07:00
issue_stopwatch.go Issue time estimate, meaningful time tracking (#23113) 2024-12-05 13:07:53 +07:00
issue_suggestions.go Rework suggestion backend (#33538) 2025-02-10 16:24:05 +07:00
issue_test.go
issue_timetrack.go Make tracked time representation display as hours (#33315) 2025-01-19 09:30:44 +07:00
issue_view.go Add a option "--user-type bot" to admin user create, improve role display (#27885) 2025-02-07 08:41:55 +07:00
issue_watch.go Trivial fixes (#33304) 2025-01-17 08:55:02 +07:00
main_test.go
middlewares.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
migrate.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
milestone.go Refactor pagination (#33037) 2024-12-30 01:57:38 +07:00
packages.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
patch.go Support choose email when creating a commit via web UI (more) (#33445) 2025-01-31 02:36:18 +07:00
projects.go Use project's redirect url instead of composing url (#33058) 2024-12-31 19:19:53 +07:00
projects_test.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
pull.go Automerge supports deleting branch automatically after merging (#32343) 2025-01-10 03:51:03 +07:00
pull_review.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
pull_review_test.go Refactor older tests to use testify (#33140) 2025-01-09 09:21:47 +07:00
recent_commits.go Fix incorrect ref commit ID usage (#33331) 2025-01-20 07:43:49 +07:00
release.go Fix incorrect TagName/BranchName usages (#33279) 2025-01-15 17:34:55 +07:00
release_test.go Validate that the tag doesn't exist when creating a tag via the web (#33241) 2025-01-14 09:27:35 +07:00
render.go Fix incorrect ref "blob" (#33240) 2025-01-13 16:27:11 +07:00
repo.go Refactor web route handler (#33488) 2025-02-05 02:14:03 +07:00
search.go Fix incorrect ref commit ID usage (#33331) 2025-01-20 07:43:49 +07:00
search_test.go
star.go Refactor web route handler (#33488) 2025-02-05 02:14:03 +07:00
topic.go
transfer.go Refactor web route handler (#33488) 2025-02-05 02:14:03 +07:00
treelist.go
view.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
view_file.go Simplify context ref name (#33267) 2025-01-15 11:15:47 +07:00
view_home.go Fix "redirect link" handling (#33440) 2025-01-31 04:12:14 +07:00
view_readme.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
view_test.go
watch.go Refactor web route handler (#33488) 2025-02-05 02:14:03 +07:00
webgit.go Support choose email when creating a commit via web UI (more) (#33445) 2025-01-31 02:36:18 +07:00
wiki.go Refactor pagination (#33037) 2024-12-30 01:57:38 +07:00
wiki_test.go Remove duplicate "ResponseWriter.Status" method (#33346) 2025-01-22 06:37:52 +07:00