Skip to content

Conversation

@yardenshoham
Copy link
Member

Backport #23114

The Admin Repository Management page and the Explore Repository page both use the RenderRepoSearch function. In this function, the OnlyShowRelevant search option is true when querying repositories for admin page.

repos, count, err = repo_model.SearchRepository(ctx, &repo_model.SearchRepoOptions{
ListOptions: db.ListOptions{
Page: page,
PageSize: opts.PageSize,
},
Actor: ctx.Doer,
OrderBy: orderBy,
Private: opts.Private,
Keyword: keyword,
OwnerID: opts.OwnerID,
AllPublic: true,
AllLimited: true,
TopicOnly: topicOnly,
Language: language,
IncludeDescription: setting.UI.SearchRepoDescription,
OnlyShowRelevant: onlyShowRelevant,
})

Refer to #19361, the repositories with is_empty=true will be hidden if OnlyShowRelevant is true.

Administrators should be able to see all repositories. So OnlyShowRelevant shouldn't be set to true .

The **Admin Repository Management** page and the **Explore Repository**
page both use the `RenderRepoSearch` function. In this function, the
`OnlyShowRelevant` search option is `true` when querying repositories
for admin page.


https://github.com/go-gitea/gitea/blob/edf98a2dc30956c8e04b778bb7f1ce55c14ba963/routers/web/explore/repo.go#L99-L115

Refer to
[go-gitea#19361](https://github.com/go-gitea/gitea/pull/19361/files#diff-8058dfb85557010e0592d586675ec62ce406af7068e6311f39c160deac37f149R497),
the repositories with `is_empty=true` will be hidden if
`OnlyShowRelevant` is `true`.

Administrators should be able to see all repositories. So
`OnlyShowRelevant` shouldn't be set to `true` .

---------

Co-authored-by: Andrew Thornton <[email protected]>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Feb 24, 2023
@zeripath zeripath added this to the 1.18.6 milestone Feb 24, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 24, 2023
@yardenshoham yardenshoham marked this pull request as draft February 24, 2023 19:30
@yardenshoham
Copy link
Member Author

Feel free to push if you know how to make lint pass

@zeripath
Copy link
Contributor

Hmm. May be this doesn't need to be backported?

@yardenshoham
Copy link
Member Author

Yep, let's not

@yardenshoham yardenshoham removed this from the 1.18.6 milestone Feb 24, 2023
@zeripath zeripath modified the milestone: 1.18.6 Feb 24, 2023
@yardenshoham yardenshoham deleted the backport-23114-v1.18 branch February 25, 2023 19:19
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants