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
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 Fix user avatar (#33439) 3 weeks ago
agit Add reviewers selection to new pull request (#32403) 3 months ago
asymkey Fix some pending problems (#29985) 11 months ago
attachment Include file extension checks in attachment API (#32151) 4 months ago
auth Backport 1.23 (#32868) 2 months ago
automerge Add new event commit status creation and webhook implementation (#27151) 4 months ago
context Fix raw file API ref handling (#33172) (#33189) 1 month ago
contexttest Check if reverse proxy is correctly configured (#30890) 10 months ago
convert Make tracked time representation display as hours (#33315) (#33334) 1 month ago
cron Enable tenv and testifylint rules (#32852) 2 months ago
doctor Move team related functions to service layer (#32537) 3 months ago
externalaccount allow synchronizing user status from OAuth2 login providers (#31572) 7 months ago
feed Enable tenv and testifylint rules (#32852) 2 months ago
forms Fix commit status events (#33320) (#33493) 2 weeks ago
gitdiff Enable tenv and testifylint rules (#32852) 2 months ago
indexer Update issue indexer after merging a PR (#30715) 10 months ago
issue Rework suggestion backend (#33538) (#33546) 2 weeks ago
lfs Fix SSH LFS memory usage (#33455) (#33460) 3 weeks ago
mailer Support for email addresses containing uppercase characters when activating user account (#32998) (#33001) 2 months ago
markup Refactor markup render system (#32612) 3 months ago
migrations Remove aws go sdk package dependency (#33029) (#33047) 2 months ago
mirror Fix mirror bug (#33224) (#33225) 1 month ago
notify Add new event commit status creation and webhook implementation (#27151) 4 months ago
oauth2_provider Introduce OrgList and add LoadTeams, optimaze Load teams for orgs (#32543) 3 months ago
org Enable tenv and testifylint rules (#32852) 2 months ago
packages Use ProtonMail/go-crypto to replace keybase/go-crypto (#33402) (#33410) 4 weeks ago
projects Fix unnecessary comment when moving issue on the same project column (#33496) (#33499) 2 weeks ago
pull Add missing transaction when set merge (#33113) 2 months ago
release Enable tenv and testifylint rules (#32852) 2 months ago
repository Fix system admin cannot fork or get private fork with API (#33401) (#33417) 4 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 Move team related functions to service layer (#32537) 3 months ago
webhook Fix commit status events (#33320) (#33493) 2 weeks ago
webtheme Initial support for colorblindness-friendly themes (#30625) 10 months ago
wiki Use global lock instead of NewExclusivePool to allow distributed lock between multiple Gitea instances (#31813) 6 months ago