mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
hide issues from org private repos w/o team assignment (#4034)
This commit is contained in:
committed by
techknowlogick
parent
46d19c4676
commit
0b3ea42847
@@ -25,10 +25,15 @@ func removeCommitsUnitType(x *xorm.Engine) (err error) {
|
||||
Created time.Time `xorm:"-"`
|
||||
}
|
||||
|
||||
type Team struct {
|
||||
ID int64
|
||||
UnitTypes []int `xorm:"json"`
|
||||
}
|
||||
|
||||
// Update team unit types
|
||||
const batchSize = 100
|
||||
for start := 0; ; start += batchSize {
|
||||
teams := make([]*models.Team, 0, batchSize)
|
||||
teams := make([]*Team, 0, batchSize)
|
||||
if err := x.Limit(batchSize, start).Find(&teams); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -36,7 +41,7 @@ func removeCommitsUnitType(x *xorm.Engine) (err error) {
|
||||
break
|
||||
}
|
||||
for _, team := range teams {
|
||||
ut := make([]models.UnitType, 0, len(team.UnitTypes))
|
||||
ut := make([]int, 0, len(team.UnitTypes))
|
||||
for _, u := range team.UnitTypes {
|
||||
if u < V16UnitTypeCommits {
|
||||
ut = append(ut, u)
|
||||
|
Reference in New Issue
Block a user