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
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 Revert "Feature: Support workflow event dispatch via API (#32059)" (#33541) 2 weeks ago
agit User facing messages for AGit errors (#33012) 4 weeks ago
asymkey Move delete deploy keys into service layer (#32201) 2 months ago
attachment Include file extension checks in attachment API (#32151) 4 months ago
auth Add basic auth support to rss/atom feeds (#33371) 4 weeks ago
automerge Automerge supports deleting branch automatically after merging (#32343) 2 months ago
context Refactor web route handler (#33488) 3 weeks ago
contexttest Refactor request context (#32956) 2 months ago
convert Make tracked time representation display as hours (#33315) 1 month ago
cron Enable tenv and testifylint rules (#32852) 2 months ago
doctor Refactor older tests to use testify (#33140) 2 months ago
externalaccount allow synchronizing user status from OAuth2 login providers (#31572) 7 months ago
feed Refactor RefName (#33234) 1 month ago
forms Fix commit status events (#33320) 3 weeks ago
gitdiff Add go wrapper around git diff-tree --raw -r -M (#33369) 3 weeks ago
indexer Update issue indexer after merging a PR (#30715) 10 months ago
issue Rework suggestion backend (#33538) 2 weeks ago
lfs Fix SSH LFS memory usage (#33455) 4 weeks ago
mailer chore: fix some trivial problems and TODOs (#33473) 3 weeks ago
markup Refactor request context (#32956) 2 months ago
migrations refactor: decouple context from migration structs (#33399) 3 weeks ago
mirror Fix mirror bug (#33224) 1 month ago
notify Refactor repository transfer (#33211) 4 weeks ago
oauth2_provider Introduce OrgList and add LoadTeams, optimaze Load teams for orgs (#32543) 3 months ago
org Refactor tests (#33021) 2 months ago
packages Support choose email when creating a commit via web UI (#33432) 4 weeks ago
projects Fix unnecessary comment when moving issue on the same project column (#33496) 3 weeks ago
pull Automerge supports deleting branch automatically after merging (#32343) 2 months ago
release Refactor "string truncate" (#32984) 2 months ago
repository Move gitgraph from modules to services layer (#33527) 3 weeks ago
secrets Refactor deletion (#28610) 1 year ago
task Fix "force private" logic (#31012) 9 months ago
uinotification Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
user Refactor repository transfer (#33211) 4 weeks ago
webhook Fix commit status events (#33320) 3 weeks ago
webtheme Initial support for colorblindness-friendly themes (#30625) 10 months ago
wiki Refactor older tests to use testify (#33140) 2 months ago