summaryrefslogtreecommitdiffstats
path: root/models/repo_generate.go
Commit message (Collapse)AuthorAgeFilesLines
* Avatars and Repo avatars support storing in minio (#12516)Lunny Xiao2020-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avatar support minio * Support repo avatar minio storage * Add missing migration * Fix bug * Fix test * Add test for minio store type on avatars and repo avatars; Add documents * Fix bug * Fix bug * Add back missed avatar link method * refactor codes * Simplify the codes * Code improvements * Fix lint * Fix test mysql * Fix test mysql * Fix test mysql * Fix settings * Fix test * fix test * Fix bug
* API add/generalize pagination (#9452)SpaWn2KiLl2020-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* Move create/fork repository from models to modules/repository (#9489)Lunny Xiao2020-01-121-219/+0
| | | | | | | | | | | | | | | | | | | | * Move create/fork repository from models to modules/repository * fix wrong reference * fix test * fix test * fix lint * Fix DBContext * remove duplicated TestMain * fix lint * fix conflicts
* Add owner_name column for table repository for maintaince reason (#9717)Lunny Xiao2020-01-121-7/+7
| | | | | | | | | | | | | | * Add owner_name column for table repository for maintaince reason * refactor * Fix tests * fix test * fix bug when fork repository Co-authored-by: zeripath <art27@cantab.net>
* Fix nil reference in repo generation (#9660)John Olheiser2020-01-091-29/+31
| | | | | | | | | | * Fix nil reference Signed-off-by: jolheiser <john.olheiser@gmail.com> * Tighten Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Properly enforce gitea environment for pushes (#9501)zeripath2019-12-271-1/+1
| | | #8982 attempted to enforce the gitea environment for pushes - unfortunately it tested the settings before they were actually read in - and therefore does not do that!
* Use ioutil.TmpDir for new created temp directory (#9368)Lunny Xiao2019-12-161-4/+3
| | | | | | * Use os.TmpDir for new created temp directory * fix error message
* Graceful: Cancel Process on monitor pages & HammerTime (#9213)zeripath2019-11-301-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Graceful: Create callbacks to with contexts * Graceful: Say when Gitea is completely finished * Graceful: Git and Process within HammerTime Force all git commands to terminate at HammerTime Force all process commands to terminate at HammerTime Move almost all git processes to run as git Commands * Graceful: Always Hammer after Shutdown * ProcessManager: Add cancel functionality * Fix tests * Make sure that process.Manager.Kill() cancels * Make threadsafe access to Processes and remove own unused Kill * Remove cmd from the process manager as it is no longer used * the default context is the correct context * get rid of double till
* Variable expansion in repository templates (#9163)John Olheiser2019-11-301-3/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start expansion Signed-off-by: jolheiser <john.olheiser@gmail.com> * _template rather than .template Signed-off-by: jolheiser <john.olheiser@gmail.com> * Use ioutil Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add descriptions to mapping * Start globbing Signed-off-by: jolheiser <john.olheiser@gmail.com> * Tune globbing Signed-off-by: jolheiser <john.olheiser@gmail.com> * Re-arrange imports Signed-off-by: jolheiser <john.olheiser@gmail.com> * Don't expand git hooks Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add glob tests for .giteatemplate Signed-off-by: jolheiser <john.olheiser@gmail.com> * Parse globs separately so they can be tested more easily Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change template location and add docs Signed-off-by: jolheiser <john.olheiser@gmail.com> * nit Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update docs/content/doc/features/gitea-directory.md Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update docs/content/doc/features/gitea-directory.md Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Add upper-lower case match Signed-off-by: jolheiser <john.olheiser@gmail.com> * Nits Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update models/repo_generate.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add avatar and issue labels to template repositories (#9149)John Olheiser2019-11-251-0/+50
| | | | | | | | | | * Add avatar and issue labels Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix redundant if-err Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add git hooks and webhooks to template repositories; move to services (#8926)John Olheiser2019-11-241-0/+162
* Add git hooks and webhooks to template options Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update models/repo.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Add tooltip if the user can't edit git hooks Signed-off-by: jolheiser <john.olheiser@gmail.com> * Close repositories after copying git hooks Signed-off-by: jolheiser <john.olheiser@gmail.com> * Wording Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Restructure for services Signed-off-by: jolheiser <john.olheiser@gmail.com> * Return errors Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move GenerateRepository to using a DBContext Signed-off-by: jolheiser <john.olheiser@gmail.com> * Wrap with models.WithTx Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove debug print Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move if-error-delete-repo outside WithTx Signed-off-by: jolheiser <john.olheiser@gmail.com> * Return nil if no repo generated Signed-off-by: jolheiser <john.olheiser@gmail.com>