Commit Graph

8 Commits

Author SHA1 Message Date
9a65d011f6 Some fixes of the prompt of new branches ()
Related to 

This PR makes some fixes:
- do not show the prompt for mirror repos and repos with pull request
units disabled
- use `commit_time` instead of `updated_unix`, as `commit_time` is the
real time when the branch was pushed
2023-08-01 07:25:11 +00:00
338d03ce2f Only show newly pushed branches message in the same repository ()
Partly fixes 

This is a quick fix.  will fully fix the bug.
2023-07-26 05:26:31 +00:00
2f31d2d56c Exclude default branch from pushed branch hint ()
When pushing to default branch, no pushing hint should be prompt.
Fix 

---------

Co-authored-by: Giteabot <teabot@gitea.io>
2023-07-10 11:18:55 +00:00
6375419468 Newly pushed branches hints on repository home page ()
This PR will display a pull request creation hint on the repository home
page when there are newly created branches with no pull request. Only
the recent 6 hours and 2 updated branches will be displayed.

Inspired by  
Replace  
Resolves 
Resolves 
Resolves 

co-authored by @kolaente
2023-07-08 05:19:00 +02:00
88f835192d Replace interface{} with any ()
Result of running `perl -p -i -e 's#interface\{\}#any#g' **/*` and `make fmt`.

Basically the same [as golang did](2580d0e08d).
2023-07-04 18:36:08 +00:00
cea9401634 Following-up improvments for various PRs ()
For:

* 
* 
* 
* 
2023-07-01 14:00:10 -04:00
65acd1e9ef Fix branch commit message too long problem ()
When branch's commit CommitMessage is too long, the column maybe too
short.(TEXT 16K for mysql).
This PR will fix it to only store the summary because these message will
only show on branch list or possible future search?
2023-06-30 17:03:05 +08:00
6e19484f4d Sync branches into databases ()
Related 
Related  
Related 
Close 
Related  

This PR will change all the branches retrieve method from reading git
data to read database to reduce git read operations.

- [x] Sync git branches information into database when push git data
- [x] Create a new table `Branch`, merge some columns of `DeletedBranch`
into `Branch` table and drop the table `DeletedBranch`.
- [x] Read `Branch` table when visit `code` -> `branch` page
- [x] Read `Branch` table when list branch names in `code` page dropdown
- [x] Read `Branch` table when list git ref compare page
- [x] Provide a button in admin page to manually sync all branches.
- [x] Sync branches if repository is not empty but database branches are
empty when visiting pages with branches list
- [x] Use `commit_time desc` as the default FindBranch order by to keep
consistent as before and deleted branches will be always at the end.

---------

Co-authored-by: Jason Song <i@wolfogre.com>
2023-06-29 10:03:20 +00:00