Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more strict #23766

Merged
merged 5 commits into from
Mar 29, 2023

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Mar 28, 2023

Follow #21962

After I eat my own dogfood, I would say that ONLY_SHOW_RELEVANT_REPOS=false is necessary for many private/enterprise instances, because many private repositories do not have "description/topic", users just want to search by their names.

This PR also adds PageIsExploreRepositories check, to make code more strict, because the search template is shared for different purpose.

And during the test, I found a bug that the "Search" button didn't respect the "relevant" parameter, so this PR fixes the bug by the way together.

I think this PR needs to be backported.


Update: backport done. For 1.19 stable release, you can use the nightly build from https://dl.gitea.com/gitea/1.19/ or docker gitea:1.19-dev, everything is back.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 28, 2023
@lunny lunny added the type/enhancement An improvement of existing functionality label Mar 28, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2023

Codecov Report

Merging #23766 (ac72824) into main (f521e88) will decrease coverage by 0.01%.
The diff coverage is 37.70%.

❗ Current head ac72824 differs from pull request most recent head 23d6ec0. Consider uploading reports for the commit 23d6ec0 to get more accurate results

@@            Coverage Diff             @@
##             main   #23766      +/-   ##
==========================================
- Coverage   47.14%   47.14%   -0.01%     
==========================================
  Files        1149     1155       +6     
  Lines      151446   152502    +1056     
==========================================
+ Hits        71397    71893     +496     
- Misses      71611    72116     +505     
- Partials     8438     8493      +55     
Impacted Files Coverage Δ
cmd/dump.go 0.66% <0.00%> (-0.01%) ⬇️
cmd/web.go 0.00% <0.00%> (ø)
models/actions/run.go 1.64% <0.00%> (-0.08%) ⬇️
models/actions/runner.go 1.44% <ø> (ø)
models/packages/package.go 45.45% <0.00%> (-1.13%) ⬇️
models/user/search.go 77.50% <0.00%> (-6.29%) ⬇️
modules/actions/workflows.go 0.00% <0.00%> (ø)
modules/context/context.go 64.54% <0.00%> (-3.53%) ⬇️
modules/doctor/storage.go 30.65% <0.00%> (-1.29%) ⬇️
modules/setting/git.go 45.45% <ø> (ø)
... and 38 more

... and 51 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@silverwind silverwind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it, I also have a cases of repos that are forks, but still "relevant" to searches as they are not only used to feed PRs to the base repo, but actual standalone repos that just have originated via forking.

@silverwind silverwind 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 Mar 28, 2023
@silverwind silverwind added this to the 1.20.0 milestone Mar 28, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 29, 2023
@jolheiser
Copy link
Member

🎺 🤖

@jolheiser jolheiser merged commit e57e114 into go-gitea:main Mar 29, 2023
@jolheiser jolheiser removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 29, 2023
@wxiaoguang wxiaoguang deleted the fix-explore-repo branch March 29, 2023 13:43
wxiaoguang added a commit to wxiaoguang/gitea that referenced this pull request Mar 29, 2023
…re strict (go-gitea#23766)

Follow go-gitea#21962

After I eat my own dogfood, I would say that
ONLY_SHOW_RELEVANT_REPOS=false is necessary for many private/enterprise
instances, because many private repositories do not have
"description/topic", users just want to search by their names.

This PR also adds `PageIsExploreRepositories` check, to make code more
strict, because the `search` template is shared for different purpose.

And during the test, I found a bug that the "Search" button didn't
respect the "relevant" parameter, so this PR fixes the bug by the way
together.

I think this PR needs to be backported.
# Conflicts:
#	templates/explore/repo_search.tmpl
jolheiser pushed a commit that referenced this pull request Mar 30, 2023
…re strict (#23766) (#23791)

Follow #21962

After I eat my own dogfood, I would say that
ONLY_SHOW_RELEVANT_REPOS=false is necessary for many private/enterprise
instances, because many private repositories do not have
"description/topic", users just want to search by their names.

This PR also adds `PageIsExploreRepositories` check, to make code more
strict, because the `search` template is shared for different purpose.

And during the test, I found a bug that the "Search" button didn't
respect the "relevant" parameter, so this PR fixes the bug by the way
together.
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 31, 2023
* upstream/main:
  [skip ci] Updated translations via Crowdin
  Fix dropdown direction behavior (go-gitea#23806)
  Fix incorrect/Improve error handle in edit user page (go-gitea#23805)
  Fix "Updating branch by merge" bug in "update_branch_by_merge.tmpl" (go-gitea#23790)
  Fix incorrect visibility dropdown list in add/edit user page (go-gitea#23804)
  Convert issue list checkboxes to native (go-gitea#23596)
  Fix checks for `needs` in Actions (go-gitea#23789)
  Diff improvements (go-gitea#23553)
  [Patch] Fix closed PR also triggers Webhooks and actions (go-gitea#23782)
  Improve backport-locales.go (go-gitea#23807)
  [skip ci] Updated translations via Crowdin
  Refactor commit status for Actions jobs (go-gitea#23786)
  Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more strict (go-gitea#23766)
  Don't apply the group filter when listing LDAP group membership if it is empty (go-gitea#23745)
@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/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants