Commit graph

1704 commits

Author SHA1 Message Date
KN4CK3R
440039c0cc
Add push to remote mirror repository (#15157)
* Added push mirror model.

* Integrated push mirror into queue.

* Moved methods into own file.

* Added basic implementation.

* Mirror wiki too.

* Removed duplicated method.

* Get url for different remotes.

* Added migration.

* Unified remote url access.

* Add/Remove push mirror remotes.

* Prevent hangs with missing credentials.

* Moved code between files.

* Changed sanitizer interface.

* Added push mirror backend methods.

* Only update the mirror remote.

* Limit refs on push.

* Added UI part.

* Added missing table.

* Delete mirror if repository gets removed.

* Changed signature. Handle object errors.

* Added upload method.

* Added "upload" unit tests.

* Added transfer adapter unit tests.

* Send correct headers.

* Added pushing of LFS objects.

* Added more logging.

* Simpler body handling.

* Process files in batches to reduce HTTP calls.

* Added created timestamp.

* Fixed invalid column name.

* Changed name to prevent xorm auto setting.

* Remove table header im empty.

* Strip exit code from error message.

* Added docs page about mirroring.

* Fixed date.

* Fixed merge errors.

* Moved test to integrations.

* Added push mirror test.

* Added test.
2021-06-14 19:20:43 +02:00
GiteaBot
5c2f9b3f83 [skip ci] Updated licenses and gitignores 2021-06-13 00:11:23 +00:00
GiteaBot
3dafb074c6 [skip ci] Updated translations via Crowdin 2021-06-10 00:11:49 +00:00
GiteaBot
b3ef6a61e5 [skip ci] Updated translations via Crowdin 2021-06-06 00:11:36 +00:00
GiteaBot
a38f62ad0f [skip ci] Updated translations via Crowdin 2021-06-04 00:11:34 +00:00
GiteaBot
6a7bf974be [skip ci] Updated translations via Crowdin 2021-06-03 00:11:34 +00:00
GiteaBot
c63d1d814c [skip ci] Updated translations via Crowdin 2021-06-01 00:11:31 +00:00
zeripath
7a484c0788
Hide mirror passwords on repo settings page (#16022)
This PR simply hides mirror passwords from being displayed on the repo settings page.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-05-31 11:46:20 +01:00
GiteaBot
518ed504ef [skip ci] Updated translations via Crowdin 2021-05-31 00:11:22 +00:00
GiteaBot
d8c99c64d5 [skip ci] Updated licenses and gitignores 2021-05-30 00:11:22 +00:00
GiteaBot
461915daa6 [skip ci] Updated translations via Crowdin 2021-05-29 00:11:33 +00:00
GiteaBot
e39e79d3ff [skip ci] Updated translations via Crowdin 2021-05-28 00:11:34 +00:00
Jimmy Praet
c9480c5f60
Add links to toggle WIP status (#14677)
* Add links to toggle PR WIP status

* Allow PR author to toggle WIP status

* refactors and restyling, remove links from translations

Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: silverwind <me@silverwind.io>
2021-05-27 22:02:04 +02:00
GiteaBot
b59afa272f [skip ci] Updated translations via Crowdin 2021-05-26 00:04:32 +00:00
Viktor Yakovchuk
5285a3e70e
Add possibility to make branch in branch page (#15960)
* Add possibility to make branch in branch page (#15911)

Add possibility to make branch in branch page
in the area next to Download and Delete buttons.
It is a more intuitive place in the interface
compared to what is already there.

Signed-off-by: Viktor Yakovchuk <viktor@yakovchuk.net>

* Update templates/repo/branch/list.tmpl

Co-authored-by: zeripath <art27@cantab.net>
2021-05-24 15:57:46 +01:00
GiteaBot
44d76ff7cb [skip ci] Updated translations via Crowdin 2021-05-22 00:04:28 +00:00
zeripath
17be645498
Encrypt LDAP bind password in db with SECRET_KEY (#15547)
* Encrypt LDAP bind password in db with SECRET_KEY

The LDAP source bind password are currently stored in plaintext in the db
This PR simply encrypts them with the setting.SECRET_KEY.

Fix #15460

Signed-off-by: Andrew Thornton <art27@cantab.net>

* remove ui warning regarding unencrypted password

Co-authored-by: silverwind <me@silverwind.io>
2021-05-20 09:29:57 +01:00
GiteaBot
124b256c53 [skip ci] Updated translations via Crowdin 2021-05-20 00:25:08 +00:00
GiteaBot
825547b20e [skip ci] Updated translations via Crowdin 2021-05-19 00:25:09 +00:00
GiteaBot
1da0d156bc [skip ci] Updated translations via Crowdin 2021-05-18 00:25:04 +00:00
GiteaBot
131b59ef89 [skip ci] Updated translations via Crowdin 2021-05-17 00:25:05 +00:00
Lunny Xiao
892e6561ff
Use a special name for update default branch on repository setting (#15893) 2021-05-16 14:24:47 -04:00
GiteaBot
41136db47e [skip ci] Updated licenses and gitignores 2021-05-16 00:25:04 +00:00
GiteaBot
f3febeb594 [skip ci] Updated translations via Crowdin 2021-05-15 00:25:06 +00:00
zeripath
d234d37aa8
Restore PAM user autocreation functionality (#15825)
* Restore PAM user autocreation functionality

PAM autoregistration of users currently fails due to email invalidity.
This PR adds a new setting to PAM to allow an email domain to be set
or just sets the email to the noreply address and if that fails falls
back to uuid@localhost

Fix #15702

Signed-off-by: Andrew Thornton <art27@cantab.net>

* As per KN4CKER

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-05-13 23:11:47 +01:00
GiteaBot
6d2a333fdc [skip ci] Updated translations via Crowdin 2021-05-13 00:25:06 +00:00
GiteaBot
96b1315e6e [skip ci] Updated translations via Crowdin 2021-05-12 00:12:06 +00:00
6543
a229e34387
Allow only internal registration (#15795)
* Add ALLOW_ONLY_INTERNAL_REGISTRATION into settings

* OpenID respect setting too
2021-05-09 16:13:35 +02:00
Jonathan Tran
9557b8603a
Add selecting tags on the compare page (#15723)
* Add selecting tags on the compare page

* Remove unused condition and change indentation

* Fix tag tab in dropdown to be black

* Add compare tag integration test

Co-authored-by: Jonathan Tran <jon@allspice.io>
2021-05-07 23:10:05 +02:00
Loutro
34b21625c2
Display specific message if diff is not displayed because of too long line (#15611)
* 7184-  message if line too long

* Update options/locale/locale_en-US.ini

Co-authored-by: silverwind <me@silverwind.io>

* add flag on missing cases

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2021-05-04 13:58:49 +01:00
GiteaBot
ed39377900 [skip ci] Updated translations via Crowdin 2021-05-04 00:12:31 +00:00
Jonathan Tran
5e047b9bd7
Add compare tag dropdown to releases page (#15695)
* Add compare tag dropdown to releases page

* Change defaults to be more intuitive and remove unneeded option

* Fix to select branch on releases page

Co-authored-by: Jonathan Tran <jon@allspice.io>
Co-authored-by: Kyle D <kdumontnu@gmail.com>
2021-05-03 13:27:48 -04:00
GiteaBot
87f8a3d39b [skip ci] Updated translations via Crowdin 2021-05-03 00:12:17 +00:00
a1012112796
ae6d7860be
add cron job to delete old actions from database (#15688)
that's a way to save database storage space.

Signed-off-by: a1012112796 <1012112796@qq.com>
2021-05-01 14:17:02 +02:00
GiteaBot
5811e162ae [skip ci] Updated translations via Crowdin 2021-05-01 00:12:19 +00:00
GiteaBot
e711050450 [skip ci] Updated translations via Crowdin 2021-04-27 00:12:19 +00:00
GiteaBot
e91932bc15 [skip ci] Updated translations via Crowdin 2021-04-23 00:12:28 +00:00
GiteaBot
d85a4e8cec [skip ci] Updated translations via Crowdin 2021-04-21 00:12:23 +00:00
GiteaBot
3a49c00f0d [skip ci] Updated translations via Crowdin 2021-04-20 00:12:27 +00:00
GiteaBot
7417628f8d [skip ci] Updated translations via Crowdin 2021-04-18 00:12:19 +00:00
GiteaBot
eee30d5586 [skip ci] Updated translations via Crowdin 2021-04-17 00:12:20 +00:00
Kyle D
f44543a1bb
Disable Stars config option (#14653)
* Add config option to disable stars

* Replace "stars" with watched in user profile

* Add documentation
2021-04-15 18:53:57 +02:00
GiteaBot
35381a0e4f [skip ci] Updated translations via Crowdin 2021-04-14 00:12:38 +00:00
GiteaBot
d42509a534 [skip ci] Updated translations via Crowdin 2021-04-12 00:12:18 +00:00
GiteaBot
0c77e0791c [skip ci] Updated translations via Crowdin 2021-04-11 00:12:21 +00:00
zeripath
9a0858cecf
SHA in merged commit comment should be rendered ui sha (#15376)
* SHA in merged commit comment should be rendered ui sha

On a PR page the sha of the merge commit should be rendered in monospace
as a SHA. Also fixes an issue with the manually merged string.

Fix #15049

Signed-off-by: Andrew Thornton <art27@cantab.net>

* issues.force_push_codes needs this too.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-04-09 22:24:59 -04:00
GiteaBot
d0eeba9ff9 [skip ci] Updated translations via Crowdin 2021-04-10 00:13:11 +00:00
koalp
3dc099773d
Fix mirror_lfs source string in en-US locale (#15369)
The mirror_lfs source string was set to "Large File System" instead of "Large File Storage"

This has been fixed
2021-04-09 11:00:32 -04:00
KN4CK3R
c03e488e14
Add LFS Migration and Mirror (#14726)
* Implemented LFS client.

* Implemented scanning for pointer files.

* Implemented downloading of lfs files.

* Moved model-dependent code into services.

* Removed models dependency. Added TryReadPointerFromBuffer.

* Migrated code from service to module.

* Centralised storage creation.

* Removed dependency from models.

* Moved ContentStore into modules.

* Share structs between server and client.

* Moved method to services.

* Implemented lfs download on clone.

* Implemented LFS sync on clone and mirror update.

* Added form fields.

* Updated templates.

* Fixed condition.

* Use alternate endpoint.

* Added missing methods.

* Fixed typo and make linter happy.

* Detached pointer parser from gogit dependency.

* Fixed TestGetLFSRange test.

* Added context to support cancellation.

* Use ReadFull to probably read more data.

* Removed duplicated code from models.

* Moved scan implementation into pointer_scanner_nogogit.

* Changed method name.

* Added comments.

* Added more/specific log/error messages.

* Embedded lfs.Pointer into models.LFSMetaObject.

* Moved code from models to module.

* Moved code from models to module.

* Moved code from models to module.

* Reduced pointer usage.

* Embedded type.

* Use promoted fields.

* Fixed unexpected eof.

* Added unit tests.

* Implemented migration of local file paths.

* Show an error on invalid LFS endpoints.

* Hide settings if not used.

* Added LFS info to mirror struct.

* Fixed comment.

* Check LFS endpoint.

* Manage LFS settings from mirror page.

* Fixed selector.

* Adjusted selector.

* Added more tests.

* Added local filesystem migration test.

* Fixed typo.

* Reset settings.

* Added special windows path handling.

* Added unit test for HTTPClient.

* Added unit test for BasicTransferAdapter.

* Moved into util package.

* Test if LFS endpoint is allowed.

* Added support for git://

* Just use a static placeholder as the displayed url may be invalid.

* Reverted to original code.

* Added "Advanced Settings".

* Updated wording.

* Added discovery info link.

* Implemented suggestion.

* Fixed missing format parameter.

* Added Pointer.IsValid().

* Always remove model on error.

* Added suggestions.

* Use channel instead of array.

* Update routers/repo/migrate.go

* fmt

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
2021-04-08 18:25:57 -04:00
GiteaBot
75dfc46d7c [skip ci] Updated translations via Crowdin 2021-04-07 00:12:18 +00:00
GiteaBot
7bf1e7a18b [skip ci] Updated translations via Crowdin 2021-04-06 00:12:35 +00:00
GiteaBot
f2715b8e29 [skip ci] Updated translations via Crowdin 2021-04-04 00:12:19 +00:00
GiteaBot
42e62facf7 [skip ci] Updated translations via Crowdin 2021-04-03 00:12:19 +00:00
6543
80d6c6d7de
[refactor] mailer service (#15072)
* Unexport SendUserMail

* Instead of "[]*models.User" or "[]string" lists infent "[]*MailRecipient" for mailer

* adopt

* code format

* TODOs for "i18n"

* clean

* no fallback for lang -> just use english

* lint

* exec testComposeIssueCommentMessage per lang and use only emails

* rm MailRecipient

* Dont reload from users from db if you alredy have in ram

* nits

* minimize diff

Signed-off-by: 6543 <6543@obermui.de>

* localize subjects

* linter ...

* Tr extend

* start tmpl edit ...

* Apply suggestions from code review

* use translation.Locale

* improve mailIssueCommentBatch

Signed-off-by: Andrew Thornton <art27@cantab.net>

* add i18n to datas

Signed-off-by: Andrew Thornton <art27@cantab.net>

* a comment

Co-authored-by: Andrew Thornton <art27@cantab.net>
2021-04-02 11:25:13 +01:00
GiteaBot
54eae008d9 [skip ci] Updated translations via Crowdin 2021-04-02 00:16:50 +00:00
GiteaBot
f07b137e04 [skip ci] Updated translations via Crowdin 2021-04-01 00:16:36 +00:00
GiteaBot
9d57373144 [skip ci] Updated translations via Crowdin 2021-03-31 00:12:40 +00:00
GiteaBot
0e7a2fb9e2 [skip ci] Updated translations via Crowdin 2021-03-30 00:12:39 +00:00
KN4CK3R
0c6137617f
Add Tabular Diff for CSV files (#14661)
Implements request #14320 The rendering of CSV files does match the diff style.

* Moved CSV logic into base package.

* Added method to create a tabular diff.

* Added CSV compare context.

* Added CSV diff template.

* Use new table style in CSV markup.

* Added file size limit for CSV rendering.

* Display CSV parser errors in diff.

* Lazy read single file.

* Lazy read rows for full diff.

* Added unit tests for various CSV changes.
2021-03-29 22:44:28 +02:00
GiteaBot
3416e2a825 [skip ci] Updated translations via Crowdin 2021-03-29 00:12:37 +00:00
parnic
f4d27498bd
Add DefaultMergeStyle option to repository (#14789)
Fixes #12293
2021-03-27 15:55:40 +01:00
GiteaBot
0048d7c7cf [skip ci] Updated translations via Crowdin 2021-03-25 00:12:38 +00:00
GiteaBot
4c4a86bf8c [skip ci] Updated translations via Crowdin 2021-03-23 00:12:49 +00:00
GiteaBot
e6377d5eb4 [skip ci] Updated translations via Crowdin 2021-03-22 00:12:36 +00:00
GiteaBot
bb5eb849f2 [skip ci] Updated translations via Crowdin 2021-03-20 00:12:40 +00:00
GiteaBot
99707791ed [skip ci] Updated translations via Crowdin 2021-03-19 00:13:12 +00:00
GiteaBot
03e99f847c [skip ci] Updated translations via Crowdin 2021-03-18 00:12:43 +00:00
GiteaBot
5bb544e3ae [skip ci] Updated translations via Crowdin 2021-03-17 00:12:36 +00:00
GiteaBot
ad42adac93 [skip ci] Updated translations via Crowdin 2021-03-16 00:12:50 +00:00
zeripath
6e423d5573
Ensure validation occurs on clone addresses too (#14994)
* Ensure validation occurs on clone addresses too

Fix #14984

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix lint

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix test

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix api tests

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-03-15 17:52:11 -04:00
GiteaBot
f5aaa74b90 [skip ci] Updated licenses and gitignores 2021-03-14 00:12:26 +00:00
GiteaBot
cc6470425c [skip ci] Updated translations via Crowdin 2021-03-13 00:12:41 +00:00
GiteaBot
21be2aee1a [skip ci] Updated translations via Crowdin 2021-03-12 00:12:35 +00:00
GiteaBot
a13c801b21 [skip ci] Updated translations via Crowdin 2021-03-11 00:12:39 +00:00
GiteaBot
b7208c727d [skip ci] Updated translations via Crowdin 2021-03-10 00:12:39 +00:00
GiteaBot
8ee4d977a1 [skip ci] Updated translations via Crowdin 2021-03-09 00:12:38 +00:00
GiteaBot
09fe0abb32 [skip ci] Updated translations via Crowdin 2021-03-08 00:12:25 +00:00
GiteaBot
4ba8572361 [skip ci] Updated licenses and gitignores 2021-03-07 00:12:31 +00:00
GiteaBot
fd4b309c6f [skip ci] Updated translations via Crowdin 2021-03-06 00:12:35 +00:00
a1012112796
a5279b74b6
Make manual merge autodetection optional and add manual merge as merge method (#12543)
* Make auto check manual merge as a chooseable mod and add manual merge way on ui

as title, Before this pr, we use same way with GH to check manually merge.
It good, but in some special cases, misjudgments can occur. and it's hard
to fix this bug. So I add option to allow repo manager block "auto check manual merge"
function, Then it will have same style like gitlab(allow empty pr). and to compensate for
not being able to detect THE PR merge automatically, I added a manual approach.

Signed-off-by: a1012112796 <1012112796@qq.com>

* make swager

* api support

* ping ci

* fix TestPullCreate_EmptyChangesWithCommits

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>

* Apply review suggestions and add test

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>

* fix build

* test error message

* make fmt

* Fix indentation issues identified by @silverwind

Co-authored-by: silverwind <me@silverwind.io>

* Fix tests and make manually merged disabled error on API the same

Signed-off-by: Andrew Thornton <art27@cantab.net>

* a small nit

* fix wrong commit id error

* fix bug

* simple test

* fix test

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-03-03 22:41:23 -05:00
GiteaBot
b2986ab8b2 [skip ci] Updated translations via Crowdin 2021-03-03 00:12:35 +00:00
GiteaBot
f878c8231f [skip ci] Updated translations via Crowdin 2021-03-02 00:12:37 +00:00
Paweł Bogusławski
85e6e07346
Organization removal confirmation using name not password (#14738)
* Organization removal confirmation using name not password

Gitea is asking for user password to confirm organization
removal so this operation cannot be done in systems with
SSO authentication (where no user passwords are used).

This mod changes the way gitea confirms organization
removal - user must enter organization name (not user
password) to confirm operation (similar to repository
removal confirmation).

Author-Change-Id: IB#1107219

* Translation removed

Translation removed from PR - will be restored using Crowdin
after pull got merged.

Fixes: 95ddcdd8bd8097a952894556d42641d5ec269288
Related: https://github.com/go-gitea/gitea/pull/14738
Author-Change-Id: IB#1107219
2021-03-01 16:33:05 +02:00
6543
a4148c0f12
Repository transfer has to be confirmed, if user can not create repo for new owner (#14792)
* make repo as "pending transfer" if on transfer start doer has no right to create repo in new destination

* if new pending transfer ocured, create UI & Mail notifications
2021-03-01 01:47:30 +01:00
GiteaBot
e0900310c4 [skip ci] Updated translations via Crowdin 2021-03-01 00:12:52 +00:00
a1012112796
83cf1a894e
Create tag on ui (#13467)
Support create single tag directly

support create tag with message from create release ui

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
2021-02-28 19:57:45 +00:00
6543
b4b4d765f3
Fix missleading sentence (#14829) 2021-02-28 07:54:12 +00:00
GiteaBot
4e7e3bd4bf [skip ci] Updated licenses and gitignores 2021-02-28 00:43:14 +00:00
KN4CK3R
904a26c57c
Add Image Diff options in Pull Request Diff view (#14450)
Implemented GitHub style image diff
2021-02-27 18:25:00 +01:00
GiteaBot
42118c6bc8 [skip ci] Updated translations via Crowdin 2021-02-27 00:19:24 +00:00
GiteaBot
97e5a1d7b3 [skip ci] Updated translations via Crowdin 2021-02-26 00:19:27 +00:00
GiteaBot
7aa48fe6f3 [skip ci] Updated translations via Crowdin 2021-02-25 00:19:26 +00:00
GiteaBot
6c012b7e49 [skip ci] Updated translations via Crowdin 2021-02-23 00:19:34 +00:00
GiteaBot
ff2a0e8dcd [skip ci] Updated translations via Crowdin 2021-02-22 13:46:10 +00:00
GiteaBot
73a093d60f [skip ci] Updated translations via Crowdin 2021-02-21 16:52:24 +00:00
GiteaBot
b56c19d819 [skip ci] Updated translations via Crowdin 2021-02-21 10:00:43 +00:00
Bagas Sanjaya
1f13229830
Add helper descriptions on new repo page (#14591)
* Add helper descriptions on new repo page

Add helpers for:
  * repo description
  * .gitignore
  * license
  * README
  * default branch
  * signature trust model

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>

* Oops, rename trust_model_helper

To match similar helper.

trust_model_helper_intro -> trust_model_helper

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
2021-02-21 17:59:31 +08:00
GiteaBot
d6068c1cf7 [skip ci] Updated licenses and gitignores 2021-02-21 00:19:09 +00:00
GiteaBot
7118347bae [skip ci] Updated translations via Crowdin 2021-02-20 22:10:05 +00:00
GiteaBot
835f301063 [skip ci] Updated translations via Crowdin 2021-02-20 10:19:10 +00:00
GiteaBot
db07aedd32 [skip ci] Updated translations via Crowdin 2021-02-20 04:28:10 +00:00
GiteaBot
404f3484ad [skip ci] Updated translations via Crowdin 2021-02-19 15:46:38 +00:00
Norwin
d38ae597e1
Add UI to delete tracked times (#14100)
Co-authored-by: 6543 <6543@obermui.de>
2021-02-19 12:52:11 +02:00
GiteaBot
6a696b93b1 [skip ci] Updated translations via Crowdin 2021-02-19 10:06:49 +00:00
Lunny Xiao
430b3b7806
Fix misleading word on delete repositories' archives (#14737) 2021-02-19 01:24:51 -05:00
GiteaBot
cc551dac97 [skip ci] Updated translations via Crowdin 2021-02-19 00:41:31 +00:00
GiteaBot
9c41ad03b4 [skip ci] Updated translations via Crowdin 2021-02-18 14:48:40 +00:00
GiteaBot
dc707aea09 [skip ci] Updated translations via Crowdin 2021-02-16 22:38:34 +00:00
zeripath
ad43b119a8
Add Password Algorithm option to install page (#14701)
Add Password Algorithm option to install page

Fix #14674 

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2021-02-16 23:37:20 +01:00
GiteaBot
ebddee8d2b [skip ci] Updated translations via Crowdin 2021-02-16 03:04:48 +00:00
GiteaBot
5e5b063c6f [skip ci] Updated translations via Crowdin 2021-02-14 14:52:16 +00:00
GiteaBot
f3847c9d82 [skip ci] Updated licenses and gitignores 2021-02-14 00:19:09 +00:00
GiteaBot
ed834126a6 [skip ci] Updated translations via Crowdin 2021-02-13 16:08:31 +00:00
a1012112796
ac701637b4
Add dismiss review feature (#12674)
* Add dismiss review feature

refs:
    https://github.blog/2016-10-12-dismissing-reviews-on-pull-requests/
    https://developer.github.com/v3/pulls/reviews/#dismiss-a-review-for-a-pull-request

* change modal ui and error message

* Add unDismissReview api

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
2021-02-11 18:32:25 +01:00
GiteaBot
f180009375 [skip ci] Updated translations via Crowdin 2021-02-08 01:01:27 +00:00
GiteaBot
c11db35aec [skip ci] Updated licenses and gitignores 2021-02-07 00:18:59 +00:00
GiteaBot
dcd20f4364 [skip ci] Updated translations via Crowdin 2021-02-01 21:58:33 +00:00
GiteaBot
a9188631b9 [skip ci] Updated translations via Crowdin 2021-02-01 04:50:39 +00:00
GiteaBot
05365816ab [skip ci] Updated translations via Crowdin 2021-01-29 15:53:59 +00:00
Lunny Xiao
0cd87d64ff
Update docs and comments to remove macaron (#14491) 2021-01-29 16:35:30 +01:00
GiteaBot
25b6255b92 [skip ci] Updated translations via Crowdin 2021-01-29 13:44:05 +00:00
a1012112796
f19da14c34
enhancement: add signoff option in commit form (#14516)
Signed-off-by: a1012112796 <1012112796@qq.com>
2021-01-29 16:57:45 +08:00
delvh
aec8029277
Fix missing locale bug introduced by #14429 (#14513)
Fixes #14512
2021-01-29 04:06:10 +01:00
GiteaBot
e45bf12a34 [skip ci] Updated translations via Crowdin 2021-01-28 12:31:28 +00:00
GiteaBot
fe5266a25b [skip ci] Updated translations via Crowdin 2021-01-27 17:47:55 +00:00
GiteaBot
2e90a256be [skip ci] Updated translations via Crowdin 2021-01-27 12:48:37 +00:00
GiteaBot
1080b27a39 [skip ci] Updated translations via Crowdin 2021-01-27 10:02:09 +00:00
Jui-Nan Lin
c10503afec
[Feature] add precise search type for Elastic Search (#12869)
* feat: add type query parameters for specifying precise search

* feat: add select dropdown in search box

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-01-27 12:00:35 +02:00
GiteaBot
5845c87b31 [skip ci] Updated translations via Crowdin 2021-01-26 22:48:54 +00:00
Brad Albright
a598877fdf
Cron job to cleanup hook_task table (#13080)
Close **Prune hook_task Table (#10741)**

Added a cron job to delete webhook deliveries in the hook_task table. It can be turned on/off and the schedule controlled globally via app.ini. The data can be deleted by either the age of the delivery which is the default or by deleting the all but the most recent deliveries _per webhook_.

Note: I had previously submitted pr #11416  but I closed it when I realized that I had deleted per repository instead of per webhook. Also, I decided allowing the settings to be overridden via the ui was overkill. Also this version allows the deletion by age which is probably what most people would want.
2021-01-26 22:02:42 +01:00
GiteaBot
afbddf1f0e [skip ci] Updated translations via Crowdin 2021-01-26 15:38:19 +00:00
Lunny Xiao
6433ba0ec3
Move macaron to chi (#14293)
Use [chi](https://github.com/go-chi/chi) instead of the forked [macaron](https://gitea.com/macaron/macaron). Since macaron and chi have conflicts with session share, this big PR becomes a have-to thing. According my previous idea, we can replace macaron step by step but I'm wrong. :( Below is a list of big changes on this PR.

- [x] Define `context.ResponseWriter` interface with an implementation `context.Response`.
- [x] Use chi instead of macaron, and also a customize `Route` to wrap chi so that the router usage is similar as before.
- [x] Create different routers for `web`, `api`, `internal` and `install` so that the codes will be more clear and no magic .
- [x] Use https://github.com/unrolled/render instead of macaron's internal render
- [x] Use https://github.com/NYTimes/gziphandler instead of https://gitea.com/macaron/gzip
- [x] Use https://gitea.com/go-chi/session which is a modified version of https://gitea.com/macaron/session and removed `nodb` support since it will not be maintained. **BREAK**
- [x] Use https://gitea.com/go-chi/captcha which is a modified version of https://gitea.com/macaron/captcha
- [x] Use https://gitea.com/go-chi/cache which is a modified version of https://gitea.com/macaron/cache
- [x] Use https://gitea.com/go-chi/binding which is a modified version of https://gitea.com/macaron/binding
- [x] Use https://github.com/go-chi/cors instead of https://gitea.com/macaron/cors
- [x] Dropped https://gitea.com/macaron/i18n and make a new one in `code.gitea.io/gitea/modules/translation`
- [x] Move validation form structs from `code.gitea.io/gitea/modules/auth` to `code.gitea.io/gitea/modules/forms` to avoid dependency cycle.
- [x] Removed macaron log service because it's not need any more. **BREAK**
- [x] All form structs have to be get by `web.GetForm(ctx)` in the route function but not as a function parameter on routes definition.
- [x] Move Git HTTP protocol implementation to use routers directly.
- [x] Fix the problem that chi routes don't support trailing slash but macaron did.
- [x] `/api/v1/swagger` now will be redirect to `/api/swagger` but not render directly so that `APIContext` will not create a html render. 

Notices:
- Chi router don't support request with trailing slash
- Integration test `TestUserHeatmap` maybe mysql version related. It's failed on my macOS(mysql 5.7.29 installed via brew) but succeed on CI.

Co-authored-by: 6543 <6543@obermui.de>
2021-01-26 16:36:53 +01:00
GiteaBot
3adbbb4255 [skip ci] Updated translations via Crowdin 2021-01-26 01:22:19 +00:00
GiteaBot
efe4235412 [skip ci] Updated translations via Crowdin 2021-01-24 23:38:47 +00:00
Andrew Bezold
bc05ddc0eb
Redirect on changed user and org name (#11649)
* Add redirect for user

* Add redirect for orgs

* Add user redirect test

* Appease linter

* Add comment to DeleteUserRedirect function

* Fix locale changes

* Fix GetUserByParams

* Fix orgAssignment

* Remove debug logging

* Add redirect prompt

* Dont Export DeleteUserRedirect & only use it within a session

* Unexport newUserRedirect

* cleanup

* Fix & Dedub API code

* Format Template

* Add Migration & rm dublicat

* Refactor: unexport newRepoRedirect() & rm dedub del exec

* if this fails we'll need to re-rename the user directory

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-01-24 16:23:05 +01:00
GiteaBot
4c3ccb096e [skip ci] Updated translations via Crowdin 2021-01-24 12:23:25 +00:00
GiteaBot
e35a2b65bc [skip ci] Updated licenses and gitignores 2021-01-24 00:19:18 +00:00
GiteaBot
4b7d85bfa5 [skip ci] Updated translations via Crowdin 2021-01-23 19:34:53 +00:00
GiteaBot
800c436b0b [skip ci] Updated translations via Crowdin 2021-01-23 14:45:16 +00:00
delvh
9872b8d97a
Improve Description in new/ edit Project template (#14429)
Fixes #14358

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2021-01-23 11:30:28 +01:00
GiteaBot
4d4cace5e7 [skip ci] Updated translations via Crowdin 2021-01-22 17:50:31 +00:00
GiteaBot
e35d1bf502 [skip ci] Updated translations via Crowdin 2021-01-22 07:23:00 +00:00
6543
a0e424da85
Enhance Ghost comment mitigation Settings (#14392)
* refactor models.DeleteComment and delete related reactions too

* use deleteComment for UserDeleteWithCommentsMaxDays in DeleteUser

* nits

* Use time.Duration as other time settings have

* docs

* Resolve Fixme & fix potential deadlock

* Disabled by Default

* Update Config Value Description

* switch args

* Update models/issue_comment.go

Co-authored-by: zeripath <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
2021-01-21 21:56:19 -05:00
GiteaBot
0e2e73410e [skip ci] Updated translations via Crowdin 2021-01-22 00:29:25 +00:00
EV3R4
af7054511e
Add TrN for repository limit (#12492)
* Added TrN for repository limit

* Removed form.reach_limit_of_creation_0

* disable Create Button if user can not create

Co-authored-by: 6543 <6543@obermui.de>
2021-01-22 00:44:37 +01:00
GiteaBot
aa4c33b43d [skip ci] Updated translations via Crowdin 2021-01-21 22:15:39 +00:00
GiteaBot
c05c0a1512 [skip ci] Updated translations via Crowdin 2021-01-21 19:35:12 +00:00
6543
81c833d92d
Add support to migrate from gogs (#14342)
Add support to migrate gogs:

  *  issues
  *  comments
  *  labels
  *  milestones
  *  wiki


Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2021-01-21 20:33:58 +01:00
Norwin
b5570d3e68
Display current stopwatch in navbar (#14122)
* add notification about running stopwatch to header

* serialize seconds, duration in stopwatches api

* ajax update stopwatch

i should get my testenv working locally...

* new variant: hover dialog

* noscript compatibility

* js: live-update stopwatch time

* js live update robustness
2021-01-21 15:51:52 +01:00
KN4CK3R
56a8929605
Comment - Reference in new issue (#14366)
* Implemented "Reference in new issue"

* Fixed menu style on "pulls/x/files" because "button" has a style.

* Added context menu for PR file comments.

* Use only a single modal for every comment.

* Use current repository as default. Added search filter.

* Added suggested changes.

* Fixed assignment.

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
2021-01-21 14:51:17 +01:00