aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo
Commit message (Collapse)AuthorAgeFilesLines
* Refactor repo.isBare to repo.isEmpty #5629 (#5714)zeripath2019-01-173-11/+11
| | | | | | | | * Refactor repo.isBare to repo.isEmpty #5629 Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove Sync call
* Refactor notification for indexer (#5111)Lunny Xiao2019-01-171-0/+4
| | | | | | * notification for indexer * use NullNotifier as parent struct
* Add Default Pull Request Title (#5735)Elijah Oyekunle2019-01-161-2/+17
| | | | | | | | * add default PR title Set default PR title to commit summary if there's a single commit on the head branch, else set it to the head branch name * set default PR description If there's a single commit on the head branch, and it's multiline, then set it as the default PR description
* Add proper CORS preflight origin validation (#5740)silverwind2019-01-151-2/+14
|
* Support CORS headers to git smart http protocol (#5719)Lunny Xiao2019-01-141-0/+12
|
* Prioritize "readme.md" (#5691)Khaled Hamed2019-01-141-5/+18
| | | | | | | | * prioritize readme.md * Improve IsReadmeFile * Add more tests
* Added URL mapping for Release attachments like on github.com (#1707)gdeverlant2019-01-061-0/+32
|
* fix commit page showing status for current default branch (#5650)Julian2019-01-061-1/+1
| | | Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
* SECURITY: protect DeleteFilePost et al with cleanUploadFileName (#5631)zeripath2019-01-041-2/+18
| | | | | This commit wraps more of the TreePaths with cleanUploadFileName Signed-off-by: Andrew Thornton <art27@cantab.net>
* branch: Trigger update when deleting branch via UI. (#5617)Harshit Bansal2019-01-021-1/+13
| | | Fixes: #5309.
* Issue is not overdue when it is on the same date #5566 (#5568)Rodrigo Villablanca Vásquez2019-01-011-0/+2
| | | | | | | | | | * Due date time of issues and milestones is set to 23:59:59 * Add docs * make gen swagger * fix swagger gen
* Add rebase with merge commit merge style (#3844) (#4052)Julian2018-12-273-0/+6
| | | Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
* fix bug on upload file name (#5571)Lunny Xiao2018-12-202-1/+48
|
* Improve performance of dashboard (#4977)Lunny Xiao2018-12-132-24/+45
|
* fix approvals limitation (#5521)Lunny Xiao2018-12-111-2/+4
|
* fix adding reaction fail for read permission (#5515)Lunny Xiao2018-12-111-2/+2
|
* Approvals at Branch Protection (#5350)Jonas Franz2018-12-112-3/+31
| | | | | | | | | | | | | | | | | | | | | | * Add branch protection for approvals Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add required approvals Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing comments and fmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add type = approval and group by reviewer_id to review * Prevent users from adding negative review limits * Add migration for approval whitelists Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix empty wiki (#5504)Lunny Xiao2018-12-091-1/+3
| | | | | | * fix wiki page when wiki path is exist but empty * improve the error check
* Allow to add organization members as collaborators on organization owned ↵Lanre Adelowo2018-11-301-13/+0
| | | | | repositories (#4748) repository... Fixes #4507
* Milestone issues and pull requests (#5293)Lunny Xiao2018-11-292-256/+313
| | | | | | | | | | | | * add milestone issues and pulls page instead of redirecting issues page * add milestone when creating issue from milestone page * refactor to merge similiar codes as a new function issues * remove milestone info on milestone issues list * fix missing params
* Restrict permission check on repositories and fix some problems (#5314)Lunny Xiao2018-11-2810-137/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix units permission problems * fix some bugs and merge LoadUnits to repoAssignment * refactor permission struct and add some copyright heads * remove unused codes * fix routes units check * improve permission check * add unit tests for permission * fix typo * fix tests * fix some routes * fix api permission check * improve permission check * fix some permission check * fix tests * fix tests * improve some permission check * fix some permission check * refactor AccessLevel * fix bug * fix tests * fix tests * fix tests * fix AccessLevel * rename CanAccess * fix tests * fix comment * fix bug * add missing unit for test repos * fix bug * rename some functions * fix routes check
* Show review summary in pull requests (#5132)kolaente2018-11-221-0/+6
|
* Add raw blob endpoint to get objects by SHA ID (#5334)Peter Hoffmann2018-11-181-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add raw blob endpoint This should make it possible to download raw blobs directly from /:repo/:username/raw/blob/:sha1 URLs. * fix: Make it work * As an SHA-ID is no path getRefNameFromPath can't be used to verify file specifying parameter * added relevant change in go-gitea/git #132 Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de> * Update Gopkg.lock Can't update all vendors due to errors Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de> * style: Add Gitea copyright header * feat: Added integration test for /repo/u/r/raw/blob * fix: correct year in copyright header
* Add option to disable automatic mirror syncing. (#5242)Jonas Bröms2018-11-081-2/+6
| | | Setting the interval to 0 will disable to automatic syncing.
* Serve audio files using HTML5 audio tag (#5221)Jonas Bröms2018-10-301-0/+2
| | | | | | * Serve audio files using HTML5 audio tag * Correct copy paste error
* Add comment replies (#5104)Jonas Franz2018-10-221-1/+4
| | | | | | * Add comment replies * Replace reviewID with review.ID
* Add notification interface and refactor UI notifications (#5085)Lunny Xiao2018-10-183-14/+27
| | | | | | | | * add notification interface and refactor UI notifications * add missing methods on notification interface and notifiy only issue status really changed * implement NotifyPullRequestReview for ui notification
* Detect charset and convert non UTF-8 files for display (#4950)Lauris BH2018-09-291-2/+4
| | | | | | | | | | | | | | * Detect charset and convert non UTF-8 files for display * Refactor and move function to correct module * Revert unrelated changes * More unrelated changes * Duplicate content for small text to have better encoding detection * Check if original content is valid before duplicating it
* Code review UI improvements and bugfixes (#4682)Lauris BH2018-09-171-2/+12
| | | | | | | | | | | | | | | | * Code review UI improvements * More fixes to dark theme * Style fix * Fix to allow add code review comments only on review files tab * More readability dark style fixes * Fix commenting on deleted files. Fixes #4752 * Fix line blame getting for multiple corner cases
* make sure to catch the right error so it is displayed as an error on the ui ↵Lanre Adelowo2018-09-161-1/+1
| | | | not a 500 (#4945)
* Add file name and branch to page title (#4902)Lanre Adelowo2018-09-101-0/+2
|
* Slack webhook channel name cannot be empty or just contain an hashtag (#4786)Lanre Adelowo2018-09-101-2/+14
|
* Make reverse proxy auth optional (#4643)Najib Idrissi2018-08-291-6/+2
| | | | | | | | | | | | | | * Make reverse proxy auth optional If the option ENABLE_REVERSE_PROXY_AUTHENTICATION is enabled, make reverse proxy auth optional, instead of failing if the authentication did not succeed. Fixes #3973 Signed-off-by: Najib Idrissi <najib.idrissi.kaitouni@gmail.com> * Update http.go
* User shouldn't be able to approve or reject his/her own PR (#4729)Lanre Adelowo2018-08-201-2/+22
| | | | | | | | | | | | | | | | * Make sure author cannot reject/approve their own PR * Disable buttons in templates too * Remove unneccessary if check since the switch below catches it * Fix IsOwner check * Update template and remove new template variable * Add alert template and redirect to diff page on review failure * Redirect to files diff as a little update to #4632
* Improve URL validation for external wiki and external issues (#4710)Lauris BH2018-08-151-2/+9
| | | | | | * Improve URL validation for external wiki and external issues * Do not allow also localhost address for external URLs
* Add whitespace handling to PR-comparsion (#4683)nemoinho2018-08-142-3/+21
| | | | | | | | | | | | | | | | | | * Add whitespace handling to PR-comparsion In a PR we have to keep an eye on a lot of different things. But sometimes the bare code is the key-thing we want to care about and just don't want to care about fixed indention on some places. Especially if we follow the pathfinder rule we face a lot of these situations because these changes don't break the code in many languages but improve the readability a lot. So this change introduce a fine graned button to adjust the way how the reviewer want to see whitespace-changes within the code. The possibilities reflect the possibilities from git itself except of the `--ignore-blank-lines` flag because that one is also handled by `-b` and is really rare. Signed-off-by: Felix Nehrke <felix@nehrke.info>
* Disable merging a WIP Pull request (#4529)Julien Tant2018-08-132-0/+16
| | | | | | | | | | | | | | | | | * prevent pull request to be merged when PR is a WIP * add tests * add helper to prepend WIP: in PR title * move default wip prefixes into settings * use configurable WIP prefixes in javascript and default to first one in templates * add documentation * add unit test on pull model Signed-off-by: Julien Tant <julien@craftyx.fr>
* prevent empty review comment (#4632)Lanre Adelowo2018-08-071-0/+7
| | | | | | | | | | * prevent empty review comment This would only require a comment for rejection and comment * add tests * add comment
* An inactive user shouldn't be able to be added as a collaborator (#4535)Lanre Adelowo2018-08-072-0/+30
| | | | | | | | | | | | | | * an inactive user shouldn't be able to be a collaborator * use translated error message * add active user check when adding a new collaborator via the api * fix translation text * added collaborator test * improvee testcases
* Don't fail silently if trying to add a collaborator twice (#4533)Lanre Adelowo2018-08-072-0/+108
| | | | | | | | | | | | * don't fail silently if trying to add a collaborator twice * fix translation text * added collaborator test * improvee testcases * Added tests to make sure a collaborator cannot be added twice
* Pull request review/approval and comment on code (#3748)Lauris BH2018-08-063-3/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial ui components for pull request review * Add Review Add IssueComment types Signed-off-by: Jonas Franz <info@jonasfranz.software> (cherry picked from commit 2b4daab) Signed-off-by: Jonas Franz <info@jonasfranz.software> * Replace ReviewComment with Content Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add load functions Add ReviewID to findComments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add create review comment implementation Add migration for review Other small changes Signed-off-by: Jonas Franz <info@jonasfranz.software> * Simplified create and find functions for review Signed-off-by: Jonas Franz <info@jonasfranz.software> * Moved "Pending" to first position Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add GetCurrentReview to simplify fetching current review Signed-off-by: Jonas Franz <info@jonasfranz.software> * Preview for listing comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Move new comment form to its own file Signed-off-by: Jonas Franz <info@jonasfranz.software> * Implement Review form Show Review comments on comment stream Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for single comments Showing buttons in context Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add pending tag to pending review comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add unit tests for Review Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fetch all review ids at once Add unit tests Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Improved comment rendering in "Files" view by adding Comments to DiffLine Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for invalidating comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Switched back to code.gitea.io/git Signed-off-by: Jonas Franz <info@jonasfranz.software> * Moved review migration from v64 to v65 Signed-off-by: Jonas Franz <info@jonasfranz.software> * Rebuild css Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Improve translations Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests by updating fixtures and updating outdated test Signed-off-by: Jonas Franz <info@jonasfranz.software> * Comments will be shown at the right place now Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for deleting CodeComments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix problems caused by files in subdirectories Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for showing code comments of reviews in conversation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for "Show/Hide outdated" Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update code.gitea.io/git Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add support for new webhooks Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update comparison Signed-off-by: Jonas Franz <info@jonasfranz.software> * Resolve conflicts Signed-off-by: Jonas Franz <info@jonasfranz.software> * Minor UI improvements * update code.gitea.io/git * Fix ui bug reported by @lunny causing wrong position of add button Add functionality to "Cancel" button Add scale effects to add button Hide "Cancel" button for existing comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Prepare solving conflicts Signed-off-by: Jonas Franz <info@jonasfranz.software> * Show add button only if no comments already exist for the line Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing vendor files Signed-off-by: Jonas Franz <info@jonasfranz.software> * Check if reviewer is nil Signed-off-by: Jonas Franz <info@jonasfranz.software> * Show forms only to users who are logged in Signed-off-by: Jonas Franz <info@jonasfranz.software> * Revert "Show forms only to users who are logged in" This reverts commit c083682 Signed-off-by: Jonas Franz <info@jonasfranz.software> * Save patch in comment Render patch for code comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add link to comment in code Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add reply form to comment list Show forms only to signed in users Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add 'Reply' as translatable Add CODE_COMMENT_LINES setting Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix problems introduced by checking for singed in user Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add v70 Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update generated stylesheet Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix preview Beginn with new review comment patch system Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add new algo to generate diff for line range Remove old algo used for cutting big diffs (it was very buggy) * Add documentation and example for CutDiffAroundLine * Fix example of CutDiffAroundLine * Fix some comment UI rendering bugs * Add code comment edit mode * Send notifications / actions to users until review gets published Fix diff generation bug Fix wrong hashtag * Fix vet errors * Send notifications also for single comments * Fix some notification bugs, fix link * Fix: add comment icon is only shown on code lines * Add lint comment * Add unit tests for git diff * Add more error messages * Regenerated css Signed-off-by: Jonas Franz <info@jonasfranz.software> * fmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Regenerated CSS with latest less version Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix test by updating comment type to new ID Signed-off-by: Jonas Franz <info@jonasfranz.software> * Introducing CodeComments as type for map[string]map[int64][]*Comment Other minor code improvements Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix data-tab issues Signed-off-by: Jonas Franz <info@jonasfranz.software> * Remove unnecessary change Signed-off-by: Jonas Franz <info@jonasfranz.software> * refactored checkForInvalidation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Append comments instead of setting Signed-off-by: Jonas Franz <info@jonasfranz.software> * Use HeadRepo instead of BaseRepo Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update migration Signed-off-by: Jonas Franz <info@jonasfranz.de> * Regenerated CSS Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add copyright Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update index.css Signed-off-by: Jonas Franz <info@jonasfranz.software>
* fix IsPullReuqestBroken->IsPullRequestBroken (#4578)Julien Tant2018-08-011-3/+3
| | | Signed-off-by: Julien Tant <julien@craftyx.fr>
* env var GITEA_PUSHER_EMAIL (#4516)Lukas Treyer2018-07-261-0/+5
| | | | | | * env var GITEA_PUSHER_EMAIL * set pusher email only if email address is not private
* Added dependencies for issues (#2196) (#2531)kolaente2018-07-174-0/+165
|
* Issue due date api (#3890)kolaente2018-07-161-48/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implemented basic api endpoint to manage deadlines * Fixed checking for permissions * Updating a deadline from the ui is now entirely done via the api * cleanup * Cosmetics * fixed lint + fmt * Added swagger model definition for deadline response * Updated gitea-sdk * Updated gitea-sdk * More cleanup * Generate swagger json * Merge branch 'master' of https://github.com/go-gitea/gitea into issue-due-date-api # Conflicts: # public/swagger.v1.json * Fixed permission to update a deadline via api * Re-added form to change a deadline * Added client-side validation + not ignore error messages from the api * Added locale for error message * Merge branch 'master' of https://github.com/go-gitea/gitea # Conflicts: # models/issue_comment.go * Proper date validation * Fixed indention * moved css to css file * added documentation for error codes * after merge cleanup * Added swagger description * DO NOTHING BUT TRIGGER THAT F*CKIN CI SO IT PICKS UP THE LATEST COMMIT AS IT SHOULD * DO NOTHING BUT TRIGGER THAT F*CKIN CI SO IT PICKS UP THE LATEST COMMIT AS IT SHOULD * regenerated stylesheets
* 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.