summaryrefslogtreecommitdiffstats
path: root/models/issue_lock.go
Commit message (Collapse)AuthorAgeFilesLines
* Fix CheckRepoStats and reuse it during migration (#18264)Aravinth Manivannan2022-01-171-1/+1
| | | | | | | | | | | | | | | | | | | The CheckRepoStats function missed the following counters: - label num_closed_issues & num_closed_pulls - milestone num_closed_issues & num_closed_pulls The update SQL statements for updating the repository num_closed_issues & num_closed_pulls fields were repeated in three functions (repo.CheckRepoStats, migrate.insertIssues and models.Issue.updateClosedNum) and were moved to a single helper. The UpdateRepoStats is implemented and called in the Finish migration method so that it happens immediately instead of wating for the CheckRepoStats to run. Signed-off-by: Loïc Dachary loic@dachary.org --- [source](https://lab.forgefriends.org/forgefriends/forgefriends/-/merge_requests/34)
* Move user related model into models/user (#17781)Lunny Xiao2021-11-241-2/+5
| | | | | | | | | | | | | * Move user related model into models/user * Fix lint for windows * Fix windows lint * Fix windows lint * Move some tests in models * Merge
* Move attachment into models/repo/ (#17650)Lunny Xiao2021-11-191-6/+6
| | | | | | | * Move attachment into models/repo/ * Fix test * Fix bug
* DBContext is just a Context (#17100)zeripath2021-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * DBContext is just a Context This PR removes some of the specialness from the DBContext and makes it context This allows us to simplify the GetEngine code to wrap around any context in future and means that we can change our loadRepo(e Engine) functions to simply take contexts. Signed-off-by: Andrew Thornton <art27@cantab.net> * fix unit tests Signed-off-by: Andrew Thornton <art27@cantab.net> * another place that needs to set the initial context Signed-off-by: Andrew Thornton <art27@cantab.net> * avoid race Signed-off-by: Andrew Thornton <art27@cantab.net> * change attachment error Signed-off-by: Andrew Thornton <art27@cantab.net>
* Move db related basic functions to models/db (#17075)Lunny Xiao2021-09-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * Move db related basic functions to models/db * Fix lint * Fix lint * Fix test * Fix lint * Fix lint * revert unnecessary change * Fix test * Fix wrong replace string * Use *Context * Correct committer spelling and fix wrong replaced words Co-authored-by: zeripath <art27@cantab.net>
* chore(models): rewrite code format. (#14754)Bo-Yi Wu2021-03-141-1/+1
| | | | | | | | | | | | | | | * chore: rewrite format. * chore: update format Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * chore: update format Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * chore: Adjacent parameters with the same type should be grouped together * chore: update format.
* remove unused method and rename createcommentWithNoAction (#9367)Lunny Xiao2019-12-161-1/+1
|
* Remove unused comment actions (#9222)Lunny Xiao2019-12-021-6/+1
| | | | | | * Remove unused comment actions * improve code
* Extract createComment (#9125)Lunny Xiao2019-11-301-2/+7
| | | | | | | | * Extract createComment * fix lint * fix lint
* Move change issue title from models to issue service package (#8456)Lunny Xiao2019-10-111-4/+13
| | | | | | | | * move change issue title from models to issue service package * make the change less * fix typo
* Implement "conversation lock" for issue comments (#5073)Lanre Adelowo2019-02-181-0/+51