summaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* Shows total tracked time in issue and milestone list (#3341)Jonas Franz2018-04-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Show total tracked time in issue and milestone list Show total tracked time at issue page Signed-off-by: Jonas Franz <info@jonasfranz.software> * Optimizing TotalTimes by using SumInt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fixing wrong total times for milestones caused by a missing JOIN Adding unit tests for total times Signed-off-by: Jonas Franz <info@jonasfranz.software> * Logging error instead of ignoring it Signed-off-by: Jonas Franz <info@jonasfranz.software> * Correcting spelling mistakes Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change error message to a short version Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add error handling to TotalTimes Add variable for totalTimes Signed-off-by: Jonas Franz <info@jonasfranz.de> * Introduce TotalTrackedTimes as variable of issue Load TotalTrackedTimes by loading attributes of IssueList Load TotalTrackedTimes by loading attributes of single issue Add Sec2Time as helper to use it in templates Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fixed test + gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Load TotalTrackedTimes via MilestoneList instead of single requests Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add documentation for MilestoneList Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add documentation for MilestoneList Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix test Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change comment from SQL query to description Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit test by using int64 instead of int Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit test by using int64 instead of int Signed-off-by: Jonas Franz <info@jonasfranz.software> * Check if timetracker is enabled Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix test by enabling timetracking Signed-off-by: Jonas Franz <info@jonasfranz.de>
* don't reset team/repo count when updating team via API (#3831)Morgan Bazalgette2018-04-291-7/+4
| | | fixes #3600
* Add topic support (#3711)Lunny Xiao2018-04-115-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | * add topic models and unit tests * fix comments * fix comment * add the UI to show or add topics for a repo * show topics on repositories list * fix test * don't show manage topics link when no permission * use green basic as topic label * fix topic label color * remove trace content * remove debug function
* fix go vet error (#3740)Lunny Xiao2018-03-301-1/+1
|
* refactor: import order. (#3736)Bo-Yi Wu2018-03-2918-31/+36
|
* Correctly check http git access rights for reverse proxy authorized users ↵Lauris BH2018-03-291-20/+20
| | | | (#3721)
* Add repository setting to enable/disable health checks (#3607)Allen Wild2018-03-271-0/+18
| | | | | | | | | | | | | | New Feature: * Repository struct field for IsFsckEnabled (default true of course) * Admin Settings section on repo options page, accessible only by admin users Possible Enhancements: * There's no way to force running health checks on all repos regardless of their IsFsckEnabled setting. This would be useful if there were an admin API or dashboard button to run fsck immediately. Issue: https://github.com/go-gitea/gitea/issues/1712 Signed-off-by: Allen Wild <allenwild93@gmail.com>
* Add protected branch whitelists for merging (#3689)Chri-s2018-03-251-1/+6
| | | | | | | | * Add database migrations for merge whitelist * Add merge whitelist settings for protected branches * Add checks for merge whitelists
* Change protected branch settings title to existing locale entry (#3694)Chri-s2018-03-211-1/+1
|
* Fix style of "In your repositories" when selected (#3699)Alex Ward2018-03-201-1/+1
| | | Signed-off-by: Alex Ward <alxwrd@googlemail.com>
* Global code search support (#3664)Lunny Xiao2018-03-163-1/+119
| | | | | | | | | | | | * add global code search on explore * fix bug when no anyone public repos * change the icon * fix typo and add UnitTypeCode check for login non-admin user * fix ui description when no match
* Refactor and simplify redirect to url (#3674)Lauris BH2018-03-154-24/+8
|
* Added checks for protected branches in pull requests (#3544)Chri-s2018-03-131-0/+9
| | | | | | | | | | | | | | | | | | * Added checks for protected branches in pull requests Signed-off-by: Christian Wulff <NChris@posteo.net> * Moved check for protected branch into new function CheckUserAllowedToMerge Signed-off-by: Christian Wulff <NChris@posteo.net> * Removed merge conflict lines from last commit Signed-off-by: Christian Wulff <NChris@posteo.net> * Explicit check for error type in ViewIssue Signed-off-by: Christian Wulff <NChris@posteo.net>
* Add label descriptions (#3662)Lauris BH2018-03-131-6/+9
| | | | | | * Add label descriptions * Add default descriptions to label template
* Added issue search via api (#3612)kolaente2018-03-071-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Started implementing issue api search * Implemented issue search via api * Added search to swagger.json * Removed todo * fmt * Added comment to generate swagger json via "generate-swagger" * Simplified search * fmt * Removed unessecary comment * Removed unessecary declaration of the issues-variable * Removed unessecary comment * Removed unessecary comment * Added explanation keyword * Simplified check for empty keyword * corrected check if keyword is empty
* Add Attachment API (#3478)Jonas Franz2018-03-065-5/+350
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
* Log attachment blocked events (#3615)Mahmoud Al-Qudsi2018-03-051-0/+1
| | | | | | Include both a log entry and the blocked mime type in the gitea log when an attachment upload is blocked. Chosen log level is info; this may need to be dialed down to trace.
* Add admin dashboard option to run health checks (#3606)Allen Wild2018-03-021-0/+4
| | | | | There's one for git gc, why not git fsck too? Also add a couple more trace logs to GitFsck to see progress
* Rework special link parsing in the post-processing of markup (#3354)Morgan Bazalgette2018-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Get rid of autolink * autolink in markdown * Replace email addresses with mailto links * better handling of links * Remove autolink.js from footer * Refactor entire html.go * fix some bugs * Make tests green, move what we can to html_internal_test, various other changes to processor logic * Make markdown tests work again This is just a description to allow me to force push in order to restart the drone build. * Fix failing markdown tests in routers/api/v1/misc * Add license headers, log errors, future-proof <body> * fix formatting
* Fix missing translations when updating username. (#3564)bugreport02018-02-251-3/+3
| | | | | | | | * Fix missing translations when updating username. * Fix reserved username translated string test. * Fix 'username reserved' string test a bit more.
* refactor: reduce sql query in retrieveFeeds (#3547)Bo-Yi Wu2018-02-211-31/+8
|
* Populate URL field of API commits (#3546)Ethan Koenig2018-02-204-16/+23
| | | | | | * Populate URL field of API commits * fix orgmode_test
* Implements generator cli for secrets (#3531)Codruț Constantin Gușoi2018-02-182-3/+10
| | | Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
* Add option to enable or disable swagger endpoints (#3502)Piotr Orzechowski2018-02-141-2/+7
|
* Improve wiki test (#3493)Ethan Koenig2018-02-131-7/+23
|
* Fix rendering of wiki page list if wiki repo contains other files (#3454)Lauris BH2018-02-051-0/+6
| | | | | | * Fix rendering of wiki page list if wiki repo contains other files * Improve wiki filename tests
* Enable caching on assets and avatars (#3376)Morgan Bazalgette2018-02-041-8/+11
| | | | | | | | | | | | | | * Enable caching on assets and avatars Fixes #3323 * Only set avatar in user BeforeUpdate when there is no avatar set * add error checking after stat * gofmt * Change cache time for avatars to an hour
* Fix branch deletion for squash or rebase merged pull requests (#3425)Lauris BH2018-01-301-31/+15
|
* Change how merged PR commit info are prepared (#3368)Lauris BH2018-01-191-54/+32
| | | | | | | | | | * Change how merged PR commits and diff are made * Update code.gitea.io/git dependency * Fix typo * Remove unneeded local variable
* Fix API-Endpoint release (#3012)Marc Brückner2018-01-162-3/+6
| | | | | | | | | * Fixes API-Endpoint release (#3005) * Using context.ReferencesGitRepo(); doing the same in the PATCH route. * Add release create, get and update test
* Address issues pointed out by @lunny in #3339 (#3352)Morgan Bazalgette2018-01-121-7/+4
|
* Cleanup models.User.HashPassword (#3334)Kim "BKC" Carlbäcker2018-01-124-8/+4
|
* Handle refactor (#3339)Morgan Bazalgette2018-01-1045-554/+558
| | | | | | * Replace all ctx.Handle with ctx.ServerError or ctx.NotFound * Change Handle(403) to NotFound, avoid using macaron's NotFound
* Remove useless fmt.Errorf("%v", err) (#3337)Antoine GIRARD2018-01-091-1/+1
|
* Change EncodePasswd to HashPassword (#3329)Morgan Bazalgette2018-01-084-4/+4
| | | | | | * Change EncodePasswd to HashPassword * Create test+benchmark for HashPassword
* Fix branch name escaping in compare url (#3311)Deyong Zhu2018-01-081-8/+14
| | | | * Fixes #3303
* Serve .patch for pull requests (#3305)Sandro Santilli2018-01-072-1/+48
| | | | | | | | | * Serve .patch for pull requests Closes #3259 Updates "git" module, for GetFormatPatch * Handle io.Copy error
* Writable deploy keys (closes #671) (#3225)Vlad Temian2018-01-073-2/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add is_writable checkbox to deploy keys interface * Add writable key option to deploy key form * Add support for writable ssh keys in the interface * Rename IsWritable to ReadOnly * Test: create read-only and read-write deploy keys via api * Add DeployKey access mode migration * Update gitea sdk via govendor * Fix deploykey migration * Add unittests for writable deploy keys * Move template text to locale * Remove implicit column update * Remove duplicate locales * Replace ReadOnly field with IsReadOnly method * Fix deploy_keys related integration test * Rename v54 migration with v55 * Fix migration hell
* Add Pull Request merge options - Ignore white-space for conflict checking, ↵Lauris BH2018-01-056-7/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rebase, Squash merge (#3188) * Pull request options migration and UI in settings * Add ignore whitespace functionality * Fix settings if pull requests are disabled * Fix migration transaction * Merge with Rebase functionality * UI changes and related functionality for pull request merging button * Implement squash functionality * Fix rebase merging * Fix pull request merge tests * Add squash and rebase tests * Fix API method to reuse default message functions * Some refactoring and small fixes * Remove more hardcoded values from tests * Remove unneeded check from API method * Fix variable name and comment typo * Fix reset commit count after PR merge
* Serve pull request .diff files (#3293)Sandro Santilli2018-01-052-1/+38
| | | | | | | | | | | | * Serve pull request .diff files Closes #3259 * Add test for pull request redirection and .diff access * Typo * There's no need to test for pr.BaseRepo being nil after calling GetBaseRepo
* Fix swagger docs (#3300)Ethan Koenig2018-01-041-7/+7
|
* Fix guide link for webhooks in repository settings (#3291) (#3292)Elouan Martinet2018-01-031-1/+1
| | | Signed-off-by: Elouan Martinet <exa@elou.world>
* Fix bugs in issue dashboard stats (#3073)Ethan Koenig2017-12-263-8/+29
|
* Fix ignored errors when checking if organization, team member (#3177)Ethan Koenig2017-12-219-64/+130
|
* Support default private when creating or migrating repository (#3239)Lunny Xiao2017-12-201-2/+15
| | | | | | | | | | * support default private when creating or migrating repository * fix fmt * use string constants on repository default private in app.ini * fix fmt
* Check ignored errors for issue and milestone count (#3213)Ethan Koenig2017-12-181-1/+5
|
* Unit tests for routers/repo/issue_label (#3198)Ethan Koenig2017-12-153-8/+168
|
* Improvements for supporting UI Location (#3146)Lunny Xiao2017-12-141-1/+1
| | | | | | * improvements for supporting UI Location * improved the comment
* Fix wiki page list not rendering after updatedunix changes (#3175)Lauris BH2017-12-131-7/+7
|
* Mention completion for issue editor. (#3136)harry2017-12-112-0/+3
| | | | | | | | | | * new issue mention * Mention completion on new issue and view issue page. * Code format. * Require tribute in pull request page.