summaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* Show git-notes (#6984)Vladimir Panteleev2019-05-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | * Show git-notes * Make git-notes heading text localizable * Refactor git-notes data fetching to a separate function * Display the author and time of git notes * Move note bubble inside the commit bubble * Revert "Move note bubble inside the commit bubble" This reverts commit c0951fe0e3b4dea38064515546b1825c1bcf19e1. * Add test for git-notes * testing ui * Polish CSS * Apply suggestions from code review Co-Authored-By: Lauris BH <lauris@nix.lv>
* Add support of utf8mb4 for mysql (#6992)Lunny Xiao2019-05-241-0/+1
|
* Fix index produces problem when issues/pulls deleted (#6973)Lunny Xiao2019-05-182-2/+14
| | | | | | | | | | * fix index produces problem when issues/pulls deleted * fix tests * fix tests * fix tests
* SearchRepositoryByName improvements and unification (#6897)zeripath2019-05-153-143/+60
|
* Webhook Logs show proper HTTP Method, and allow change HTTP method in form ↵techknowlogick2019-05-152-0/+2
| | | | | | | | | | | (#6953) * Fix #6951 - logs show proper HTTP Method, and allow change HTTP method in form * enforce POST method for webhook * set default if method is empty
* Refactor models.NewRepoContext to extract git related codes to modules/git ↵Lunny Xiao2019-05-152-2/+2
| | | | | | | | | | (#6941) * refactor models.NewRepoContext to extract git related codes to modules/git * fix imports * refactor
* Remove macaron dependent on modules/log (#6933)Lunny Xiao2019-05-131-1/+18
|
* Handle CORS requests (#6289)Tamal Saha2019-05-131-2/+19
|
* Change drone token name to let users know to use oauth2 (#6912)techknowlogick2019-05-121-3/+10
|
* fix syntax highlight in blame view #6895 (#6909)iliyan ivanov2019-05-111-1/+1
|
* Remove local clones & make hooks run on merge/edit/upload (#6672)zeripath2019-05-111-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add options to git.Clone to make it more capable * Begin the process of removing the local copy and tidy up * Remove Wiki LocalCopy Checkouts * Remove the last LocalRepo helpers * Remove WithTemporaryFile * Enable push-hooks for these routes * Ensure tests cope with hooks Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove Repository.LocalCopyPath() * Move temporary repo to use the standard temporary path * Fix the tests Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove LocalWikiPath * Fix missing remove Signed-off-by: Andrew Thornton <art27@cantab.net> * Use AppURL for Oauth user link (#6894) * Use AppURL for Oauth user link Fix #6843 * Update oauth.go * Update oauth.go * internal/ssh: ignore env command totally (#6825) * ssh: ignore env command totally * Remove commented code Needed fix described in issue #6889 * Escape the commit message on issues update and title in telegram hook (#6901) * update sdk to latest (#6903) * improve description of branch protection (fix #6886) (#6906) The branch protection description text were not quite accurate. * Fix logging documentation (#6904) * ENABLE_MACARON_REDIRECT should be REDIRECT_MACARON_LOG * Allow DISABLE_ROUTER_LOG to be set in the [log] section * [skip ci] Updated translations via Crowdin * Move sdk structs to modules/structs (#6905) * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* Move sdk structs to modules/structs (#6905)Lunny Xiao2019-05-1153-54/+54
| | | | | | | | | | | | * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* Use AppURL for Oauth user link (#6894)techknowlogick2019-05-091-1/+1
| | | | | | | | | | * Use AppURL for Oauth user link Fix #6843 * Update oauth.go * Update oauth.go
* Fixes #6881 - API users search fix (#6882)Richard Mahn2019-05-082-2/+2
|
* Fix 404 when send pull request some situation (#6871)Lunny Xiao2019-05-072-12/+48
|
* Improve migrations to support migrating ↵Lunny Xiao2019-05-072-52/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | milestones/labels/issues/comments/pullrequests (#6290) * add migrations * fix package dependency * fix lints * implements migrations except pull requests * add releases * migrating releases * fix bug * fix lint * fix migrate releases * fix tests * add rollback * pull request migtations * fix import * fix go module vendor * add tests for upload to gitea * more migrate options * fix swagger-check * fix misspell * add options on migration UI * fix log error * improve UI options on migrating * add support for username password when migrating from github * fix tests * remove comments and fix migrate limitation * improve error handles * migrate API will also support migrate milestones/labels/issues/pulls/releases * fix tests and remove unused codes * add DownloaderFactory and docs about how to create a new Downloader * fix misspell * fix migration docs * Add hints about migrate options on migration page * fix tests
* fix config ui error about cache ttl (#6861)Lunny Xiao2019-05-061-0/+1
|
* fix 500 when reviewer is deleted with integration tests (#6856)Lunny Xiao2019-05-061-2/+7
|
* Add GET requests to webhook (#6771)Simon2019-05-051-0/+1
| | | | | | | | | | | | | | * Add GET requests to webhook * make fmt * Handle invalid http method on webhook * Uppercase http method in webhook * Rename v85.go to v86.go * make fmt
* Number of commits ahead/behind in branch overview (#6695)Mario Lubenka2019-05-051-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Call Git API to determine divergence of a branch and its base branch Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Show commit divergance in branch list Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds missing comment Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds test for diverging commits Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Try comparing commits instead of branches Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Removes test as CI can't run it Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adjusts signature of percentage function to allow providing multiple integers as numerator Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Moves CountDivergingCommits function into repofiles module Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Hash App token (#6724)techknowlogick2019-05-042-7/+7
|
* Git statistics in Activity tab (#4724)Lauris BH2019-05-042-2/+36
| | | | | | | | | | | | | | | | | | * Initial implementation for git statistics in Activity tab * Create top user by commit count endpoint * Add UI and update src-d/go-git dependency * Add coloring * Fix typo * Move git activity stats data extraction to git module * Fix message * Add git code stats test
* Allow Recaptcha service url to be configured (#6820)zeripath2019-05-022-2/+7
|
* Fix team edit API panic (#6780)ngourdon2019-04-271-1/+1
|
* fix pulls broken when fork repository deleted (#6754)Lunny Xiao2019-04-261-1/+6
| | | | | | * fix pulls broken when fork repository deleted * fix lint
* OAuth2 token can be used in basic auth (#6747)techknowlogick2019-04-251-0/+12
|
* Fix org visibility bug when git cloning (#6743)Lunny Xiao2019-04-252-5/+1
| | | | | | | | | | | | | | * fix org visibility bug * fix permission check * add integration tests * fix tests * change test user name for easier maintainance and fix test * fix test git repo name
* fix missing return (#6751)Lunny Xiao2019-04-251-0/+1
|
* Handle redirects in git clone commands (#6688)James E. Blair2019-04-251-2/+17
| | | | | | | | | | Add support for repo_redirect objects in the git smart http handler so that when a user clones a repo that has been moved or renamed, they are redirected to the new location. This requires that the query string be included in the redirect as well, so that is added. Signed-off-by: James E. Blair <jeblair@redhat.com>
* Fix: Sort repos on org home page with non-admin login (#6741)Lunny Xiao2019-04-241-0/+1
|
* Fix team members API (#6714)Lunny Xiao2019-04-241-1/+38
|
* [API] Load issue attributes when editing an issue (#6723)John Olheiser2019-04-231-0/+6
|
* Trace Logging on Permission Denied & ColorFormat (#6618)zeripath2019-04-227-2/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add log.ColorFormat and log.ColorFormatted Structs can now implement log.ColorFormatted to provide their own colored format when logged with `%-v` or additional flags. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add basic ColorFormat to repository and user Signed-off-by: Andrew Thornton <art27@cantab.net> * Add basic ColorFormat to access and unit Signed-off-by: Andrew Thornton <art27@cantab.net> * Add ColorFormat to permission and on trace log it Signed-off-by: Andrew Thornton <art27@cantab.net> * Add log.NewColoredIDValue to make ID value coloring consistent Signed-off-by: Andrew Thornton <art27@cantab.net> * formatting changes * Add some better tracing to permission denied for read issues/pulls Signed-off-by: Andrew Thornton <art27@cantab.net> * Add Trace logging on permission denied Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove isTrace() check from deferred func * Adjust repo and allow logging of team * use FormatInt instead of Itoa * Add blank line Signed-off-by: Andrew Thornton <art27@cantab.net> * Update access.go
* Show "delete branch" button on closed pull requests (#6570) (#6601)Mario Lubenka2019-04-202-2/+3
| | | | | | | | | | * Show button to delete a pull request branch after a pull request has been closed (#6570) Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Update routers/repo/pull.go Co-Authored-By: saitho <mario.lubenka@googlemail.com>
* Fix reversion caused by 6314 (#6685)zeripath2019-04-201-1/+0
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Unifies pagination template usage (#6531) (#6533)Mario Lubenka2019-04-2011-51/+91
|
* Add option to blame files (#5721)Andrzej Ressel2019-04-192-0/+259
|
* Add support for MS Teams webhooks (#6632)Daniel Grier2019-04-192-0/+76
|
* Improve listing performance by using go-git (#6478)Filip Navara2019-04-199-27/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use go-git for tree reading and commit info lookup. Signed-off-by: Filip Navara <navara@emclient.com> * Use TreeEntry.IsRegular() instead of ObjectType that was removed. Signed-off-by: Filip Navara <navara@emclient.com> * Use the treePath to optimize commit info search. Signed-off-by: Filip Navara <navara@emclient.com> * Extract the latest commit at treePath along with the other commits. Signed-off-by: Filip Navara <navara@emclient.com> * Fix listing commit info for a directory that was created in one commit and never modified after. Signed-off-by: Filip Navara <navara@emclient.com> * Avoid nearly all external 'git' invocations when doing directory listing (.editorconfig code path is still hit). Signed-off-by: Filip Navara <navara@emclient.com> * Use go-git for reading blobs. Signed-off-by: Filip Navara <navara@emclient.com> * Make SHA1 type alias for plumbing.Hash in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Make Signature type alias for object.Signature in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Fix GetCommitsInfo for repository with only one commit. Signed-off-by: Filip Navara <navara@emclient.com> * Fix PGP signature verification. Signed-off-by: Filip Navara <navara@emclient.com> * Fix issues with walking commit graph across merges. Signed-off-by: Filip Navara <navara@emclient.com> * Fix typo in condition. Signed-off-by: Filip Navara <navara@emclient.com> * Speed up loading branch list by keeping the repository reference (and thus all the loaded packfile indexes). Signed-off-by: Filip Navara <navara@emclient.com> * Fix lising submodules. Signed-off-by: Filip Navara <navara@emclient.com> * Fix build Signed-off-by: Filip Navara <navara@emclient.com> * Add back commit cache because of name-rev Signed-off-by: Filip Navara <navara@emclient.com> * Fix tests Signed-off-by: Filip Navara <navara@emclient.com> * Fix code style * Fix spelling * Address PR feedback Signed-off-by: Filip Navara <navara@emclient.com> * Update vendor module list Signed-off-by: Filip Navara <navara@emclient.com> * Fix getting trees by commit id Signed-off-by: Filip Navara <navara@emclient.com> * Fix remaining unit test failures * Fix GetTreeBySHA * Avoid running `git name-rev` if not necessary Signed-off-by: Filip Navara <navara@emclient.com> * Move Branch code to git module * Clean up GPG signature verification and fix it for tagged commits * Address PR feedback (import formatting, copyright headers) * Make blob lookup by SHA working * Update tests to use public API * Allow getting content from any type of object through the blob interface * Change test to actually expect the object content that is in the GIT repository * Change one more test to actually expect the object content that is in the GIT repository * Add comments
* API OTP Context (#6674)techknowlogick2019-04-191-3/+8
| | | | | | | | | | | | | | | | | | | | | | * API OTP Context * Update api.go * token * token * fix per discord * copyright header * remove check for token in OTP * Update auth.go * simplify * Update api.go
* Telegram webhook (#4227)techknowlogick2019-04-182-0/+95
|
* UX + Security current user password reset (#5042)AJ ONeal2019-04-182-45/+70
| | | | | | | | | | | | | | * allow current user to reset their own password * handle reset password edge cases properly and consistently * remove dangling assignment * properly label account recovery instead of reset password * remove 'Click here' from button * update English-only account-recovery templates
* Comments list performance optimization (#5305)Lunny Xiao2019-04-181-5/+20
|
* Fixes 4762 - Content API for Creating, Updating, Deleting Files (#6314)Richard Mahn2019-04-179-298/+509
|
* OAuth2 Grant UI (#6625)Jonas Franz2019-04-173-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add oauth2 grants ui Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add delete functionality Add translations Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Signed-off-by: Jonas Franz <info@jonasfranz.software> * Refactor DeleteOAuth2Grant Use results.Close() Signed-off-by: Jonas Franz <info@jonasfranz.software> * Refactor DeleteOAuth2Grant (again) Signed-off-by: Jonas Franz <info@jonasfranz.software> * Check if user ID is zero Signed-off-by: Jonas Franz <info@jonasfranz.software> * Check if grant ID is zero Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add API for manipulating Git hooks (#6436)Segev Finer2019-04-175-3/+233
| | | | | | | | | | | | | | | | | | | | | | | | * Add API for manipulating Git hooks Signed-off-by: Segev Finer <segev@codeocean.com> * Replace code.gitea.io/sdk with PR branch temporarily for CI * Switch back to code.gitea.io/sdk@master * Return 403 instead of 404 on no permission to edit hooks in API * Add tests for Git hooks API * Update models/repo_list_test.go Co-Authored-By: segevfiner <segev208@gmail.com> * Update models/repo_list_test.go Co-Authored-By: segevfiner <segev208@gmail.com> * empty line
* Properly escape on the redirect from the web editor (#6657)zeripath2019-04-161-7/+8
|
* Return a UserList from /api/v1/admin/users (#6629)zeripath2019-04-153-13/+27
|
* add .gpg url (match github behaviour) (#6610)Antoine GIRARD2019-04-142-1/+55
| | | | | | | | | | | | | | | | | | | | | | * add .gpg url (match github behaviour) * wildcard * test to export maximum data * working POC * add comment for old imported keys * cleaning * Update routers/user/profile.go Co-Authored-By: sapk <sapk@users.noreply.github.com> * add migration script * add integration tests
* Correctly adjust mirror url (#6593)zeripath2019-04-121-1/+46
|