aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo
Commit message (Collapse)AuthorAgeFilesLines
* Add separate SSH_USER config option (#17584)Clar Fon2022-02-072-5/+2
| | | Co-authored-by: zeripath <art27@cantab.net>
* API: Return primary language and repository language stats API URL (#18396)Lauris BH2022-01-251-0/+24
|
* format with gofumpt (#18184)65432022-01-204-11/+7
| | | | | | | | | | | * gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
* Propagate context and ensure git commands run in request context (#17868)zeripath2022-01-191-1/+2
| | | | | | | | | This PR continues the work in #17125 by progressively ensuring that git commands run within the request context. This now means that the if there is a git repo already open in the context it will be used instead of reopening it. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Refactor auth package (#17962)Lunny Xiao2022-01-021-2/+1
|
* Use conditions but not repo ids as query condition (#16839)Lunny Xiao2021-12-292-31/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use conditions but not repo ids as query condition * Improve the performance of pulls/issue * Remove duplicated code * fix lint * Fix bug * Fix stats * More fixes * Fix build * Fix lint * Fix test * Fix build * Adjust the logic * Merge * Fix conflicts * improve the performance * Add comments for the query conditions functions * Some improvements
* Prevent hang in git cat-file if repository is not a valid repository and ↵zeripath2021-12-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | other fixes (#17991) This PR contains multiple fixes. The most important of which is: * Prevent hang in git cat-file if the repository is not a valid repository Unfortunately it appears that if git cat-file is run in an invalid repository it will hang until stdin is closed. This will result in deadlocked /pulls pages and dangling git cat-file calls if a broken repository is tried to be reviewed or pulls exists for a broken repository. Fix #14734 Fix #9271 Fix #16113 Otherwise there are a few small other fixes included which this PR was initially intending to fix: * Fix panic on partial compares due to missing PullRequestWorkInProgressPrefixes * Fix links on pulls pages due to regression from #17551 - by making most /issues routes match /pulls too - Fix #17983 * Fix links on feeds pages due to another regression from #17551 but also fix issue with syncing tags - Fix #17943 * Add missing locale entries for oauth group claims * Prevent NPEs if ColorFormat is called on nil users, repos or teams.
* Fix TemplateRepo no longer in models.repo (#17993)Caellion2021-12-161-0/+10
| | | | | | | | | | | | | * Fixes error 500 that appears when trying to browse code of a repository generated from template * forgot to update comment * Update models/repo/repo.go Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> * Update repo.go Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Prevent deadlock in create issue (#17970)zeripath2021-12-132-4/+10
|
* Some repository refactors (#17950)Lunny Xiao2021-12-1216-0/+1448
| | | | | | | | | * some repository refactors * remove unnecessary code * Fix test * Remove unnecessary banner
* Move repository model into models/repo (#17933)Lunny Xiao2021-12-1014-0/+1982
| | | | | | | | | | | | | | | * Some refactors related repository model * Move more methods out of repository * Move repository into models/repo * Fix test * Fix test * some improvements * Remove unnecessary function
* Move repo archiver to models/repo (#17913)Lunny Xiao2021-12-062-0/+110
| | | | | | | | | | | * Move repo archiver to models/repo * Move archiver service into services/repository/ * Fix imports * Fix test * Fix test
* Move attachment into models/repo/ (#17650)Lunny Xiao2021-11-193-0/+416
* Move attachment into models/repo/ * Fix test * Fix bug