Nanguan Lin and CaiCandong
0de09d3afc
Remove the useless function GetUserIssueStats and move relevant tests to indexer_test.go ( #27067 )
...
Since the issue indexer has been refactored, the issue overview webpage
is built by the `buildIssueOverview` function and underlying
`indexer.Search` function and `GetIssueStats` instead of
`GetUserIssueStats`. So the function is no longer used.
I moved the relevant tests to `indexer_test.go` and since the search
option changed from `IssueOptions` to `SearchOptions`, most of the tests
are useless now.
We need more tests about the db indexer because those tests are highly
connected with the issue overview webpage and now this page has several
bugs.
Any advice about those test cases is appreciated.
---------
Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com >
2023-09-14 12:35:53 -04:00
Nanguan Lin
a457eb9415
Apply lng2020 to maintainers ( #27068 )
...
Hi all,
I've very much enjoyed working on Gitea and was hoping to make it
official by requesting maintainership.
My [merged PRs
list](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+sort%3Aupdated-desc+author%3Alng2020+is%3Amerged )
2023-09-14 12:10:12 +08:00
Nanguan Lin and caicandong
da50be7360
Replace 'userxx' with 'orgxx' in all test files when the user type is org ( #27052 )
...
Currently 'userxx' and 'orgxx' are both used as username in test files
when the user type is org, which is confusing. This PR replaces all
'userxx' with 'orgxx' when the user type is org(`user.type==1`).
Some non-trivial changes
1. Rename `user3` dir to `org3` in `tests/git-repositories-meta`
2. Change `end` in `issue reference` because 'org3' is one char shorter
than 'user3'

3. Change the search result number of `user/repo2` because
`user3/repo21` can't be searched now

4. Change the first org name getting from API because the result is
ordered by alphabet asc and now `org 17` is before `org25`


Other modifications are just find all and replace all.
Unit tests with SQLite are all passed.
---------
Co-authored-by: caicandong <1290147055@qq.com >
2023-09-14 02:59:53 +00:00
Nanguan Lin and techknowlogick
cda97a7253
Update status and code index after changing the default branch ( #27018 )
...
Fix #26723
Add `ChangeDefaultBranch` to the `notifier` interface and implement it
in `indexerNotifier`. So when changing the default branch,
`indexerNotifier` sends a message to the `indexer queue` to update the
index.
---------
Co-authored-by: techknowlogick <matti@mdranta.net >
2023-09-13 04:43:31 +00:00
Nanguan Lin
1ee4882b88
Fix the missing repo count ( #26942 )
...
The commit
(https://github.com/go-gitea/gitea/commit/958d148043a6ace08776b1fd5ec0a5859144dea0 )
forgot two pages 😝

BTW, the `leave` button is in a weird position
2023-09-07 01:44:47 +00:00
Nanguan Lin
01e71e2a47
Fix the secret regexp pattern on web page ( #26910 )
...
The error is caused by the web page not handling the post form
failure, which is 400 bad requests in this case.
2023-09-05 20:15:19 +00:00
Nanguan Lin
f1fe102c8c
Fix wrong review requested number ( #26784 )
...
Fix the wrong review requested number mentioned by #18808 .
Fix #18808
Before:

After:

2023-09-03 02:12:38 +00:00