gitea/models
oliverpool bb2783860b
fix calReleaseNumCommitsBehind (#24148)
`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. (#23884) 2023-04-06 16:57:30 -04:00
activities Localize activity heatmap (except tooltip) (#24131) 2023-04-17 14:26:01 -04:00
admin
asymkey Prefer native parser for SSH public key parsing (#23798) 2023-04-11 14:34:28 +08:00
auth Fix 500 error if there is a name conflict when edit authentication source (#23832) 2023-03-31 22:32:18 +08:00
avatars Avoid warning for system setting when start up (#23054) 2023-02-24 18:23:13 +08:00
db fix calReleaseNumCommitsBehind (#24148) 2023-04-18 21:11:17 +02:00
dbfs Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
fixtures fix calReleaseNumCommitsBehind (#24148) 2023-04-18 21:11:17 +02:00
git Fix branch protection priority (#24045) 2023-04-11 13:22:49 -04:00
issues Make more functions use ctx instead of db.DefaultContext (#24068) 2023-04-14 14:18:28 -04:00
migrations Add migration to fix external unit access mode of owner/admin team (#24117) 2023-04-15 09:52:44 -04:00
organization Allow repo admins too to delete the repo (#23940) 2023-04-07 11:21:02 -04:00
packages Use ghost user if package creator does not exist (#23822) 2023-04-04 16:14:46 +08:00
perm Rename `repo.GetOwner` to `repo.LoadOwner` (#22967) 2023-02-18 20:11:03 +08:00
project Improve GetBoards and getDefaultBoard (#22981) 2023-04-09 22:07:23 +08:00
pull
repo fix calReleaseNumCommitsBehind (#24148) 2023-04-18 21:11:17 +02:00
secret
system Avoid warning for system setting when start up (#23054) 2023-02-24 18:23:13 +08:00
unit Improve LoadUnitConfig to handle invalid or duplicate units (#23736) 2023-04-03 16:42:38 +08:00
unittest Refactor `setting.Database.UseXXX` to methods (#23354) 2023-03-07 18:51:06 +08:00
user Add new user types `reserved`, `bot`, and `remote` (#24026) 2023-04-17 12:36:50 -04:00
webhook Add user webhooks (#21563) 2023-03-10 08:28:32 -06:00
error.go
fixture_generation.go
fixture_test.go
main_test.go Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
migrate.go
migrate_test.go
org.go
org_team.go Supports wildcard protected branch (#20825) 2023-01-16 16:00:22 +08:00
org_team_test.go
org_test.go
repo.go Avoid warning for system setting when start up (#23054) 2023-02-24 18:23:13 +08:00
repo_collaboration.go
repo_collaboration_test.go Rename `repo.GetOwner` to `repo.LoadOwner` (#22967) 2023-02-18 20:11:03 +08:00
repo_test.go
repo_transfer.go
repo_transfer_test.go