1
0
Fork 0
forked from forgejo/forgejo

Decrease the num_stars when deleting a repo (#11954)

* Decrease the  num_stars when deleting a repo

fix #11949

Signed-off-by: a1012112796 <1012112796@qq.com>

* Add migration

* use batch

* Apply suggestions from code review

Co-authored-by: Lauris BH <lauris@nix.lv>

* fix lint

* fix lint

* fix ci

* fix ci2

* add doctor

* duplicate code

* fix migration

* fix some nits

* add start

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
赵智超 2020-07-08 03:16:34 +08:00 committed by GitHub
parent 88ef04dbe9
commit 12f9dd8fa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 109 additions and 0 deletions

View file

@ -187,3 +187,9 @@ func TestDeleteAvatar(t *testing.T) {
assert.Equal(t, "", repo.Avatar)
}
func TestDoctorUserStarNum(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
assert.NoError(t, DoctorUserStarNum())
}