Commit graph

1710 commits

Author SHA1 Message Date
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
GiteaBot
83c920d7fa [skip ci] Updated translations via Crowdin 2021-01-20 21:19:05 +00:00
Artemis Tosini
cb08248c33
Add support for ed25519_sk and ecdsa_sk SSH keys (#13462)
* Add support for ed25519_sk and ecdsa_sk SSH keys

These start with sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-nistp256@openssh.com.
They are supported in recent versions of go x/crypto/ssh and OpenSSH 8.2
or higher.

* skip ssh-keygen

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

Co-authored-by: Andrew Thornton <art27@cantab.net>
2021-01-20 20:36:55 +00:00
Ash McKenzie
6ff63c8202
Display error if twofaSecret cannot be retrieved (#14372) 2021-01-18 21:38:41 +01:00
GiteaBot
8e39157e92 [skip ci] Updated translations via Crowdin 2021-01-18 01:22:31 +00:00
GiteaBot
3aa53dc6bc [skip ci] Updated translations via Crowdin 2021-01-17 20:49:54 +00:00
6543
21da519c0c
Implement ghost comment mitigation (#14349)
* Implement ghost comment mitigation

Adds a config option USER_DELETE_WITH_COMMENTS_MAX_DAYS to the [service] section. See https://codeberg.org/Codeberg/Discussion/issues/24 for the underlying issue.

* cleanup

* use setting module correctly

* add to docs

Co-authored-by: Moritz Marquardt <git@momar.de>
2021-01-17 21:48:38 +01:00
Jimmy Praet
acb1ceb1f4
Add review requested filter on pull request overview (#13701)
* Add review requested filter on pull request overview #13682

fix formatting

* add review_requested filter to /repos/issues/search API endpoint

* only Approve and Reject status should supersede Request status

* add support for team reviews

* refactor: remove duplication of issue filtering conditions
2021-01-17 17:34:19 +01:00
GiteaBot
66e426b2f1 [skip ci] Updated translations via Crowdin 2021-01-17 14:17:10 +00:00
GiteaBot
e6155ff9b6 [skip ci] Updated translations via Crowdin 2021-01-16 11:24:18 +00:00
GiteaBot
76fefd803f [skip ci] Updated translations via Crowdin 2021-01-16 04:56:29 +00:00
GiteaBot
2db4733c7d [skip ci] Updated translations via Crowdin 2021-01-15 20:30:48 +00:00
6543
3091600cc8
KanBan: be able to set default board (#14147)
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
2021-01-15 22:29:32 +02:00
GiteaBot
c09e11d018 [skip ci] Updated translations via Crowdin 2021-01-15 09:39:56 +00:00
Lauris BH
6eee9f0f4e
Merge default and system webhooks under one menu (#14244) 2021-01-15 01:24:03 +02:00
GiteaBot
648d85d426 [skip ci] Updated translations via Crowdin 2021-01-13 15:54:47 +00:00
Jonathan Tran
81467e6f35
Display SVG files as images instead of text (#14101)
* Change to display SVG files as images

* Remove unsafe styles from SVG CSP

* Add integration test to test SVG headers

* Add config setting to disable SVG rendering

* Add test for img tag when loading SVG image

* Remove the Raw view button for svg files since we don't fully support this

* Fix copyright year

* Rename and move config setting

* Add setting to cheat sheet in docs

* Fix so that comment matches cheat sheet

* Add allowing styles in CSP based on pull request feedback

* Re-enable raw button since we show SVG styles now

* Change so that SVG files are editable

* Add UI to toggle between source and rendered image for SVGs

* Change to show blame button for SVG images

* Fix to update ctx data

* Add test for DetectContentType when file is longer than sniffLen

Co-authored-by: Jonathan Tran <jon@allspice.io>
Co-authored-by: Kyle D <kdumontnu@gmail.com>
2021-01-12 22:45:19 -05:00
GiteaBot
9465e60504 [skip ci] Updated translations via Crowdin 2021-01-13 00:51:06 +00:00
GiteaBot
9659808172 [skip ci] Updated translations via Crowdin 2021-01-10 18:06:29 +00:00
6543
6b3b6f1833
Add option to change username to the admin panel (#14229)
Co-authored-by: Bwko <bouwko@gmail.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: zeripath <art27@cantab.net>
2021-01-10 14:14:02 +02:00
GiteaBot
461406070c [skip ci] Updated translations via Crowdin 2021-01-07 13:41:39 +00:00
GiteaBot
8688c2be95 [skip ci] Updated translations via Crowdin 2021-01-06 15:12:41 +00:00
GiteaBot
91ceba0427 [skip ci] Updated translations via Crowdin 2021-01-06 01:39:13 +00:00
GiteaBot
4ef5f17a7e [skip ci] Updated translations via Crowdin 2021-01-05 13:56:10 +00:00
6543
325add71cf
Add option for administrator to reset user 2FA (#14243)
* Frontend

* Backend

* only show 2FA-Reset option if posible
2021-01-05 14:54:48 +01:00
Cirno the Strongest
8db0372a45
Handle NotifyCreateRef as create branch in feeds (#14245)
Co-authored-by: Lauris BH <lauris@nix.lv>
2021-01-04 18:51:00 +02:00
GiteaBot
af2fe9a733 [skip ci] Updated translations via Crowdin 2020-12-29 23:49:34 +00:00
GiteaBot
cfc3916b3f [skip ci] Updated translations via Crowdin 2020-12-29 00:39:54 +00:00
GiteaBot
d75f011345 [skip ci] Updated translations via Crowdin 2020-12-28 02:37:00 +00:00
Timo Ley
2b2a4a53bf
Custom icons for OAuth sources (#14161)
* Add Icon URL to Backend

* Template for Icon URL

* Localization & Edit Icon URL

* Improve Custom Icon URL

* Removed not working else

Co-authored-by: 6543 <6543@obermui.de>
2020-12-28 03:35:55 +01:00
GiteaBot
f6ca44c706 [skip ci] Updated translations via Crowdin 2020-12-27 19:59:15 +00:00
Jimmy Praet
40274b4a93
Team dashboards (#14159) 2020-12-27 21:58:03 +02:00
GiteaBot
5a1ccacac7 [skip ci] Updated translations via Crowdin 2020-12-26 18:23:50 +00:00
zeripath
ad1164f73b
Disable SSH key deletion of externally managed Keys (#13985)
* Disable SSH key addition and deletion when externally managed

When a user has a login source which has SSH key management
key addition and deletion using the UI should be disabled.

Fix #13983

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

* Make only externally managed keys disabled

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

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-12-25 23:24:47 -05:00
GiteaBot
4c2a1c01a8 [skip ci] Updated translations via Crowdin 2020-12-24 04:26:32 +00:00
GiteaBot
a9876bca82 [skip ci] Updated translations via Crowdin 2020-12-23 19:11:05 +00:00
GiteaBot
30edcd5c71 [skip ci] Updated translations via Crowdin 2020-12-22 15:55:30 +00:00
GiteaBot
c236fe2f10 [skip ci] Updated translations via Crowdin 2020-12-22 11:15:05 +00:00
GiteaBot
cd607b5f98 [skip ci] Updated translations via Crowdin 2020-12-22 03:48:23 +00:00
GiteaBot
6f1dddf5c3 [skip ci] Updated translations via Crowdin 2020-12-22 02:55:02 +00:00
Cirno the Strongest
2c9dd71140
Standardize Co-Authored-By / Reviewed-By strings (#14097)
* Standardize Co-Authored-By / Reviewed-By strings

* Use lowercase variant

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-12-21 21:19:33 -05:00
GiteaBot
f8fd8996c0 [skip ci] Updated translations via Crowdin 2020-12-21 23:04:32 +00:00
GiteaBot
1b1adab26c [skip ci] Updated translations via Crowdin 2020-12-21 14:41:16 +00:00
GiteaBot
3a500cf8c4 [skip ci] Updated translations via Crowdin 2020-12-21 13:13:27 +00:00
Norwin
7a3c71433a
expose translation of previously hardcoded string (#14087)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-12-21 21:12:13 +08:00
GiteaBot
7dd32276b7 [skip ci] Updated translations via Crowdin 2020-12-21 08:32:25 +00:00
DuckDuckWhale
e8a354f819
Locale: say another issue instead of this issue (#14082)
Saying "this issue" is confusing because it could be understood as the
issue that the user is currently viewing, not which the "issue" link
points to.
2020-12-21 08:11:39 +02:00
GiteaBot
029836c34c [skip ci] Updated translations via Crowdin 2020-12-20 01:32:15 +00:00
GiteaBot
e674478227 [skip ci] Updated translations via Crowdin 2020-12-19 22:31:48 +00:00
GiteaBot
cf6f8b22ca [skip ci] Updated translations via Crowdin 2020-12-13 02:49:02 +00:00
GiteaBot
de06ee6a30 [skip ci] Updated translations via Crowdin 2020-12-13 01:06:57 +00:00
GiteaBot
d07b8a75d7 [skip ci] Updated translations via Crowdin 2020-12-12 15:34:20 +00:00
GiteaBot
f8e9a3df40 [skip ci] Updated translations via Crowdin 2020-12-12 11:21:18 +00:00
silverwind
1837e647eb
Diff stat improvements (#13954)
* Diff stat improvements

- Combine number to just total number of changes
- Add tooltip over stats bar
- Increase contrast on file name
- Refactor classes and CSS to be more reusable

* misc tweaks

* make count bold
2020-12-12 02:06:22 +01:00
GiteaBot
5fdf500ace [skip ci] Updated translations via Crowdin 2020-12-11 16:05:31 +00:00
GiteaBot
0c5fca2d85 [skip ci] Updated translations via Crowdin 2020-12-10 16:20:32 +00:00
GiteaBot
bc1cf6e5d3 [skip ci] Updated translations via Crowdin 2020-12-10 05:45:12 +00:00
GiteaBot
338bfeebe7 [skip ci] Updated translations via Crowdin 2020-12-10 04:48:55 +00:00
Lunny Xiao
2d71cdb668
Add pull request manually merge instruction (#13840)
* add pull request command line instructions

* Add pull request manually merge instuction

* Fix styles

* Fix lint

* Move inline style to class file

* add space between merge button and hint text

* Add sentence end charcter

* Change the language file

* adjust secondary bg

* further adjustment

Co-authored-by: silverwind <me@silverwind.io>
2020-12-10 03:59:05 +01:00
GiteaBot
b830eca720 [skip ci] Updated translations via Crowdin 2020-12-07 12:09:02 +00:00
GiteaBot
654c480c99 [skip ci] Updated translations via Crowdin 2020-12-04 11:19:46 +00:00
GiteaBot
557479642d [skip ci] Updated translations via Crowdin 2020-12-04 07:34:40 +00:00
6543
48a3bb7a32
User Settings: Ignore empty language codes & validate (#13755) 2020-12-04 08:20:30 +02:00
GiteaBot
5d43d2965a [skip ci] Updated translations via Crowdin 2020-12-03 18:47:16 +00:00
GiteaBot
c2ac1c73f2 [skip ci] Updated translations via Crowdin 2020-11-29 15:53:10 +00:00
GiteaBot
4f82a0b12e [skip ci] Updated translations via Crowdin 2020-11-28 21:01:53 +00:00
a1012112796
9c26dc1f3a
Add block on official review requests branch protection (#13705)
Signed-off-by: a1012112796 <1012112796@qq.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-11-28 21:30:46 +02:00
GiteaBot
72e62ac12b [skip ci] Updated translations via Crowdin 2020-11-25 11:21:50 +00:00
GiteaBot
de1e4b2da9 [skip ci] Updated translations via Crowdin 2020-11-21 22:42:26 +00:00
Norwin
b651409c0a
Improve strings (#13548)
* Correct oauth signup title

When linking accounts, a password is not required anymore,
so this string becomes confusing

* string "remenber me": be more precise

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-20 22:32:27 -05:00
GiteaBot
6626a048df [skip ci] Updated translations via Crowdin 2020-11-18 22:01:29 +00:00
GiteaBot
859e3d3db6 [skip ci] Updated translations via Crowdin 2020-11-16 19:23:56 +00:00
GiteaBot
f0ed71251e [skip ci] Updated translations via Crowdin 2020-11-15 16:29:08 +00:00
Chris Shyi
d025d84d91
Add email validity check (#13475)
* Improve error feedback for duplicate deploy keys

Instead of a generic HTTP 500 error page, a flash message is rendered
with the deploy key page template so inform the user that a key with the
intended title already exists.

* API returns 422 error when key with name exists

* Add email validity checking

Add email validity checking for the following routes:
[Web interface]
1. User registration
2. User creation by admin
3. Adding an email through user settings
[API]
1. POST /admin/users
2. PATCH /admin/users/:username
3. POST /user/emails

* Add further tests

* Add signup email tests

* Add email validity check for linking existing account

* Address PR comments

* Remove unneeded DB session

* Move email check to updateUser

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-14 11:53:43 -05:00
GiteaBot
d0a676c8ff [skip ci] Updated translations via Crowdin 2020-11-13 17:24:39 +00:00
GiteaBot
ee7133d135 [skip ci] Updated translations via Crowdin 2020-11-12 16:00:39 +00:00
GiteaBot
6838bacc4c [skip ci] Updated translations via Crowdin 2020-11-11 20:35:20 +00:00
GiteaBot
9155f13bf8 [skip ci] Updated translations via Crowdin 2020-11-10 11:45:51 +00:00
GiteaBot
ffa712e783 [skip ci] Updated translations via Crowdin 2020-11-09 18:22:53 +00:00
GiteaBot
ef2ffc6aed [skip ci] Updated translations via Crowdin 2020-11-09 06:16:15 +00:00
GiteaBot
004b40dad0 [skip ci] Updated translations via Crowdin 2020-11-08 18:03:03 +00:00
zeripath
c05a8abc76
Multiple GitGraph improvements: Exclude PR heads, Add branch/PR links, Show only certain branches, (#12766)
* Multiple GitGraph improvements.

Add backend support for excluding PRs, selecting branches and files.

Fix #10327

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

* as per @silverwind

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

* as per @silverwind

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

* Only show refs in dropdown we display on the graph

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

* as per @silverwind

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

* use flexbox for ui header

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

* Move Hide Pull Request button to the dropdown

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

* Add SHA and user pictures

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

* fix test

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

* fix test 2

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

* fixes

* async

* more tweaks

* use tabs in tmpl

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

* remove commented thing

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

* fix linting

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

* Update web_src/js/features/gitgraph.js

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

* graph tweaks

* more tweaks

* add title

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

* fix loading indicator z-index and position

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-11-08 12:21:54 -05:00
GiteaBot
d4e0b28655 [skip ci] Updated translations via Crowdin 2020-11-08 16:30:44 +00:00
GiteaBot
ed47da2e29 [skip ci] Updated translations via Crowdin 2020-11-07 12:55:59 +00:00
GiteaBot
3c7908b51c [skip ci] Updated translations via Crowdin 2020-11-05 19:35:13 +00:00
GiteaBot
5b636bdec7 [skip ci] Updated translations via Crowdin 2020-11-05 14:21:49 +00:00
John Olheiser
7c68ac8f7d
Tags cleanup (#13428)
* Tags cleanup

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-11-05 08:20:42 -06:00
GiteaBot
dd882f6a69 [skip ci] Updated translations via Crowdin 2020-11-04 22:56:17 +00:00
GiteaBot
59c3cf6388 [skip ci] Updated translations via Crowdin 2020-11-04 07:15:15 +00:00
GiteaBot
951a333733 [skip ci] Updated translations via Crowdin 2020-11-03 15:49:01 +00:00
GiteaBot
fa8492fb70 [skip ci] Updated translations via Crowdin 2020-11-03 11:36:19 +00:00
GiteaBot
be880d4063 [skip ci] Updated translations via Crowdin 2020-11-03 06:05:23 +00:00
a1012112796
b687707014
Add the tag list page to the release page (#12096)
* Add the tag list page to the release page

* Add the tags list view
* Add the delete tag way on ui
* Not delete tag and clear message when delete a release

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

* Apply suggestions from code review

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>

* Apply suggestions from code review

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

* fix ui

* Add to header

* ui

* permission

* ui

* Update options/locale/locale_en-US.ini

Co-authored-by: Lauris BH <lauris@nix.lv>

* tweaks

* monospace commit hashes

* Add read permission check

* fix permission

* fix nit

* Update web_src/less/_base.less

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

* ui fixes

* title tweaks

* fix lint

* fix test

* fix test and some ui nits

* Apply suggestions from code review

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

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: silverwind <me@silverwind.io>
2020-11-02 18:10:22 -05:00
GiteaBot
fc40cdfa89 [skip ci] Updated translations via Crowdin 2020-11-02 15:59:27 +00:00
GiteaBot
8176ba6573 [skip ci] Updated translations via Crowdin 2020-11-01 20:05:29 +00:00
GiteaBot
e7750e0f6a [skip ci] Updated translations via Crowdin 2020-10-31 17:25:33 +00:00
GiteaBot
d01d39d6cf [skip ci] Updated translations via Crowdin 2020-10-31 12:18:38 +00:00
GiteaBot
e16a5bb634 [skip ci] Updated translations via Crowdin 2020-10-30 22:00:02 +00:00
GiteaBot
764237e78c [skip ci] Updated translations via Crowdin 2020-10-30 16:28:07 +00:00
GiteaBot
643a0a691a [skip ci] Updated translations via Crowdin 2020-10-29 21:42:52 +00:00
GiteaBot
bb89fa1aaa [skip ci] Updated translations via Crowdin 2020-10-27 20:07:43 +00:00
GiteaBot
afe9d79104 [skip ci] Updated translations via Crowdin 2020-10-26 16:43:30 +00:00
GiteaBot
dbebc6b0e3 [skip ci] Updated translations via Crowdin 2020-10-26 09:06:29 +00:00
Pedro Alves
c40df54e28
Group Label Changed Comments in timeline (#13304)
* Create function to group label comments

* Combine multiple label additions into one

* Group removed and added labels in the same comment

* Fix indentation on comments.tmpl

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

Co-authored-by: zeripath <art27@cantab.net>
2020-10-25 17:49:48 -04:00
GiteaBot
756c090dbe [skip ci] Updated translations via Crowdin 2020-10-25 20:57:54 +00:00
Divyam Bhasin
7974b34183
#12897 - add mastodon provider (#13293)
* added mastodon provider to oauth code

* changed go.mod and vendor/modules.txt to add updated goth

* vendored mastodon and new goth

* committing result of go mod tidy && go mod vendor

* added pic and mastodon to oauth models

* handled instance url

* applied lafriks suggestion

* Update web_src/js/index.js

Co-authored-by: techknowlogick <matti@mdranta.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <matti@mdranta.net>
2020-10-25 14:21:49 -04:00
GiteaBot
f565cf5dcf [skip ci] Updated translations via Crowdin 2020-10-25 17:20:28 +00:00
GiteaBot
65dc4d0410 [skip ci] Updated translations via Crowdin 2020-10-24 17:50:51 +00:00
GiteaBot
eef5871042 [skip ci] Updated translations via Crowdin 2020-10-24 16:49:12 +00:00
GiteaBot
2fa4c4ad3a [skip ci] Updated translations via Crowdin 2020-10-24 11:55:43 +00:00
zeripath
0800c7e91d
Rearrange the order of the merged by etc. in locale (#13284)
Fix #13260

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-10-23 23:34:21 -04:00
GiteaBot
e4d9533543 [skip ci] Updated translations via Crowdin 2020-10-23 16:00:48 +00:00
GiteaBot
bfc553164a [skip ci] Updated translations via Crowdin 2020-10-23 10:12:50 +00:00
GiteaBot
9912a11b33 [skip ci] Updated translations via Crowdin 2020-10-22 19:49:54 +00:00
GiteaBot
1989fe2ddc [skip ci] Updated translations via Crowdin 2020-10-22 18:03:41 +00:00
GiteaBot
e9869f59af [skip ci] Updated translations via Crowdin 2020-10-22 17:05:26 +00:00
GiteaBot
178861952e [skip ci] Updated translations via Crowdin 2020-10-22 15:46:58 +00:00
GiteaBot
e964c6ec18 [skip ci] Updated translations via Crowdin 2020-10-22 05:47:21 +00:00
GiteaBot
a06ea38207 [skip ci] Updated translations via Crowdin 2020-10-21 20:00:31 +00:00
GiteaBot
f0fe5683fe [skip ci] Updated translations via Crowdin 2020-10-21 15:43:44 +00:00
GiteaBot
53359b1861 [skip ci] Updated translations via Crowdin 2020-10-21 11:03:31 +00:00
zeripath
965861043a
Return the full rejection message and errors in flash errors (#13221)
Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-10-20 19:50:10 -04:00
GiteaBot
70cb9e38e2 [skip ci] Updated translations via Crowdin 2020-10-20 18:19:29 +00:00
GiteaBot
b50448b286 [skip ci] Updated translations via Crowdin 2020-10-20 12:54:03 +00:00
GiteaBot
d67172b136 [skip ci] Updated translations via Crowdin 2020-10-19 19:26:52 +00:00
GiteaBot
40779938a9 [skip ci] Updated translations via Crowdin 2020-10-18 17:52:36 +00:00
GiteaBot
27687fa4f0 [skip ci] Updated translations via Crowdin 2020-10-18 14:11:20 +00:00
GiteaBot
131278ff22 [skip ci] Updated translations via Crowdin 2020-10-16 17:14:34 +00:00
GiteaBot
bcf45bb162 [skip ci] Updated translations via Crowdin 2020-10-15 18:31:29 +00:00
GiteaBot
25f7e1c50b [skip ci] Updated translations via Crowdin 2020-10-15 09:49:02 +00:00
GiteaBot
deb0333c96 [skip ci] Updated translations via Crowdin 2020-10-15 08:18:52 +00:00
Iván Valdés
05c7e58742
Show outdated comments in pull request (#13148)
Co-authored-by: zeripath <art27@cantab.net>
2020-10-15 11:17:48 +03:00
GiteaBot
bfb3333528 [skip ci] Updated translations via Crowdin 2020-10-15 04:15:26 +00:00
GiteaBot
e4a3785218 [skip ci] Updated translations via Crowdin 2020-10-14 21:45:21 +00:00
GiteaBot
07c9f6dca4 [skip ci] Updated translations via Crowdin 2020-10-14 18:49:08 +00:00
GiteaBot
8fa74045c4 [skip ci] Updated translations via Crowdin 2020-10-14 17:02:15 +00:00
GiteaBot
36e41d4764 [skip ci] Updated translations via Crowdin 2020-10-14 13:09:05 +00:00
GiteaBot
93f7525061 [skip ci] Updated translations via Crowdin 2020-10-14 12:12:40 +00:00
GiteaBot
e70df67d47 [skip ci] Updated translations via Crowdin 2020-10-14 11:18:41 +00:00
Lauris BH
a2a05d164b
Fix punctuation in trust model description (#13140) 2020-10-14 14:17:40 +03:00
GiteaBot
aa73b7b7e5 [skip ci] Updated translations via Crowdin 2020-10-14 04:07:05 +00:00
6543
49b1948cb1
Gitea 2 Gitea migration (#12657)
* first draft

* update gitea sdk to 9e280adb4da

* adapt feat of updated sdk

* releases now works

* break the Reactions loop

* use convertGiteaLabel

* fix endless loop because paggination is not supported there !!!

* rename gitea local uploader files

* pagination can bite you in the ass

* Version Checks

* lint

* docs

* rename gitea sdk import to miss future conficts

* go-swagger: dont scan the sdk structs

* make sure gitea can shutdown gracefully

* make GetPullRequests and GetIssues similar

* rm useles

* Add Test: started ...

* ... add tests ...

* Add tests and Fixing things

* Workaround missing SHA

* Adapt: Ensure that all migration requests are cancellable
(714ab71ddc)

* LINT: fix misspells in test set

* adapt ListMergeRequestAwardEmoji

* update sdk

* Return error when creating giteadownloader failed

* update sdk

* adapt new sdk

* adopt new features

* check version before err

* adapt: 'migrate service type switch page'

* optimize

* Fix DefaultBranch

* impruve

* handle subPath

* fix test

* Fix ReviewCommentPosition

* test GetReviews

* add DefaultBranch int test set

* rm unused

* Update SDK to v0.13.0

* addopt sdk changes

* found better link

* format template

* Update Docs

* Update Gitea SDK (v0.13.1)
2020-10-14 07:06:00 +03:00
赵智超
dfa7291f8f
[Enhancement] Allow admin to merge pr with protected file changes (#12078)
* [Enhancement] Allow admin to merge pr with protected file changes

As tilte, show protected message in diff page and merge box.

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

* remove unused ver

* Update options/locale/locale_en-US.ini

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>

* Add TrN

* Apply suggestions from code review

* fix lint

* Update options/locale/locale_en-US.ini

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

* Apply suggestions from code review

* move pr proteced files check to TestPatch
* Call TestPatch when protected branches settings changed

* Apply review suggestion @CirnoT

* move to service @lunny

* slightly restructure routers/private/hook.go

Adds a lot of comments and simplifies the logic

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

* placate lint

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

* skip duplicate protected files check

* fix check logic

* slight refactor of TestPatch

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

* When checking for protected files changes in TestPatch use the temporary repository

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

* fix introduced issue with hook

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

* Remove the check on PR index being greater than 0 as it unnecessary

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

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-13 14:50:57 -04:00
GiteaBot
da32d0e72a [skip ci] Updated translations via Crowdin 2020-10-13 16:25:13 +00:00
GiteaBot
b546eda7a8 [skip ci] Updated translations via Crowdin 2020-10-12 18:45:03 +00:00
GiteaBot
e35f7e81ae [skip ci] Updated translations via Crowdin 2020-10-11 18:52:13 +00:00
Wim
9066d09c57
Add ssh certificate support (#12281)
* Add ssh certificate support

* Add ssh certificate support to builtin ssh

* Write trusted-user-ca-keys.pem based on configuration

* Update app.example.ini

* Update templates/user/settings/keys_principal.tmpl

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

* Remove unused locale string

* Update options/locale/locale_en-US.ini

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

* Update options/locale/locale_en-US.ini

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

* Update models/ssh_key.go

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

* Add missing creation of SSH.Rootpath

* Update cheatsheet, example and locale strings

* Update models/ssh_key.go

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

* Update models/ssh_key.go

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

* Update models/ssh_key.go

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

* Update models/ssh_key.go

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

* Update models/ssh_key.go

* Optimizations based on feedback

* Validate CA keys for external sshd

* Add filename option and change default filename

Add a SSH_TRUSTED_USER_CA_KEYS_FILENAME option which default is
RUN_USER/.ssh/gitea-trusted-user-ca-keys.pem

Do not write a file when SSH_TRUSTED_USER_CA_KEYS is empty.

Add some more documentation.

* Remove unneeded principalkey functions

* Add blank line

* Apply suggestions from code review

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

* Add SSH_AUTHORIZED_PRINCIPALS_ALLOW option

This adds a SSH_AUTHORIZED_PRINCIPALS_ALLOW which is default
email,username this means that users only can add the principals
that match their email or username.

To allow anything the admin need to set the option anything.

This allows for a safe default in gitea which protects against malicious
users using other user's prinicipals. (before that user could set it).

This commit also has some small other fixes from the last code review.

* Rewrite principal keys file on user deletion

* Use correct rewrite method

* Set correct AuthorizedPrincipalsBackup default setting

* Rewrite principalsfile when adding principals

* Add update authorized_principals option to admin dashboard

* Handle non-primary emails

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

* Add the command actually to the dashboard template

* Update models/ssh_key.go

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

* By default do not show principal options unless there are CA keys set or they are explicitly set

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

* allow settings when enabled

* Fix typos in TrustedUserCAKeys path

* Allow every CASignatureAlgorithms algorithm

As this depends on the content of TrustedUserCAKeys we should allow all
signature algorithms as admins can choose the specific algorithm on their
signing CA

* Update models/ssh_key.go

Co-authored-by: Lauris BH <lauris@nix.lv>

* Fix linting issue

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-10 20:38:09 -04:00
GiteaBot
529c5ffe12 [skip ci] Updated translations via Crowdin 2020-10-08 15:51:23 +00:00
GiteaBot
4df6807b81 [skip ci] Updated translations via Crowdin 2020-10-07 18:25:19 +00:00
GiteaBot
e0b7727804 [skip ci] Updated translations via Crowdin 2020-10-07 09:56:17 +00:00
Niklas Goerke
8fe8ab5cbf
Mitigate Security vulnerability in the git hook feature (#13058)
* Extend git hook warning in the UI.

Git hooks are a dangerous feature, administrators should be warned before giving
the git hook privilege to users.

* Disable Git hooks by default and add warning.

Git hooks are a dangerous features (see warning text) that should only
be enabled if the administrator was informed about the risk involved.

Co-authored-by: Niklas Goerke <goerke@fzi.de>
2020-10-07 12:55:13 +03:00
GiteaBot
f5436b4a67 [skip ci] Updated translations via Crowdin 2020-10-06 16:17:17 +00:00
GiteaBot
a23c128ba6 [skip ci] Updated translations via Crowdin 2020-10-06 07:24:15 +00:00
Spencer Taylor
6eea301829
Adding visual cue for "Limited" & "Private" organizations. (#13040)
* Adding visual cue for "Limited" & "Private" organizations.

* Moving org visibility CSS styles to .less files.

Co-authored-by: Gitea <gitea@fake.local>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-06 02:25:43 -04:00
GiteaBot
91118bc73d [skip ci] Updated translations via Crowdin 2020-10-05 22:47:15 +00:00
GiteaBot
10e04da28c [skip ci] Updated translations via Crowdin 2020-10-04 17:13:45 +00:00
GiteaBot
86b8c81240 [skip ci] Updated translations via Crowdin 2020-10-02 09:38:47 +00:00
GiteaBot
1d2553abbf [skip ci] Updated translations via Crowdin 2020-10-01 12:50:55 +00:00
zeripath
c6da033656
Copy missing things from app.example.ini to Cheat Sheet (#12988)
Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-10-01 07:57:57 +01:00
GiteaBot
992f387139 [skip ci] Updated translations via Crowdin 2020-10-01 05:55:40 +00:00
GiteaBot
551473b294 [skip ci] Updated translations via Crowdin 2020-09-30 21:00:33 +00:00
GiteaBot
7670a9db10 [skip ci] Updated translations via Crowdin 2020-09-30 16:17:15 +00:00
GiteaBot
615e784150 [skip ci] Updated translations via Crowdin 2020-09-30 12:28:46 +00:00
GiteaBot
9b6361f8a0 [skip ci] Updated translations via Crowdin 2020-09-29 19:27:47 +00:00
GiteaBot
b606f13365 [skip ci] Updated translations via Crowdin 2020-09-28 19:01:59 +00:00
GiteaBot
f404bdde9b [skip ci] Updated translations via Crowdin 2020-09-27 19:21:50 +00:00
GiteaBot
82179a6e81 [skip ci] Updated translations via Crowdin 2020-09-27 02:11:47 +00:00
GiteaBot
b49ebc2ba8 [skip ci] Updated translations via Crowdin 2020-09-26 17:57:16 +00:00
GiteaBot
274430f40b [skip ci] Updated translations via Crowdin 2020-09-25 08:59:15 +00:00
zeripath
7a7f56044a
Adopt repositories (#12920)
* Don't automatically delete repository files if they are present

Prior to this PR Gitea would delete any repository files if they are
present during creation or migration. This can in certain circumstances
lead to data-loss and is slightly unpleasant.

This PR provides a mechanism for Gitea to adopt repositories on creation
and otherwise requires an explicit flag for deletion.

PushCreate is slightly different - the create will cause adoption if
that is allowed otherwise it will delete the data if that is allowed.

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

* Update swagger

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

* Fix tests and migrate overwrite

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

* as per @lunny

Only offer to adopt or overwrite if the user can do that.

Allow the site administrator to adopt or overwrite in all
circumstances

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

* Use setting.Repository.DefaultBranch for the default branch

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

* Always set setting.Repository.DefaultBranch

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

* update swagger

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

* update templates

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

* ensure repo closed

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

* Rewrite of adoption as per @6543 and @lunny

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

* Apply suggestions from code review

* update swagger

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

* missing not

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

* add modals and flash reporting

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

* Make the unadopted page searchable

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

* Add API

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

* Fix swagger

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

* fix swagger

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

* Handle empty and non-master branched repositories

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

* placate lint

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

* remove commented out code

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-25 07:09:23 +03:00
GiteaBot
b5109272db [skip ci] Updated translations via Crowdin 2020-09-24 22:38:04 +00:00
GiteaBot
01ad714715 [skip ci] Updated translations via Crowdin 2020-09-23 20:26:51 +00:00
GiteaBot
f215e015df [skip ci] Updated translations via Crowdin 2020-09-22 17:03:23 +00:00
GiteaBot
060d46dd25 [skip ci] Updated translations via Crowdin 2020-09-21 14:37:57 +00:00
GiteaBot
3f9eb93cc6 [skip ci] Updated translations via Crowdin 2020-09-20 21:56:51 +00:00
GiteaBot
23f064e813 [skip ci] Updated translations via Crowdin 2020-09-20 20:21:12 +00:00
GiteaBot
e7ffc67ad5 [skip ci] Updated translations via Crowdin 2020-09-20 17:56:20 +00:00
GiteaBot
7e5499575b [skip ci] Updated translations via Crowdin 2020-09-19 23:22:29 +00:00
GiteaBot
355788db46 [skip ci] Updated translations via Crowdin 2020-09-19 16:45:53 +00:00
zeripath
4979f15c3f
Add configurable Trust Models (#11712)
* Add configurable Trust Models

Gitea's default signature verification model differs from GitHub. GitHub
uses signatures to verify that the committer is who they say they are -
meaning that when GitHub makes a signed commit it must be the committer.
The GitHub model prevents re-publishing of commits after revocation of a
key and prevents re-signing of other people's commits to create a
completely trusted repository signed by one key or a set of trusted
keys.

The default behaviour of Gitea in contrast is to always display the
avatar and information related to a signature. This allows signatures to
be decoupled from the committer. That being said, allowing arbitary
users to present other peoples commits as theirs is not necessarily
desired therefore we have a trust model whereby signatures from
collaborators are marked trusted, signatures matching the commit line
are marked untrusted and signatures that match a user in the db but not
the committer line are marked unmatched.

The problem with this model is that this conflicts with Github therefore
we need to provide an option to allow users to choose the Github model
should they wish to.

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

* Adjust locale strings

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

* as per @6543

Co-authored-by: 6543 <6543@obermui.de>

* Update models/gpg_key.go

* Add migration for repository

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

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-09-20 00:44:55 +08:00
GiteaBot
89c94e2f8e [skip ci] Updated translations via Crowdin 2020-09-18 17:51:09 +00:00
GiteaBot
7250f5342f [skip ci] Updated translations via Crowdin 2020-09-18 12:10:52 +00:00
GiteaBot
afea4faa33 [skip ci] Updated translations via Crowdin 2020-09-17 18:25:33 +00:00
赵智超
d8b5235ded
Add ui style for "Open a blank issue" button (#12824)
* Add ui style for "Open a blank issue" button

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

* Apply review suggestion @silverwind

* format

* format 2

* fix message

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-09-16 10:07:09 +08:00
GiteaBot
ace8a283f1 [skip ci] Updated translations via Crowdin 2020-09-15 23:50:35 +00:00
GiteaBot
81ed47c29d [skip ci] Updated translations via Crowdin 2020-09-15 14:38:30 +00:00
GiteaBot
3d0ad2885a [skip ci] Updated translations via Crowdin 2020-09-15 11:29:56 +00:00
GiteaBot
c950ea10ab [skip ci] Updated translations via Crowdin 2020-09-14 18:43:45 +00:00
GiteaBot
6a1a6332de [skip ci] Updated translations via Crowdin 2020-09-14 11:49:03 +00:00
GiteaBot
33f606ce4c [skip ci] Updated translations via Crowdin 2020-09-14 10:41:18 +00:00
GiteaBot
53b656582e [skip ci] Updated translations via Crowdin 2020-09-13 01:49:50 +00:00
GiteaBot
55e05ad1ce [skip ci] Updated translations via Crowdin 2020-09-12 12:32:50 +00:00
赵智超
ae528d8321
Translate two small lables on commit statuse list (#12821)
* Requested
* Details

Signed-off-by: a1012112796 <1012112796@qq.com>
2020-09-12 15:29:50 +08:00
GiteaBot
c18c6cf4cf [skip ci] Updated translations via Crowdin 2020-09-11 20:20:02 +00:00
John Olheiser
26c4a049da
Issue templates directory (#11450)
* Issue templates

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add some comments, appease the linter

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add docs and re-use dir candidates

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add default labels to issue templates

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Generate swagger

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Suggested changes

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update issue.go

* Suggestions

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Extract metadata from legacy if possible

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-11 10:48:39 -04:00