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/models
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>
2 weeks ago
..
actions Refactor RefName (#33234) 1 month ago
activities Add missed auto merge feed message on dashboard (#33309) 4 weeks ago
admin Fix javascript error when an anonymous user visiting migration page (#32144) 5 months ago
asymkey Use ProtonMail/go-crypto to replace keybase/go-crypto (#33402) 4 weeks ago
auth Refactor tests (#33021) 2 months ago
avatars Replace 10 more gt- classes with tw- (#29945) 11 months ago
db Refactor context flash msg and global variables (#33375) 1 month ago
dbfs Enable `unparam` linter (#31277) 9 months ago
fixtures Support choose email when creating a commit via web UI (more) (#33445) 4 weeks ago
git Improve sync fork behavior (#33319) 1 month ago
issues Rework suggestion backend (#33538) 2 weeks ago
migrations Automerge supports deleting branch automatically after merging (#32343) 2 months ago
organization Worktime tracking for the organization level (#19808) 3 weeks ago
packages Refactor maven package registry (#33049) 2 months ago
perm Support public code/issue access for private repositories (#33127) 1 month ago
project Add alphabetical project sorting (#33504) 3 weeks ago
pull Automerge supports deleting branch automatically after merging (#32343) 2 months ago
renderhelper Refactor render system (orgmode) (#32671) 3 months ago
repo Refactor repository transfer (#33211) 4 weeks ago
secret Clarify Actions resources ownership (#31724) 7 months ago
shared/types Refactor locale&string&template related code (#29165) 1 year ago
system chore: fix some trivial problems and TODOs (#33473) 3 weeks ago
unit Add `DEFAULT_MIRROR_REPO_UNITS` and `DEFAULT_TEMPLATE_REPO_UNITS` options (#32416) 4 months ago
unittest Refactor ref type (#33242) 1 month ago
user Add a option "--user-type bot" to admin user create, improve role display (#27885) 3 weeks ago
webhook Refactor webhook events (#33337) 1 month ago
main_test.go make writing main test easier (#27270) 1 year ago
repo.go Fix issue comment number (#30556) 2 months ago
repo_test.go Fix issue comment number (#30556) 2 months ago