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

Fix branch pagination error #16805

Merged
merged 2 commits into from
Aug 24, 2021
Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Aug 24, 2021

Fix #16801

Even if default branch is removed from the current page, but the total branches number should be still kept. So that the pagination calculation will be correct.

@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2021

Codecov Report

Merging #16805 (7445215) into main (efaf109) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16805   +/-   ##
=======================================
  Coverage   45.48%   45.48%           
=======================================
  Files         762      762           
  Lines       85973    85973           
=======================================
  Hits        39101    39101           
- Misses      40557    40558    +1     
+ Partials     6315     6314    -1     
Impacted Files Coverage Δ
routers/web/repo/branch.go 56.97% <100.00%> (ø)
models/repo_list.go 77.64% <0.00%> (-0.79%) ⬇️
services/pull/pull.go 42.19% <0.00%> (+0.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efaf109...7445215. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 24, 2021
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 24, 2021
@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 Aug 24, 2021
@zeripath
Copy link
Contributor

Make lgtm work

@zeripath zeripath merged commit 4e761fa into go-gitea:main Aug 24, 2021
@zeripath
Copy link
Contributor

Please send backport

@lunny lunny deleted the lunny/fix_branch_total branch August 25, 2021 02:10
lunny added a commit to lunny/gitea that referenced this pull request Aug 25, 2021
Fix go-gitea#16801

Even if default branch is removed from the current page, but the total branches number should be still kept. So that the pagination calculation will be correct.
zeripath pushed a commit that referenced this pull request Aug 25, 2021
Backport #16805

Fix #16801

Even if default branch is removed from the current page, but the total branches number should be still kept. So that the pagination calculation will be correct.
@zeripath zeripath added the backport/done All backports for this PR have been created label Aug 25, 2021
zeripath added a commit to zeripath/gitea that referenced this pull request Sep 2, 2021
## [1.15.1](https://github.com/go-gitea/gitea/releases/tag/v1.15.1) - 2021-09-02

* BUGFIXES
  * Allow BASIC authentication access to /:owner/:repo/releases/download/* (go-gitea#16916) (go-gitea#16923)
  * Prevent leave changes dialogs due to autofill fields (go-gitea#16912) (go-gitea#16920)
  * Ignore review comment when ref commit is missed (go-gitea#16905) (go-gitea#16919)
  * Fix wrong attachment removal (go-gitea#16915) (go-gitea#16917)
  * Gitlab Migrator: dont ignore reactions of last request (go-gitea#16903) (go-gitea#16913)
  * Correctly return the number of Repositories for Organizations (go-gitea#16807) (go-gitea#16911)
  * Test if LFS object is accessible (go-gitea#16865) (go-gitea#16904)
  * Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (go-gitea#16899) (go-gitea#16900)
  * Fix dump and restore respository (go-gitea#16698) (go-gitea#16898)
  * Repare and Improve GetDiffRangeWithWhitespaceBehavior (go-gitea#16894) (go-gitea#16895)
  * Fix wiki raw commit diff/patch view (go-gitea#16891) (go-gitea#16892)
  * Ensure wiki repos are all closed (go-gitea#16886) (go-gitea#16888)
  * List limited and private orgs if authenticated on API (go-gitea#16866) (go-gitea#16879)
  * Simplify split diff view generation and remove JS dependency (go-gitea#16775) (go-gitea#16863)
  * Ensure that the default visibility is set on the user create page (go-gitea#16845) (go-gitea#16862)
  * In Render tolerate not being passed a context (go-gitea#16842) (go-gitea#16858)
  * Upgrade xorm to v1.2.2 (go-gitea#16663) & Add test to ensure that dumping of login sources remains correct (go-gitea#16847) (go-gitea#16848)
  * Report the correct number of pushes on the feeds (go-gitea#16811) (go-gitea#16822)
  * Add primary_key to issue_index (go-gitea#16813) (go-gitea#16820)
  * Prevent NPE on empty commit (go-gitea#16812) (go-gitea#16819)
  * Fix branch pagination error (go-gitea#16805) (go-gitea#16816)
  * Add missing return to handleSettingRemoteAddrError (go-gitea#16794) (go-gitea#16795)
  * Remove spurious / from issues.opened_by (go-gitea#16793)
  * Ensure that template compilation panics are sent to the logs (go-gitea#16788) (go-gitea#16792)
  * Update caddyserver/certmagic (go-gitea#16789) (go-gitea#16790)

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath mentioned this pull request Sep 2, 2021
zeripath added a commit that referenced this pull request Sep 2, 2021
## [1.15.1](https://github.com/go-gitea/gitea/releases/tag/v1.15.1) - 2021-09-02

* BUGFIXES
  * Allow BASIC authentication access to /:owner/:repo/releases/download/* (#16916) (#16923)
  * Prevent leave changes dialogs due to autofill fields (#16912) (#16920)
  * Ignore review comment when ref commit is missed (#16905) (#16919)
  * Fix wrong attachment removal (#16915) (#16917)
  * Gitlab Migrator: dont ignore reactions of last request (#16903) (#16913)
  * Correctly return the number of Repositories for Organizations (#16807) (#16911)
  * Test if LFS object is accessible (#16865) (#16904)
  * Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900)
  * Fix dump and restore respository (#16698) (#16898)
  * Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895)
  * Fix wiki raw commit diff/patch view (#16891) (#16892)
  * Ensure wiki repos are all closed (#16886) (#16888)
  * List limited and private orgs if authenticated on API (#16866) (#16879)
  * Simplify split diff view generation and remove JS dependency (#16775) (#16863)
  * Ensure that the default visibility is set on the user create page (#16845) (#16862)
  * In Render tolerate not being passed a context (#16842) (#16858)
  * Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16848)
  * Report the correct number of pushes on the feeds (#16811) (#16822)
  * Add primary_key to issue_index (#16813) (#16820)
  * Prevent NPE on empty commit (#16812) (#16819)
  * Fix branch pagination error (#16805) (#16816)
  * Add missing return to handleSettingRemoteAddrError (#16794) (#16795)
  * Remove spurious / from issues.opened_by (#16793)
  * Ensure that template compilation panics are sent to the logs (#16788) (#16792)
  * Update caddyserver/certmagic (#16789) (#16790)

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this pull request Sep 2, 2021
## [1.15.1](https://github.com/go-gitea/gitea/releases/tag/v1.15.1) - 2021-09-02

* BUGFIXES
  * Allow BASIC authentication access to /:owner/:repo/releases/download/* (go-gitea#16916) (go-gitea#16923)
  * Prevent leave changes dialogs due to autofill fields (go-gitea#16912) (go-gitea#16920)
  * Ignore review comment when ref commit is missed (go-gitea#16905) (go-gitea#16919)
  * Fix wrong attachment removal (go-gitea#16915) (go-gitea#16917)
  * Gitlab Migrator: dont ignore reactions of last request (go-gitea#16903) (go-gitea#16913)
  * Correctly return the number of Repositories for Organizations (go-gitea#16807) (go-gitea#16911)
  * Test if LFS object is accessible (go-gitea#16865) (go-gitea#16904)
  * Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (go-gitea#16899) (go-gitea#16900)
  * Fix dump and restore respository (go-gitea#16698) (go-gitea#16898)
  * Repare and Improve GetDiffRangeWithWhitespaceBehavior (go-gitea#16894) (go-gitea#16895)
  * Fix wiki raw commit diff/patch view (go-gitea#16891) (go-gitea#16892)
  * Ensure wiki repos are all closed (go-gitea#16886) (go-gitea#16888)
  * List limited and private orgs if authenticated on API (go-gitea#16866) (go-gitea#16879)
  * Simplify split diff view generation and remove JS dependency (go-gitea#16775) (go-gitea#16863)
  * Ensure that the default visibility is set on the user create page (go-gitea#16845) (go-gitea#16862)
  * In Render tolerate not being passed a context (go-gitea#16842) (go-gitea#16858)
  * Upgrade xorm to v1.2.2 (go-gitea#16663) & Add test to ensure that dumping of login sources remains correct (go-gitea#16847) (go-gitea#16848)
  * Report the correct number of pushes on the feeds (go-gitea#16811) (go-gitea#16822)
  * Add primary_key to issue_index (go-gitea#16813) (go-gitea#16820)
  * Prevent NPE on empty commit (go-gitea#16812) (go-gitea#16819)
  * Fix branch pagination error (go-gitea#16805) (go-gitea#16816)
  * Add missing return to handleSettingRemoteAddrError (go-gitea#16794) (go-gitea#16795)
  * Remove spurious / from issues.opened_by (go-gitea#16793)
  * Ensure that template compilation panics are sent to the logs (go-gitea#16788) (go-gitea#16792)
  * Update caddyserver/certmagic (go-gitea#16789) (go-gitea#16790)

Signed-off-by: Andrew Thornton <art27@cantab.net>
techknowlogick pushed a commit that referenced this pull request Sep 2, 2021
## [1.15.1](https://github.com/go-gitea/gitea/releases/tag/v1.15.1) - 2021-09-02

* BUGFIXES
  * Allow BASIC authentication access to /:owner/:repo/releases/download/* (#16916) (#16923)
  * Prevent leave changes dialogs due to autofill fields (#16912) (#16920)
  * Ignore review comment when ref commit is missed (#16905) (#16919)
  * Fix wrong attachment removal (#16915) (#16917)
  * Gitlab Migrator: dont ignore reactions of last request (#16903) (#16913)
  * Correctly return the number of Repositories for Organizations (#16807) (#16911)
  * Test if LFS object is accessible (#16865) (#16904)
  * Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900)
  * Fix dump and restore respository (#16698) (#16898)
  * Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895)
  * Fix wiki raw commit diff/patch view (#16891) (#16892)
  * Ensure wiki repos are all closed (#16886) (#16888)
  * List limited and private orgs if authenticated on API (#16866) (#16879)
  * Simplify split diff view generation and remove JS dependency (#16775) (#16863)
  * Ensure that the default visibility is set on the user create page (#16845) (#16862)
  * In Render tolerate not being passed a context (#16842) (#16858)
  * Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16848)
  * Report the correct number of pushes on the feeds (#16811) (#16822)
  * Add primary_key to issue_index (#16813) (#16820)
  * Prevent NPE on empty commit (#16812) (#16819)
  * Fix branch pagination error (#16805) (#16816)
  * Add missing return to handleSettingRemoteAddrError (#16794) (#16795)
  * Remove spurious / from issues.opened_by (#16793)
  * Ensure that template compilation panics are sent to the logs (#16788) (#16792)
  * Update caddyserver/certmagic (#16789) (#16790)

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created 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.

Not all branches shown in branch pagination
5 participants