summaryrefslogtreecommitdiffstats
path: root/routers/repo
Commit message (Collapse)AuthorAgeFilesLines
* Fix topics addition (Another solution) (#4031) (#4258)Alexey Terentyev2018-06-211-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added topics validation, fixed repo topics duplication (#4031) Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Added tests Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Fixed fmt Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Added comments to exported functions Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Deleted RemoveDuplicateTopics function Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Fixed messages Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Added migration Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * fmt migration file Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * fixed lint Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Added Copyright Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Added query solution for duplicates Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Fixed migration query Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Changed RegExp. Fixed migration Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * fmt migration file Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Fixed test for changed regexp Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Removed validation log messages Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Renamed migration file Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Renamed validate function Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
* Fix webhook type conflation. (#4285)Russell Aunger2018-06-211-1/+1
| | | | | | - Fix typo that caused Gogs hooks to be created as Gitea hooks. - Fix typo that caused Gogs hooks to be duplicated upon edit (though this bug was masked by the previous one). Signed-off-by: Russell Aunger <rba@live.com>
* HTML-escape text READMEs (#4192)nickolas3602018-06-101-2/+6
|
* Added deletion of an empty line at the end of the file (#4050) (#4054)Alexey Terentyev2018-05-291-0/+4
| | | Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
* Fix wiki redirects (#3919)Michael Kuhn2018-05-281-2/+2
| | | | When creating or editing a wiki page, the redirect to the wiki page does not work because the file name is used instead of the page name.
* fix bugs caused by #3929 (#3999)Lunny Xiao2018-05-231-1/+1
|
* Fix some webhooks bugs (#3981)Lunny Xiao2018-05-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | * fix some webhooks bugs * update vendor Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * fix test * fix clearlabels * fix pullrequest webhook bug fix #3492 * update release webhook description * remove unused code * fix push webhook in pull request * small changes
* Add more webhooks support and refactor webhook templates directory (#3929)Lunny Xiao2018-05-162-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | * add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * update vendor Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * load attributes when created release * update comparsion doc
* fix blank topic (#3948)Lunny Xiao2018-05-111-1/+5
|
* Multiple assignees (#3705)kolaente2018-05-092-27/+53
|
* Issue due date (#3794)kolaente2018-05-011-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
* Fix path cleanup in multiple places (#3871)Lauris BH2018-05-011-2/+2
|
* 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>
* Add topic support (#3711)Lunny Xiao2018-04-112-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | * 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
|
* 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-161-1/+2
| | | | | | | | | | | | * 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-151-5/+1
|
* 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
* 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.
* 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
* 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
* Handle refactor (#3339)Morgan Bazalgette2018-01-1021-348/+348
| | | | | | * Replace all ctx.Handle with ctx.ServerError or ctx.NotFound * Change Handle(403) to NotFound, avoid using macaron's NotFound
* 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-071-1/+47
| | | | | | | | | * 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-072-1/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-053-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-051-1/+37
| | | | | | | | | | | | * 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 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-261-1/+1
|
* Fix ignored errors when checking if organization, team member (#3177)Ethan Koenig2017-12-214-42/+50
|
* 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
|
* 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.
* Refactor struct's time to remove unnecessary memory usage (#3142)Lunny Xiao2017-12-113-8/+10
| | | | | | | | | | | | | | * refactor struct's time to remove unnecessary memory usage * use AsTimePtr simple code * fix tests * fix time compare * fix template on gpg * use AddDuration instead of Add
* Improve LFS tests + fix lfs url refs + keep path upper/lowercase in db. (#3092)Antoine GIRARD2017-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Add failing test * Fix urls * Improve url in tests * improve testing * Remove debug code * Add deps * LFS corner-case : Search on lower but store with case * Temporary comment of blocking action * fix hooks * Use temporary repo for git client test * Use userPassword in place of hard-coded password
* Fix missing branch in release bug (#3108)Ethan Koenig2017-12-082-0/+62
|
* Allow adding collaborators with (fullname) (#3103)Sasha Varlamov2017-12-071-1/+2
| | | | | | | | | | * Allow adding collaborators with (fullname) Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com> * Refactor username suffix to utils pkg Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>
* Fix error message sanitiziation (#3082)Ethan Koenig2017-12-041-2/+6
|
* Add reactions to issues/PR and comments (#2856)Lauris BH2017-12-041-3/+154
|
* Remove GetRepositoryByRef and add GetRepositoryByOwnerAndName (#3043)Lunny Xiao2017-12-021-16/+2
| | | | | | | | | | * remove GetRepositoryByRef and add GetRepositoryByOwnerAndName * fix tests * fix tests bug * some improvements