0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-21 00:34:26 +01:00
gitea/routers
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 +00:00
..
api Revert "Feature: Support workflow event dispatch via API (#32059)" (#33541) 2025-02-10 17:44:42 +08:00
common Support performance trace (#32973) 2025-01-21 18:57:07 +00:00
install Refactor request context (#32956) 2024-12-24 11:43:57 +08:00
private User facing messages for AGit errors (#33012) 2025-01-27 02:33:39 +00:00
utils Refactor older tests to use testify (#33140) 2025-01-09 09:21:47 +08:00
web Rework suggestion backend (#33538) 2025-02-10 16:24:05 +00:00
init.go Prepare for support performance trace (#33286) 2025-01-15 20:05:18 +00:00