1
0
Fork 0
forgejo/models
oliverpool bb2783860b
fix calReleaseNumCommitsBehind ()
`repoCtx.CommitsCount` is not reliably the commit count of the default
branch (Repository.GetCommitsCount depends on what is currently
displayed).

For instance on the releases page the commit count is correct:
https://codeberg.org/Codeberg/pages-server/releases


![2023-04-15-215027](https://user-images.githubusercontent.com/3864879/232250500-6c05dc00-7030-4ec9-87f1-18c7797d36bf.png)

However it is not on the single page:
https://codeberg.org/Codeberg/pages-server/releases/tag/v4.6.2


![2023-04-15-215036](https://user-images.githubusercontent.com/3864879/232250503-620c8038-7c2c-45a1-b99d-cb994ef955a6.png)

This PR fixes this by removing a "fast branch" which was using this
field (I think this field should be removed, since it is a bit
unpredictable - but this would mean a larger refactoring PR).

_contributed in the context of @forgejo_

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-04-18 21:11:17 +02:00
..
actions Treat PRs with agit flow as fork PRs when triggering actions. () 2023-04-06 16:57:30 -04:00
activities Localize activity heatmap (except tooltip) () 2023-04-17 14:26:01 -04:00
admin
asymkey Prefer native parser for SSH public key parsing () 2023-04-11 14:34:28 +08:00
auth Fix 500 error if there is a name conflict when edit authentication source () 2023-03-31 22:32:18 +08:00
avatars
db fix calReleaseNumCommitsBehind () 2023-04-18 21:11:17 +02:00
dbfs
fixtures fix calReleaseNumCommitsBehind () 2023-04-18 21:11:17 +02:00
git Fix branch protection priority () 2023-04-11 13:22:49 -04:00
issues Make more functions use ctx instead of db.DefaultContext () 2023-04-14 14:18:28 -04:00
migrations Add migration to fix external unit access mode of owner/admin team () 2023-04-15 09:52:44 -04:00
organization Allow repo admins too to delete the repo () 2023-04-07 11:21:02 -04:00
packages Use ghost user if package creator does not exist () 2023-04-04 16:14:46 +08:00
perm
project Improve GetBoards and getDefaultBoard () 2023-04-09 22:07:23 +08:00
pull
repo fix calReleaseNumCommitsBehind () 2023-04-18 21:11:17 +02:00
secret
system
unit Improve LoadUnitConfig to handle invalid or duplicate units () 2023-04-03 16:42:38 +08:00
unittest
user Add new user types reserved, bot, and remote () 2023-04-17 12:36:50 -04:00
webhook
error.go
fixture_generation.go
fixture_test.go
main_test.go
migrate.go
migrate_test.go
org.go
org_team.go
org_team_test.go
org_test.go
repo.go
repo_collaboration.go
repo_collaboration_test.go
repo_test.go
repo_transfer.go
repo_transfer_test.go