Fix index produces problem when issues/pulls deleted (#6973)

* fix index produces problem when issues/pulls deleted

* fix tests

* fix tests

* fix tests
This commit is contained in:
Lunny Xiao 2019-05-18 10:37:49 +08:00 committed by GitHub
parent 96b412bb87
commit c385dcc26b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 10 deletions

View file

@ -687,13 +687,6 @@ func (repo *Repository) getUsersWithAccessMode(e Engine, mode AccessMode) (_ []*
return users, nil
}
// NextIssueIndex returns the next issue index
// FIXME: should have a mutex to prevent producing same index for two issues that are created
// closely enough.
func (repo *Repository) NextIssueIndex() int64 {
return int64(repo.NumIssues+repo.NumPulls) + 1
}
var (
descPattern = regexp.MustCompile(`https?://\S+`)
)