aboutsummaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* Add golangci (#6418)kolaente2019-06-1229-159/+306
|
* Fixes diff on merged pull requests (#7171)Mario Lubenka2019-06-111-8/+8
|
* if milestone id is zero don't get it from database (#7169)Lunny Xiao2019-06-101-6/+8
|
* Move PushUpdate dependency from models to repofiles (#6763)Lunny Xiao2019-06-103-10/+78
| | | | | | * remove push_update * move models.PushUpdate to repofiles.PushUpdate
* archived repos can be starred and watched (#7163)Lanre Adelowo2019-06-101-1/+1
|
* Fixes #2738 - Adds the /git/tags API endpoint (#7138)Richard Mahn2019-06-085-31/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixes #2738 - /git/tags API * proper URLs * Adds function comments * Updates swagger * Removes newline from tag message * Removes trailing newline from commit message * Adds integration test * Removed debugging * Adds tests * Fixes bug where multiple tags of same commit show wrong tag name * Fix formatting * Removes unused varaible * Fix to annotated tag function names and response * Update modules/git/repo_tag.go Co-Authored-By: Lauris BH <lauris@nix.lv> * Uses TagPrefix * Changes per review, better error handling for getting tag and commit IDs * Fix to getting commit ID * Fix to getting commit ID * Fix to getting commit ID * Fix to getting commit ID
* Compare branches, commits and tags with each other (#6991)Mario Lubenka2019-06-075-337/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Supports tags when comparing commits or branches Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Hide headline when only comparing and don't load unused data Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Merges compare logics to allow comparing branches, commits and tags with eachother Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Display branch or tag instead of commit when used for comparing Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Show pull request form after click on button Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Transfers relevant pull.go changes from master to compare.go Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Fixes error when comparing forks against a commit or tag Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Removes console.log from JavaScript file Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Show icon next to commit reference when comparing branch or tag Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Updates css file Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Fixes import order * Renames template variable * Update routers/repo/compare.go Co-Authored-By: zeripath <art27@cantab.net> * Update from master Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Allow short-shas in compare * Renames prInfo to compareInfo Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Check PR permissions only if compare is pull request Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adjusts comment Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Use compareInfo instead of prInfo
* Add state param to milestone listing API (#7131)Lanre Adelowo2019-06-062-3/+8
| | | | | | | | | | | | | | | | * Support state params * update tests * fix tests * add state=all support * update tests * update swagger * update swagger
* Repository avatar fallback configuration (#7087)Mario Lubenka2019-06-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Only show repository avatar in list when one was selected Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds fallback configuration option for repository avatar Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Implements repository avatar fallback Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds admin task for deleting generated repository avatars Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Solve linting issues Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Save avatar before updating database * Linting * Update models/repo.go Co-Authored-By: zeripath <art27@cantab.net>
* Move serv hook functionality & drop GitLogger (#6993)zeripath2019-06-0110-303/+515
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move hook functionality internally * Internalise serv logic * Remove old internal paths * finally remove the gitlogger * Disallow push on archived repositories * fix lint error * Update modules/private/key.go * Update routers/private/hook.go * Update routers/private/hook.go * Update routers/private/hook.go * Updated routers/private/serv.go * Fix LFS Locks over SSH * rev-list needs to be run by the hook process * fixup * Improve git test * Ensure that the lfs files are created with a different prefix * Reduce the replication in git_test.go * slight refactor * Remove unnecessary "/" * Restore ensureAnonymousClone * Restore ensureAnonymousClone * Run rev-list on server side * Try passing in the alternative directories instead * Mark test as skipped * Improve git test * Ensure that the lfs files are created with a different prefix * Reduce the replication in git_test.go * Remove unnecessary "/"
* Validate External Tracker URL Format (#7089)mrsdizzie2019-05-311-1/+1
| | | | | | | | | | | | | | | | | | * Validate External Tracker URL Format Add some validation checks for external tracker URL format. Fixes #7068 * Don't make {index} a hard requirement * Fix Description * make fmt * move regex to package level * fix copyright date
* Fixes #7023 - API Org Visibility (#7028)Richard Mahn2019-05-304-5/+23
|
* Fixes #5960 - Adds API Endpoint for Repo Edit (#7006)Richard Mahn2019-05-304-1/+364
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Feature - #5960 - API Endpoint for Repo Editing * Revert from merge * Adds integration testing * Updates to integration tests * Revert changes * Update year in file header * Misspell fix * XORM = test * XORM = test * revert XORM = file * Makes RepoUnit.ID be pk and autoincr * Fix to units * revert header * Remove print statement * Adds other responses * Improves swagger for creating repo * Fixes import order * Better Unit Type does not exist error * Adds editable repo properties to the response repo structure * Fix to api_repo_edit_test.go * Fixes repo test * Changes per review * Fixes typo and standardizes comments in the EditRepoOption struct for swagger * Fixes typo and standardizes comments in the EditRepoOption struct for swagger * Actually can unarchive through the API * Unlike delete, user doesn't have to be the owner of the org, just admin to the repo * Fix to swagger comments for field name change * Update to swagger docs * Update swagger * Changes allow_pull_requests to has_pull_requests
* Repository avatars (#6986)Sergey Dryabzhinsky2019-05-293-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Repository avatars - first variant of code from old work for gogs - add migration 87 - add new option in app.ini - add en-US locale string - add new class in repository.less * Add changed index.css, remove unused template name * Update en-us doc about configuration options * Add comments to new functions, add new option to docker app.ini * Add comment for lint * Remove variable, not needed * Fix formatting * Update swagger api template * Check if avatar exists * Fix avatar link/path checks * Typo * TEXT column can't have a default value * Fixes: - remove old avatar file on upload - use ID in name of avatar file - users may upload same files - add simple tests * Fix fmt check * Generate PNG instead of "static" GIF * More informative comment * Fix error message * Update avatar upload checks: - add file size check - add new option - update config docs - add new string to en-us locale * Fixes: - use FileHEader field for check file size - add new test - upload big image * Fix formatting * Update comments * Update log message * Removed wrong style - not needed * Use Sync2 to migrate * Update repos list view - bigger avatar - fix html blocks alignment * A little adjust avatar size * Use small icons for explore/repo list * Use new cool avatar preparation func by @lafriks * Missing changes for new function * Remove unused import, move imports * Missed new option definition in app.ini Add file size check in user/profile avatar upload * Use smaller field length for Avatar * Use session to update repo DB data, update DeleteAvatar - use session too * Fix err variable definition * As suggested @lafriks - return as soon as possible, code readability
* refactor: append, build variable and type switch (#4940)Bo-Yi Wu2019-05-281-4/+4
| | | | | | * refactor: append, build variable and type switch * fix: remove redundant space.
* Fix LFS Locks over SSH (#6999)zeripath2019-05-281-1/+1
| | | | | * Fix LFS Locks over SSH * Mark test as skipped
* Install page - Handle invalid administrator username better (#7060)zeripath2019-05-281-12/+36
| | | | | | * Install page - detect invalid admin username before installing * Also fix #6954
* fix issuer of OTP URI should be URI-encoded. (#6634)Hui Hui2019-05-271-1/+3
| | | | | | | | | | * fix: Issuer of OTP URI should be URI-encoded. follow this link https://github.com/google/google-authenticator/wiki/Key-Uri-Format . * filter unsafe character ':' in issuer * Use Replace rather than ReplaceAll
* fix charset was not saved after installation finished (#7048)Lunny Xiao2019-05-261-0/+2
|
* Fix wrong init dependency on markup extensions (#7038)Lunny Xiao2019-05-251-0/+2
| | | | * fix wrong init dependency on markup extensions
* 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
|