summaryrefslogtreecommitdiffstats
path: root/integrations
Commit message (Collapse)AuthorAgeFilesLines
* Refactor: move Commit To APIFormat Code & Lot of StopWatch related things ↵65432020-09-181-6/+14
| | | | | | | | | | | | | (#12729) * move GitCommit to APIFormat convertion into convert package * rename Commit convert functions * move stopwatch to api convertion into convert package & rm unused code & extend test * fix compare time * Gitea not Gogs ;)
* Fix pgsql migration test (#12844)Lunny Xiao2020-09-181-0/+3
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Convert User expose ID each time (#12855)65432020-09-172-2/+11
| | | | | | | | | | | | | * git blame tells me a lot of gitea things happen here around 2018, add header * move user code int its own file * expose user id * adopt things from APIFormat * fix test * CI.restart()
* Don't keep running SetEngine in migration_test (#12860)zeripath2020-09-151-9/+1
| | | | | | There's no need to keep repeatedly running SetEngine in migration_test, as NewEngine calls it anyway. Signed-off-by: Andrew Thornton <art27@cantab.net>
* [API] Milestone endpoints accept names too (#12649)65432020-09-141-0/+5
| | | | | | | | | * API: Milestone endpoints accept names too * add test * rename Co-authored-by: Lauris BH <lauris@nix.lv>
* Move all push update operations to a queue (#10133)Lunny Xiao2020-09-115-3/+19
| | | | | | | | | | | | | | | | | | | | * Fix test * Add no queue for test only * improve code * Auto watch whatever branch operation * Fix lint * Rename noqueue to immediate * Remove old PushUpdate function * Fix tests Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add postgres schema to the search_path on database connection (#12634)zeripath2020-09-111-10/+0
| | | | | | | | | | Rather than rely on the user running the gitea server and db setting the schema search_path correctly - if gitea is run with a schema we should simply set the search_path to have that schema first in the path. Fix #12505 Signed-off-by: Andrew Thornton <art27@cantab.net>
* [API] Migration: Change ServiceType String (#12672)65432020-09-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | * use different structs for MigrateRepoOptions on UI and API * Fix TokenAuth and rename UID to an understandable Name * fix swagger doc * simplify & mk redable * R E F A C T O R: migration has now internal 3 structs to store its options: * the Options for WebUI: modules/auth/repo_form.go * the Options for API: modules/structs/repo.go * the option struct with after validation for internal prossessing: modules/migrations/base/options.go * Copyright Header * Deprecate UID - add RepoOwner * adopt repo.go -> migrate.go * add comment about each struct purpose * lint
* Add a migrate service type switch page (#12697)Lunny Xiao2020-09-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a migrat service type switch page * Improve translations * remove images * Fix images * remove extra create repo button on dashboard * Follow reviewers' opinions * Fix frontend lint * Remove wrong submit file * Fix tests * Adjust the size of image * Apply suggestions from code review Co-authored-by: 赵智超 <1012112796@qq.com> * Remove username and password from migration of github/gitlab * Improve docs * Improve interface docs Co-authored-by: 赵智超 <1012112796@qq.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* LFS support to be stored on minio (#12518)Lunny Xiao2020-09-082-5/+18
| | | | | | | | | | | | | | | | | * LFS support to be stored on minio * Fix test * Fix lint * Fix lint * Fix check * Fix test * Update documents and add migration for LFS * Fix some bugs
* Add queue for code indexer (#10332)Lunny Xiao2020-09-076-11/+17
| | | | | | | | | | | | | | | | | | | | | * Add queue for code indexer * Fix lint * Fix test * Fix lint * Fix bug * Fix bug * Fix lint * Add noqueue * Fix tests * Rename noqueue to immediate
* Add command to recreate tables (#12407)zeripath2020-09-061-0/+24
| | | | | | | | | | | | | | Provides new command: `gitea doctor recreate-table` which will recreate db tables and copy the old data in to the new table. This function can be used to remove the old warning of struct defaults being out of date. Fix #8868 Fix #3265 Fix #8894 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Expose Attachemnt Settings by API (#12514)65432020-09-051-0/+12
| | | close #12368
* API: Expose its limitation settings (#12714)65432020-09-042-14/+49
| | | | | | | | * API: Expose its limitation settings * TESTs Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Test ignore migration rate limitation error (#12715)65432020-09-041-1/+10
|
* [API] Delete Token accept names too (#12366)65432020-08-281-0/+13
| | | | | | | | * Delete Token accept names too * better description Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix file table overflows (#12603)silverwind2020-08-261-1/+1
| | | | | | | | | - Fix overflow regression from https://github.com/go-gitea/gitea/pull/12553. - Fix submodule columns stretching the table - Refactor template to share more HTML nodes - Introduce CSS helper classes Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Increase clickable area on files table links (#12553)silverwind2020-08-231-1/+1
|
* Add a storage layer for attachments (#11387)Lunny Xiao2020-08-182-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a storage layer for attachments * Fix some bug * fix test * Fix copyright head and lint * Fix bug * Add setting for minio and flags for migrate-storage * Add documents * fix lint * Add test for minio store type on attachments * fix test * fix test * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Add warning when storage migrated successfully * Fix drone * fix test * rebase * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * refactor the codes * add trace * Fix test * remove log on xorm * Fi download bug * Add a storage layer for attachments * Add setting for minio and flags for migrate-storage * fix lint * Add test for minio store type on attachments * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Fix drone * fix test * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * refactor the codes * add trace * Fix test * Add URL function to serve attachments directly from S3/Minio * Add ability to enable/disable redirection in attachment configuration * Fix typo * Add a storage layer for attachments * Add setting for minio and flags for migrate-storage * fix lint * Add test for minio store type on attachments * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Fix drone * fix test * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * don't change unrelated files * Fix lint * Fix build * update go.mod and go.sum * Use github.com/minio/minio-go/v6 * Remove unused function * Upgrade minio to v7 and some other improvements * fix lint * Fix go mod Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Tyler <tystuyfzand@gmail.com>
* Kanban board (#8346)Lanre Adelowo2020-08-1621-0/+742
| | | | | | | | | | | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com> Co-authored-by: Kerry <flatline-studios@users.noreply.github.com> Co-authored-by: Jaqra <jaqra@hotmail.com> Co-authored-by: Kyle Evans <kevans91@users.noreply.github.com> Co-authored-by: Tsakiridis Ilias <TsakiDev@users.noreply.github.com> Co-authored-by: Ilias Tsakiridis <ilias.tsakiridis@outlook.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Re-attempt to delete temporary upload if the file is locked by another ↵zeripath2020-08-118-27/+32
| | | | | | | | | | | process (#12447) Replace all calls to os.Remove/os.RemoveAll by retrying util.Remove/util.RemoveAll and remove circular dependencies from util. Fix #12339 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io>
* Add API to update pr headBranch (#12419)赵智超2020-08-041-6/+8
| | | | | * [API] Add update pr headBranch api Signed-off-by: a1012112796 <1012112796@qq.com>
* Add name filter to API for GetMilestoneList (#12336)65432020-07-281-0/+12
| | | | | | | | | Adds a name filter to the API for GetMilestoneList Includes a small refactor: merge GetMilestones and GetMilestonesByRepoID Close #12260 Needed for https://gitea.com/gitea/go-sdk/issues/383 and https://gitea.com/gitea/tea/pulls/149
* Use a small size repo for migrate test (#12300)赵智超2020-07-242-7/+7
| | | Signed-off-by: a1012112796 <1012112796@qq.com>
* prefer NoError/Error over Nil/NotNil (#12271)Stephen Solka2020-07-192-7/+7
|
* Update Octicons to v10 (#12240)silverwind2020-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update Octicons to v10 Besides a few renames, these icons are no longer present in v10 that we've used, so had to change: file-symlink-directory -> file-submodule internal-repo -> repo repo-force-push -> repo-push repo-template-private -> repo-template Fixes: https://github.com/go-gitea/gitea/issues/11889 Ref: https://github.com/primer/octicons/releases/tag/v10.0.0 * add custom sliders svg for removed octicon-settings * apply suggestion * fix triangles and use play on admin dashboard * add custom mirror svg * add missing build files * unify custom svgs * move to octicon-repo-clone to gitea-mirror * use octicon-x on conflicts * tweak timeline icons * tweak comment buttons * update settings icon to octicons v1 * switch to octicon-mirror and octicon-tools * replace two wiki buttons with octicons * remove whitespace in svg sources * Fix filepath basename on Windows for SVG bindata (#12241) * move octicons to devDependencies * move back to dependencies * move svgo to devDependencies again Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Extend Notifications API and return pinned notifications by default (#12164)zeripath2020-07-122-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Extend notifications API and return pinned notifications in notifications list Signed-off-by: Andrew Thornton <art27@cantab.net> * fix swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix swagger again Signed-off-by: Andrew Thornton <art27@cantab.net> * fix test Signed-off-by: Andrew Thornton <art27@cantab.net> * remove spurious debugs * as per @6543 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update models/notification.go * as per @6543 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Pause, Resume, Release&Reopen, Add and Remove Logging from command line (#11777)zeripath2020-07-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | * Make LogDescriptions race safe * Add manager commands for pausing, resuming, adding and removing loggers Signed-off-by: Andrew Thornton <art27@cantab.net> * Placate lint * Ensure that file logger is run! * Add support for smtp and conn Signed-off-by: Andrew Thornton <art27@cantab.net> * Add release-and-reopen Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* API: Move AllowedReactions endpoint into GetGenneralUI endpoint + creat new ↵65432020-06-221-6/+4
| | | | | | | | | | | | | swagger section settings (#11854) * move Setting function into its own package * swagger add&use new section "settings" * move api AllowedReactions into general UI-Settings endpoint * prepare TEST * lint
* Fix commenting on non-utf8 encoded files (#11916)zeripath2020-06-185-3/+10
| | | | | | | | | * Add comment on non-unicode line to force fail Signed-off-by: Andrew Thornton <art27@cantab.net> * Just quote/unquote patch Signed-off-by: Andrew Thornton <art27@cantab.net>
* upgrade to use testfixtures v3 (#11904)techknowlogick2020-06-171-16/+0
| | | | | | | | | | | | | | | * upgrade to use testfixtures v3 * simplify logic * make vendor * update per @lunny * Update templates/repo/empty.tmpl * Update templates/repo/empty.tmpl Co-authored-by: Lauris BH <lauris@nix.lv>
* Add automatic JS license generation (#11810)silverwind2020-06-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add automatic JS license generation Removed librejs file and replaced it with a plaintext file that is built from all JS dependencies that are included in the webpack build. It does not cover the few remaining statically vendored files and fomantic is added manually because it's not yet in the webpack build process. Fixes: https://github.com/go-gitea/gitea/issues/11630 * fix lint * remove jslicense, we're not librejs compatible any more * remove license.txt test as it depens on absent files * small optimization * trailing comma * localize and capitalize the word 'licenses' * reduce text to just 'Licenses' Co-authored-by: Lauris BH <lauris@nix.lv>
* Handle more pathological branch and tag names (#11843)zeripath2020-06-111-8/+8
| | | | | | | | | | | * Handle more pathological branch and tag names Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix failing test Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* API allow to create closed milestones (#11745)65432020-06-091-0/+13
| | | | | | | | * API allow to create closed milestones * set CloseDate too Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Honor DEFAULT_PAGING_NUM for API (#11805)Cirno the Strongest2020-06-082-1/+15
| | | | | | | | | | * Honor DEFAULT_PAGING_NUM for API * set pagination to 10 for tests * lint Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* give gitea time to calculate language stats (#11812)65432020-06-081-0/+4
|
* Add option to API to update PullRequest base branch (#11666)65432020-06-071-3/+18
| | | | | * EditPull: add option to change base Close #11552
* Add language statistics API endpoint (#11737)Lauris BH2020-06-071-0/+46
| | | | | * Add language statistics API * Add tests
* Add hide activity option (#11353)l-jonas2020-06-051-0/+414
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add hide activity option This closes https://github.com/go-gitea/gitea/issues/7927 * Adjust for linter * Adjust for linter * Add tests * Remove info that admins can view the activity * Adjust new tests for linter * Rename v139.go to v140.go * Rename v140.go to v141.go * properly indent * gofmt Co-authored-by: Jonas Lochmann <git@inkompetenz.org> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [API] Expose allowed Reactions (#11735)65432020-06-041-0/+16
| | | | | | | | | | | * [API] Expose allowed Reactions * dont be in soutch a rush * add TEST * use ElementsMatch Co-authored-by: Lauris BH <lauris@nix.lv>
* Don't put integration test data outside of test folder (#11746)mrsdizzie2020-06-034-18/+40
| | | | | | Some integration test data is being put outside of the integration test folders which means it isn't deleted properly with make clean. Update config so it works as expected. Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix verification of subkeys of default gpg key (#11713)zeripath2020-06-031-2/+49
| | | | | | | | | | | | | | | | | * Fix verification of subkeys of default gpg key Fix #10309 Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove debug log * Update models/gpg_key.go * As per @6543 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* log slow tests (#11487)zeripath2020-06-013-1/+75
| | | | | | | | | | | | | | | | * log slow tests Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * More lint placation Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Handle expected errors in FileCreate & FileUpdate API (#11643)65432020-05-312-2/+2
| | | | | as title needed for #11641
* Add API Endpoint for Branch Creation (#11607)Terence Le Huu Phuong2020-05-292-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [FEATURE] [API] Add Endpoint for Branch Creation Issue: https://github.com/go-gitea/gitea/issues/11376 This commit introduces an API endpoint for branch creation. The added route is POST /repos/{owner}/{repo}/branches. A JSON with the name of the new branch and the name of the old branch is required as parameters. Signed-off-by: Terence Le Huu Phuong <terence@qwasar.io> * Put all the logic into CreateBranch and removed CreateRepoBranch * - Added the error ErrBranchDoesNotExist in error.go - Made the CreateNewBranch function return an errBranchDoesNotExist error when the OldBranch does not exist - Made the CreateBranch API function checks that the repository is not empty and that branch exists. * - Added a resetFixtures helper function in integration_test.go to fine-tune test env resetting - Added api test for CreateBranch - Used resetFixture instead of the more general prepareTestEnv in the repo_branch_test CreateBranch tests * Moved the resetFixtures call inside the loop for APICreateBranch function * Put the prepareTestEnv back in repo_branch_test * fix import order/sort api branch test Co-authored-by: zeripath <art27@cantab.net>
* Handle expected errors in AddGPGkey API (#11644)65432020-05-281-1/+1
| | | | | | | | | * handle GPG Parse & Email Errors * correct TEST * update Swagger * more Docu
* Fix styling for PR merge section when no checks (#11609)Cirno the Strongest2020-05-251-1/+1
| | | Makes styling consistent between two cases. Also removed unnecessary double border.
* Refactor Cron and merge dashboard tasks (#10745)zeripath2020-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor Cron and merge dashboard tasks * Merge Cron and Dashboard tasks * Make every cron task report a system notice on completion * Refactor the creation of these tasks * Ensure that execution counts of tasks is correct * Allow cron tasks to be started from the cron page * golangci-lint fixes * Enforce that only one task with the same name can be registered Signed-off-by: Andrew Thornton <art27@cantab.net> * fix name check Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @guillep2k * as per @lafriks Signed-off-by: Andrew Thornton <art27@cantab.net> * Add git.CommandContext variants Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Correctly set the organization num repos (#11339)zeripath2020-05-122-0/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correctly set the organization num repos Correctly set the organization num repos to the number of accessible repos for the user Fix #11194 Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @lunny Signed-off-by: Andrew Thornton <art27@cantab.net> * attempt to fix mssql Signed-off-by: Andrew Thornton <art27@cantab.net> * Update models/user.go * Explicit columns Signed-off-by: Andrew Thornton <art27@cantab.net> * Add test and fix 0 counted orgs Signed-off-by: Andrew Thornton <art27@cantab.net> * remove orgname from api Signed-off-by: Andrew Thornton <art27@cantab.net>
* Consolidate API for getting single commit (#11368)Cirno the Strongest2020-05-111-22/+6
| | | | | | | | | * Allow Git ref for /repos/{owner}/{repo}/git/commits/{sha} * Consolidate API for getting single commit * Fix tests and do it differently Co-authored-by: zeripath <art27@cantab.net>