mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 13:35:50 +01:00
Enhance repository creation / deletion for issues:
- Insert initial record into ISSUE_ID in repository creation - Delete all records of ISSUE_ID and ISSUES in repository deletion
This commit is contained in:
@@ -40,15 +40,25 @@ trait RepositoryService { self: AccountService =>
|
|||||||
registeredDate = currentDate,
|
registeredDate = currentDate,
|
||||||
updatedDate = currentDate,
|
updatedDate = currentDate,
|
||||||
lastActivityDate = currentDate)
|
lastActivityDate = currentDate)
|
||||||
|
|
||||||
|
IssueId insert (userName, repositoryName, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
def deleteRepository(userName: String, repositoryName: String): Unit = {
|
def deleteRepository(userName: String, repositoryName: String): Unit = {
|
||||||
Collaborators
|
Collaborators
|
||||||
.filter { c => (c.userName is userName.bind) && (c.repositoryName is repositoryName.bind) }
|
.filter { t => (t.userName is userName.bind) && (t.repositoryName is repositoryName.bind) }
|
||||||
|
.delete
|
||||||
|
|
||||||
|
IssueId
|
||||||
|
.filter { t => (t.userName is userName.bind) && (t.repositoryName is repositoryName.bind) }
|
||||||
|
.delete
|
||||||
|
|
||||||
|
Issues
|
||||||
|
.filter { t => (t.userName is userName.bind) && (t.repositoryName is repositoryName.bind) }
|
||||||
.delete
|
.delete
|
||||||
|
|
||||||
Repositories
|
Repositories
|
||||||
.filter { r => (r.userName is userName.bind) && (r.repositoryName is repositoryName.bind) }
|
.filter { t => (t.userName is userName.bind) && (t.repositoryName is repositoryName.bind) }
|
||||||
.delete
|
.delete
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user