Commit Graph
100 Commits
Author SHA1 Message Date
Lunny XiaoandAntoine GIRARD a8c024043c Improve integration tests (#8276)
* improve integration tests

* fix Makefile

* improve makefile and integration docs
2019-09-25 14:13:18 +02:00
Lunny Xiaoandtechknowlogick 061388379a Move create issue comment to comments package (#8212)
* move create issue comment to comments package

* extract actions on update/delete comment from models to comment service

* fix lint

* fix lint
2019-09-24 13:39:50 -04:00
Lunny XiaoandGitHub 29dda47cbb Fix label count (#8267)
* fix label count

* fix vendor

* fix import order

* update xorm to fix bug

* fix tests

* fix mssql bug
2019-09-24 21:22:39 +08:00
Lunny XiaoandGitHub 5a438ee3c0 Move all mail related codes from models to services/mailer (#7200)
* move all mail related codes from models to modules/mailer

* fix lint

* use DBContext instead Engine

* use WithContext not WithEngine

* Use DBContext instead of Engine

* don't use defer when sess.Close()

* move DBContext to context.go and add some methods

* move mailer from modules/ to services

* fix lint

* fix tests

* fix fmt

* add gitea copyright

* fix tests

* don't expose db functions

* make code clear

* add DefaultDBContext

* fix build

* fix bug
2019-09-24 13:02:49 +08:00
Lunny XiaoandLauris BH 3c0e6d1126 update cache item_ttl docs (#8222) 2019-09-18 10:50:45 +03:00
Lunny XiaoandLauris BH 04ca7f0047 Refuse merge until all required status checks success (#7481)
* refuse merge until ci successfully

* deny merge request when required status checkes not succeed on merge Post and API

* add database migration for added columns on protected_branch

* fix migration

* fix protected branch check bug

* fix protected branch settings

* remove duplicated code on check pull request's required commit statuses pass

* remove unused codes

* fix migration

* add newline for template file

* fix go mod

* rename function name and some other fixes

* fix template

* fix bug pull view

* remove go1.12 wrong dependencies

* add administrator bypass when protected branch status check enabled

* fix bug

* improve the codes
2019-09-18 08:39:45 +03:00
Lunny XiaoandGitHub 29454733b4 move some milestone functions to a standalone package (#8213) 2019-09-18 08:17:12 +08:00
Lunny XiaoandGitHub 4959bf1c09 Move create release from models to a standalone package (#7539)
* move create release from models to a standalone package

* fix lint

* fix comment year

* fix lint

* fix lint

* fix package import name

* fix vendor

* fix go mod

* some refactors

* fix vendor

* use go1.12 make vendor

* fix vendor
2019-09-15 23:28:25 +08:00
Lunny XiaoandGitHub be0f7ff9bf Fix team user api (#8172)
* fix team user api

* fix tests

* fix api

* fix team user api

* change user convert

* fix tests

* fix tests
2019-09-15 20:22:02 +08:00
Lunny XiaoandGitHub 88e1c29df1 Fix Go 1.13 private repository go get issue (#8112)
* Fix Go 1.13 invalid import path creation

Signed-off-by: Rutger Broekhoff <rutger@viasalix.nl>

* Apply suggested changes from #8100

Signed-off-by: Rutger Broekhoff <rutger@viasalix.nl>
2019-09-06 21:44:59 +08:00
Lunny Xiaoandtechknowlogick c03d75fbd5 Move git diff codes from models to services/gitdiff (#7889)
* move git diff codes from models to services/gitdiff

* fix template

* fix test

* fix template
2019-09-05 22:20:09 -04:00
Lunny XiaoandLauris BH 6ed22ffd16 Add merged commit id on pull view when it's merged (#8062) 2019-09-03 09:29:36 +03:00
Lunny Xiaoandtechknowlogick 5616356a0b keep blame view buttons sequence consistent with normal view when view a file (#8007) 2019-08-27 22:23:18 -04:00
Lunny XiaoandAntoine GIRARD f83db078f0 Move database settings from models to setting (#7806)
* move database settings from models to setting

* update docs

* fix checkout pr

* fix tests

* fix lint

* remove unsupported tidb options

* correct wrong variable name

* remove tidb totally
2019-08-24 11:24:45 +02:00
Lunny Xiaoandzeripath 9f58187f11 Add release notes of 1.9.2 (#7934) (#7939)
* Add release notes of 1.9.2

* add missing issue
2019-08-22 17:42:28 +01:00
Lunny XiaoandGitHub 111d31d681 don't convert buffer to string (#7115) 2019-08-22 12:52:40 +08:00
Lunny XiaoandGitHub 09ca391230 Add file status on API (#7671)
* add file status on API

* fix tests

* fix tests

* fix tests
2019-08-21 13:16:22 +08:00
Lunny Xiaoandzeripath ed58919bfc fix bug when migrating a private repository (#7917) 2019-08-20 21:21:07 +01:00
Lunny XiaoandAntoine GIRARD 9b9d162194 fix wrong sender when send slack webhook (#7918) 2019-08-20 17:05:30 +02:00
Lunny XiaoandLauris BH 2d0b90c967 Fix upload file type check (#7890)
* fix upload file type check

* make the function simple and added tests

* Update comment as per @silverwind
2019-08-17 13:10:17 +03:00
Lunny XiaoandGitHub 85202d4784 Display ui time with customize time location (#7792)
* display ui time with customize time location

* fix lint

* rename UILocation to DefaultUILocation

* move time related functions to modules/timeutil

* fix tests

* fix tests

* fix build

* fix swagger
2019-08-15 22:46:21 +08:00
a077c9d551 Add changelog of v1.9.1 (#7859) (#7866)
* add changelog of v1.9.1

* Update CHANGELOG.md

Co-Authored-By: Lauris BH <lauris@nix.lv>

* mention releases build by go1.12.8

* Update CHANGELOG.md

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-08-15 10:45:21 +08:00
Lunny XiaoandGitHub c021890930 move CreateReview to moduels/pull (#7841) 2019-08-14 23:32:19 +08:00
b16be15803 Display error as string but not bytes (#7780)
* display error as string but not bytes

* Update routers/repo/http.go

Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com>
2019-08-07 19:33:29 +03:00
Lunny XiaoandLauris BH c832f0eef7 Fix approvals counting (#7757)
* fix approvals counting

* fix tests

* fmt
2019-08-07 07:22:41 +03:00
Lunny XiaoandGitHub 4328d8e8d7 fix rename failed when rewrite public keys (#7761) 2019-08-06 14:32:11 +08:00
Lunny XiaoandLauris BH 7b009626da Add SQL execution on log and indexes on table repository and comment (#7740)
* add index on comment

* add SQL execution time on log and index owner_id on repository

* add migration
2019-08-05 17:29:40 +03:00
Lunny Xiaoandtechknowlogick 5b902e2368 add pagination for admin api get orgs and fix only list public orgs bug (#7742) 2019-08-04 14:33:36 -04:00
Lunny XiaoandLauris BH 7d9a13035e display as error (#7724) 2019-08-03 10:07:51 +03:00
Lunny Xiaoandtechknowlogick e503794371 remove unnecessary fmt on generate bindata (#7706) 2019-08-01 13:34:46 -04:00
Lunny Xiaoandtechknowlogick 02999c9a44 improve branches list performance and fix protected branch icon when no-login (#7695) 2019-08-01 10:50:06 -04:00
Lunny XiaoandGitHub 0742f717ad fix duplicated webhook when creating issue with assignees (#7681) 2019-07-31 17:24:38 +08:00
Lunny XiaoandGitHub e7d4895732 Move commit repo action from models to repofiles package (#7645)
* move commit repo action from models to repofiles package

* fix unit tests
2019-07-30 09:59:10 +08:00
Lunny Xiaoandzeripath a94ae7acb0 fix bug on migrating milestone from github (#7665) 2019-07-29 16:41:22 +01:00
Lunny XiaoandGitHub 0c927b1606 change length of some repository's columns (#7652) 2019-07-29 11:29:42 +08:00
Lunny Xiaoandzeripath 6782a704ef Fix bug create/edit wiki pages when code master branch protected (#7580)
* fix bug create/edit wiki pages when code master branch protected

* improve FullPushingEnvironment function
2019-07-25 22:50:20 +01:00
Lunny XiaoandGitHub 2c5c458dd7 Move models.PushUpdate to repofiles.PushUpdate (#7485)
* move models.PushUpdate to repofiles.PushUpdate

* remove duplicated code to load repo
2019-07-24 15:13:26 +08:00
Lunny Xiaoandzeripath e0d6d2f978 Fix repository's pull request count error (#7518)
* fix pr count error

* fix tests
2019-07-18 22:51:33 +01:00
Lunny Xiaoandtechknowlogick 8ad64574ee Fix markdown invoke sequence (#7513) 2019-07-18 16:23:27 -04:00
Lunny XiaoandGitHub 8ea60e7e61 remove duplicated webhook trigger (#7511) 2019-07-18 16:54:55 +08:00
Lunny Xiaoandtechknowlogick 0e2996caa1 fix missing queue type on app.ini.sample (#7494) 2019-07-17 12:23:54 -04:00
Lunny XiaoandGitHub ce087c58ef Remove settting dependency on modules/session (#7237)
* remove settting dependency on modules/session

* fix fmt

* fix tests

* fix lint
2019-07-17 09:04:37 +08:00
Lunny Xiaoandtechknowlogick d2958d9f46 Move status table to cron package (#7370) 2019-07-15 20:13:03 -04:00
Lunny XiaoandGitHub 2739a0be98 only create opened pull request when migrating from github (#7463) 2019-07-14 17:16:15 +08:00
Lunny XiaoandGitHub d95237b561 add notification placeholder (#7409) 2019-07-12 16:55:46 +08:00
Lunny XiaoandGitHub b84a251fca upgrade macaron/captcha to fix random error problem (#7407) 2019-07-10 13:26:42 +08:00
Lunny XiaoandGitHub f03e5b7c3e fix vendor (#7394) 2019-07-09 14:27:02 +08:00
Lunny XiaoandLauris BH 427a161c67 Fix migration tests since #7 fixed (#7375)
* fix migration tests since #7 fixed

* fix test time
2019-07-08 13:10:56 +03:00
Lunny Xiaoandtechknowlogick 87404d7c0b Use vendors when go generate (#7340)
* use vendors when go generate

* update docs about golang minimal requirement from 1.9 to 1.11

* fix build
2019-07-06 23:00:41 -04:00
Lunny Xiaoandtechknowlogick 337d6915ff Detect migrating batch size (#7353)
* Make migrating batch size as configurable

* detect different table batch insert size and remove config item

* remove unrelated changes
2019-07-06 15:24:50 -04:00
Lunny Xiaoandzeripath b5aa7f7ceb fix api route (#7346) 2019-07-03 06:31:29 +01:00
Lunny Xiaoandzeripath e728b55812 Fix bug conflict between SyncReleasesWithTags and InsertReleases (#7337)
* fix bug conflict between SyncReleasesWithTags and InsertReleases

* fix tests

* fix fmt
2019-07-01 22:17:16 +01:00
Lunny Xiaoandtechknowlogick 1772c6b94d fix pull view ui merge section (#7335)
* fix pull view ui merge section

* fix tests

* fix tests
2019-07-01 00:08:43 -04:00
Lunny Xiaoandzeripath ff85dd3e12 Add commit statuses reports on pull request view (#6845)
* Add commit statuses reports on pull view

* Add some translations

* improve the UI

* fix fmt

* fix tests

* add a new test git repo to fix tests

* fix bug when headRepo or headBranch missing

* fix tests

* fix tests

* fix consistency

* fix tests

* fix tests

* change the test repo

* fix tests

* fix tests

* fix migration

* keep db size consistency

* fix translation

* change commit hash status table unique index

* remove unused table

* use char instead varchar

* make hashCommitStatusContext private

* split merge section with status check on pull view ui

* fix tests; fix arc-green theme on pull ui
2019-06-30 08:57:59 +01:00
Lunny XiaoandGitHub 462284e2f5 Use batch insert on migrating repository to make the process faster (#7050)
* Use batch insert on migrating repository to make the process faster

* fix lint

* fix tests

* fix comments
2019-06-29 21:38:22 +08:00
Lunny Xiaoandzeripath d741316aae add commitgraph support global default true when git version >= 2.18 (#7313) 2019-06-29 12:46:25 +01:00
Lunny Xiaoandtechknowlogick edc94c7041 Monitor all git commands; move blame to git package and replace git as a variable (#6864)
* monitor all git commands; move blame to git package and replace git as a variable

* use git command but not other commands

* fix build

* move exec.Command to git.NewCommand

* fix fmt

* remove unrelated changes

* remove unrelated changes

* refactor IsEmpty and add tests

* fix tests

* fix tests

* fix tests

* fix tests

* remove gitLogger

* fix fmt

* fix isEmpty

* fix lint

* fix tests
2019-06-26 14:15:26 -04:00
Lunny XiaoandGitHub 161e12e157 Shadow the password on cache and session config on admin panel (#7300)
* shadow the password on cache and session config on admin panel

* add shadow password of mysql/postgres/couchbase

* fix log import
2019-06-27 00:12:38 +08:00
Lunny XiaoandGitHub 42729b7562 fix API link header (#7298) 2019-06-26 16:51:32 +08:00
Lunny XiaoandLauris BH aa7c34cf86 Fix error log when loading issues caused by a xorm bug (#7271)
* fix error log when loading issues caused by a xorm bug

* upgrade packages

* fix fmt

* fix Consistency

* fix tests
2019-06-23 18:22:43 +03:00
Lunny XiaoandLauris BH 8ec659722d Only check and config git on web subcommand but not others (#7236)
* only check and config git on web subcommand but not others

* add Init in git tests
2019-06-19 19:53:37 +03:00
Lunny Xiaoandtechknowlogick 392fe6c943 Fix migration panic when Head.User is not exist (#7226)
* fix migration panic when Head.User is not exist

* fix test
2019-06-18 12:15:39 -04:00
Lunny Xiaoandzeripath 1e8a616426 show lfs config on admin panel (#7220) 2019-06-16 19:24:49 +01:00
Lunny XiaoandGitHub d8168b356d Add missing description of label on API (#7159)
* add missing description of label on API

* fix comment head

* fix swagger
2019-06-16 20:39:52 +08:00
Lunny Xiaoandzeripath 0323122fd7 fix duplicated file on pull request conflicted files (#7211) 2019-06-15 15:22:26 +01:00
Lunny Xiaoandtechknowlogick 5832f8d90d Fix database lock when use random repository fallback image (#7166)
* fix database lock when use random repository fallback image

* remove unused function
2019-06-11 20:12:13 -04:00
Lunny XiaoandGitHub 74690f6451 fix pusher name via ssh push (#7167) 2019-06-11 09:13:24 +08:00
Lunny Xiaoandtechknowlogick b3b468444b Revert "make modules/structs as a spereate go mod (#7127)" (#7175)
This reverts commit 835b53fc25.
2019-06-10 15:55:58 -04:00
Lunny XiaoandGitHub 835b53fc25 make modules/structs as a spereate go mod (#7127) 2019-06-10 23:20:49 +08:00
Lunny XiaoandGitHub 7162fbf3d6 if milestone id is zero don't get it from database (#7169) 2019-06-10 22:16:02 +08:00
Lunny XiaoandGitHub d93e6232e8 Move PushUpdate dependency from models to repofiles (#6763)
* remove push_update

* move models.PushUpdate to repofiles.PushUpdate
2019-06-10 19:35:13 +08:00
23a2ee3510 Add command to convert mysql database from utf8 to utf8mb4 (#7144)
* add command to convert mysql database from utf8 to utf8mb4

* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update models/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update models/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
2019-06-08 21:53:45 +08:00
Lunny XiaoandGitHub 6fb31a5461 fix GCArgs load from ini (#7156) 2019-06-08 19:47:46 +08:00
Lunny XiaoandLauris BH 83b90e4199 Use vfsgen instead of go-bindata (#7080)
* use vfsgen instead of go-bindata

* fix templates

* fix fmt

* vendor vsfgen
2019-06-03 00:43:47 +03:00
Lunny Xiaoandzeripath 8a343dda39 update go git from v4.10.0 to v4.11.0 (#7096) 2019-05-31 20:34:46 +01:00
Lunny Xiaoandtechknowlogick 7d12ec2abd improve github downloader on migrations (#7049)
* improve github downloader on migrations

* fix tests

* fix  uppercase function parameters
2019-05-30 16:26:57 -04:00
Lunny Xiaoandtechknowlogick d67fd69474 fix charset was not saved after installation finished (#7048) 2019-05-26 13:36:33 -04:00
Lunny Xiaoandtechknowlogick f3d87da3e2 Revert "Bugfix: Align comment label and actions to the right (#7024)" (#7055)
This reverts commit 0c432d26fe.
2019-05-26 12:55:53 -04:00
Lunny XiaoandLauris BH c2f3938a58 fix possbile mysql invalid connnection error (#7051) 2019-05-26 16:28:33 +03:00
Lunny XiaoandGitHub 063fa99159 when git version >= 2.18, git command could run with git wire protocol version 2 param if enabled (#7047) 2019-05-26 17:50:06 +08:00
Lunny Xiaoandzeripath 355ab0c62c Fix wrong init dependency on markup extensions (#7038)
* fix wrong init dependency on markup extensions
2019-05-25 18:15:39 +01:00
Lunny Xiaoandtechknowlogick d5a98a2969 Add support of utf8mb4 for mysql (#6992) 2019-05-24 00:15:26 -04:00
Lunny XiaoandGitHub 1f84970de0 Make webhook http connections resuable (#6976)
* make http connections resuable

* add error handler

* fix lint
2019-05-21 15:20:17 +08:00
Lunny XiaoandLauris BH 02542a2c15 fix missing repo description when migrating (#7000) 2019-05-20 15:43:43 +03:00
Lunny XiaoandGitHub c385dcc26b Fix index produces problem when issues/pulls deleted (#6973)
* fix index produces problem when issues/pulls deleted

* fix tests

* fix tests

* fix tests
2019-05-18 10:37:49 +08:00
Lunny XiaoandGitHub 710245e81e Refactor models.NewRepoContext to extract git related codes to modules/git (#6941)
* refactor models.NewRepoContext to extract git related codes to modules/git

* fix imports

* refactor
2019-05-15 09:57:00 +08:00
Lunny Xiaoandtechknowlogick 24a536d145 Remove macaron dependent on models (#6940) 2019-05-14 09:52:18 -04:00
Lunny XiaoandLauris BH 8b36f01f45 Move xorm logger bridge from log to models so that log module could be a standalone package (#6944)
* move xorm logger bridge from log to models so that log module could be a standalone package

* fix tests

* save logger on xorm log bridge
2019-05-14 10:04:07 +03:00
Lunny Xiaoandtechknowlogick 6123840745 Remove macaron dependent on modules/log (#6933) 2019-05-13 22:55:52 -04:00
Lunny XiaoandLauris BH e63274ee09 remove macaron dependent on models/mail.go (#6931) 2019-05-14 01:53:54 +03:00
Lunny XiaoandGitHub 34eee25bd4 Move sdk structs to modules/structs (#6905)
* move sdk structs to moduels/structs

* fix tests

* fix fmt

* fix swagger

* fix vendor
2019-05-11 18:21:34 +08:00
Lunny XiaoandLauris BH 13cd28602e Change the color of issues/pulls list, merged is purple and closed is red (#6874) 2019-05-08 10:50:15 +03:00
Lunny Xiaoandtechknowlogick 9f18b23129 Fix 404 when send pull request some situation (#6871) 2019-05-07 13:20:23 -04:00
Lunny XiaoandGitHub 08069dc465 Improve migrations to support migrating 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
2019-05-07 09:12:51 +08:00
Lunny XiaoandLauris BH 01ebd52a1f fix config ui error about cache ttl (#6861) 2019-05-06 17:35:11 +03:00
Lunny XiaoandGitHub 2382f1b057 fix 500 when reviewer is deleted with integration tests (#6856) 2019-05-06 20:09:31 +08:00
Lunny Xiaoandtechknowlogick 5be1780045 update github.com/mcuadros/go-version to v0.0.0-20190308113854-92cdf37c5b75 (#6815) 2019-05-01 11:44:16 -04:00
Lunny XiaoandGitHub 4c34bc111c fix pulls broken when fork repository deleted (#6754)
* fix pulls broken when fork repository deleted

* fix lint
2019-04-26 11:03:39 +08:00
Lunny XiaoandLauris BH 199faadea3 Fix org visibility bug when git cloning (#6743)
* 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
2019-04-25 21:59:10 +03:00
Lunny XiaoandGitHub e8f4c7733a fix missing return (#6751) 2019-04-25 19:30:38 +08:00