2
0
Commit Graph

1662 Commits

Author SHA1 Message Date
GiteaBot
f3c55d43e3 [skip ci] Updated translations via Crowdin 2021-08-02 00:07:40 +00:00
GiteaBot
1363366269 [skip ci] Updated translations via Crowdin 2021-08-01 00:07:51 +00:00
GiteaBot
c7abdcecef [skip ci] Updated translations via Crowdin 2021-07-31 00:07:42 +00:00
Marty
278632575f Show correct text when comparing commits on empty pull request (#16569)
* fix

* use own text

* Update templates/repo/commits_table.tmpl

Co-authored-by: marty <m.karkossa@ultraware.nl>
Co-authored-by: zeripath <art27@cantab.net>
2021-07-29 03:32:48 +01:00
GiteaBot
1e6fe859f2 [skip ci] Updated translations via Crowdin 2021-07-27 00:07:52 +00:00
GiteaBot
e51ecd0cd3 [skip ci] Updated translations via Crowdin 2021-07-26 00:07:41 +00:00
GiteaBot
21df538388 [skip ci] Updated licenses and gitignores 2021-07-25 00:07:38 +00:00
GiteaBot
29e202f86e [skip ci] Updated translations via Crowdin 2021-07-24 00:07:49 +00:00
lengyuqu
728bb9bfdc Add support for corporate WeChat webhooks (#15910)
* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* Update templates/admin/hook_new.tmpl

Co-authored-by: a1012112796 <1012112796@qq.com>

* Update services/webhook/wechatwork.go

Co-authored-by: a1012112796 <1012112796@qq.com>

* 修善wechatwork

* 修善wechatwork

* fix

* Update locale_cs-CZ.ini

fix

* fix build

* fix

* fix build

* make webhooks.zh-cn.md

* delet unnecessary blank line

* delet unnecessary blank line

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* Update templates/admin/hook_new.tmpl

Co-authored-by: a1012112796 <1012112796@qq.com>

* Update services/webhook/wechatwork.go

Co-authored-by: a1012112796 <1012112796@qq.com>

* 修善wechatwork

* 修善wechatwork

* fix

* fix build

* fix

* fix build

* make webhooks.zh-cn.md

* delet unnecessary blank line

* delet unnecessary blank line

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* fix

* fix

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* fix wechat

* fix wechat

* fix wechat

* fix wechat

* Fix invalid params and typo of email templates (#16394)

Signed-off-by: Meano <meanocat@gmail.com>

* Add LRU mem cache implementation (#16226)

The current default memory cache implementation is unbounded in size and number of
objects cached. This is hardly ideal.

This PR proposes creating a TwoQueue LRU cache as the underlying cache for Gitea.
The cache is limited by the number of objects stored in the cache (rather than size)
for simplicity. The default number of objects is 50000 - which is perhaps too small
as most of our objects cached are going to be much less than 1kB.

It may be worth considering using a different LRU implementation that actively limits
sizes or avoids GC - however, this is just a beginning implementation.

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

* [skip ci] Updated translations via Crowdin

* Replace `plugins/docker` with `techknowlogick/drone-docker`in ci (#16407)

* plugins/docker -> techknowlogick/drone-docker

* It is multi-arch

* docs: rewrite email setup (#16404)

* Add intro for both the docs page and mailer methods
  * Fix numbering level in SMTP section
  * Recommends implicit TLS

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

* Validate Issue Index before querying DB (#16406)

* Fix external renderer (#16401)

* fix external renderer

* use GBackground context as fallback

* no fallback, return error

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

* Add checkbox to delete pull branch after successful merge (#16049)

* Add checkbox to delete pull branch after successful merge

* Omit DeleteBranchAfterMerge field in json

* Log a warning instead of error when PR head branch deleted

* Add DefaultDeleteBranchAfterMerge to PullRequestConfig

* Add support for delete_branch_after_merge via API

* Fix for API: the branch should be deleted from the HEAD repo

If head and base repo are the same, reuse the already opened ctx.Repo.GitRepo

* Don't delegate to CleanupBranch, only reuse branch deletion code

CleanupBranch contains too much logic that has already been performed by the Merge

* Reuse gitrepo in MergePullRequest

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

* [skip ci] Updated translations via Crowdin

* Detect encoding changes while parsing diff (#16330)

* Detect encoding changes while parsing diff

* Let branch/tag name be a valid ref to get CI status (#16400)

* fix #16384#

* refactor: move shared helper func to utils package

* extend Tests

* use ctx.Repo.GitRepo if not nil

* fix

* fix

* 企业微信webhook

* 企业微信webhook

* 企业微信webhook

* fix build

* fix build

* Apply suggestions from code review

Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: myheavily <myheavily>
Co-authored-by: zhaoxin <gitea@fake.local>
Co-authored-by: Meano <Meano@foxmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: GiteaBot <teabot@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Bagas Sanjaya <bagasdotme@gmail.com>
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Jimmy Praet <jimmy.praet@telenet.be>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-23 12:41:27 +08:00
GiteaBot
aacd08fe84 [skip ci] Updated translations via Crowdin 2021-07-23 00:07:51 +00:00
GiteaBot
5a5e87e6ff [skip ci] Updated translations via Crowdin 2021-07-22 00:07:51 +00:00
GiteaBot
c50a9e2909 [skip ci] Updated translations via Crowdin 2021-07-19 00:07:50 +00:00
GiteaBot
60f84f85b2 [skip ci] Updated translations via Crowdin 2021-07-18 00:07:50 +00:00
a1012112796
457a02b903 show tag name on dashboard items list (#16466)
fix #16458

Signed-off-by: a1012112796 <1012112796@qq.com>
2021-07-17 23:21:04 +02:00
GiteaBot
f6b9fa3fa8 [skip ci] Updated translations via Crowdin 2021-07-16 00:07:52 +00:00
GiteaBot
7e6dc246cb [skip ci] Updated translations via Crowdin 2021-07-15 15:07:57 +00:00
GiteaBot
849f87f008 [skip ci] Updated translations via Crowdin 2021-07-15 10:07:52 +00:00
GiteaBot
bc6e7cb80e [skip ci] Updated translations via Crowdin 2021-07-15 09:08:09 +00:00
GiteaBot
c57f18b95a [skip ci] Updated translations via Crowdin 2021-07-14 20:07:55 +00:00
GiteaBot
31237ee86a [skip ci] Updated translations via Crowdin 2021-07-14 15:07:54 +00:00
GiteaBot
742ced600c [skip ci] Updated translations via Crowdin 2021-07-14 14:07:52 +00:00
GiteaBot
ae85e24422 [skip ci] Updated translations via Crowdin 2021-07-14 13:08:17 +00:00
6543
95c92c2bb8 Use TrN helper for email templates (#16425)
* Add TrN helper

* use TrN

* a nit
2021-07-14 15:06:09 +02:00
delvh
f9e14f59ae Make gpg resource string more readable (#16423) 2021-07-14 12:50:39 +02:00
GiteaBot
b481e0826f [skip ci] Updated translations via Crowdin 2021-07-14 00:07:53 +00:00
zeripath
029bbc8f88 Add option to provide signature for a token to verify key ownership (#14054)
* Add option to provide signed token to verify key ownership

Currently we will only allow a key to be matched to a user if it matches
an activated email address. This PR provides a different mechanism - if
the user provides a signature for automatically generated token (based
on the timestamp, user creation time, user ID, username and primary
email.

* Ensure verified keys can act for all active emails for the user

* Add code to mark keys as verified

* Slight UI adjustments

* Slight UI adjustments 2

* Simplify signature verification slightly

* fix postgres test

* add api routes

* handle swapped primary-keys

* Verify the no-reply address for verified keys

* Only add email addresses that are activated to keys

* Fix committer shortcut properly

* Restructure gpg_keys.go

* Use common Verification Token code

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-07-13 15:28:07 +02:00
GiteaBot
857cc7c013 [skip ci] Updated translations via Crowdin 2021-07-13 00:07:51 +00:00
Jimmy Praet
8643581598 Add checkbox to delete pull branch after successful merge (#16049)
* Add checkbox to delete pull branch after successful merge

* Omit DeleteBranchAfterMerge field in json

* Log a warning instead of error when PR head branch deleted

* Add DefaultDeleteBranchAfterMerge to PullRequestConfig

* Add support for delete_branch_after_merge via API

* Fix for API: the branch should be deleted from the HEAD repo

If head and base repo are the same, reuse the already opened ctx.Repo.GitRepo

* Don't delegate to CleanupBranch, only reuse branch deletion code

CleanupBranch contains too much logic that has already been performed by the Merge

* Reuse gitrepo in MergePullRequest

Co-authored-by: Andrew Thornton <art27@cantab.net>
2021-07-13 01:26:25 +02:00
GiteaBot
aebc4950ea [skip ci] Updated translations via Crowdin 2021-07-12 00:24:54 +00:00
Meano
aa0117f14c Fix invalid params and typo of email templates (#16394)
Signed-off-by: Meano <meanocat@gmail.com>
2021-07-10 19:40:14 +02:00
GiteaBot
8debdf2c8e [skip ci] Updated translations via Crowdin 2021-07-10 00:24:52 +00:00
GiteaBot
0320a03b79 [skip ci] Updated translations via Crowdin 2021-07-09 00:25:09 +00:00
zeripath
f9e891e8f3 Redirect on bad CSRF instead of presenting bad page (#14937)
The current CSRF handler is a bit harsh with bad CSRF tokens on webpages
I think we can be a little kinder and redirect to base page with a flash error

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-07-08 15:57:24 +02:00
GiteaBot
6039994cd1 [skip ci] Updated translations via Crowdin 2021-07-08 00:24:51 +00:00
GiteaBot
aac5eb0e6d [skip ci] Updated translations via Crowdin 2021-07-07 00:14:50 +00:00
GiteaBot
3c5698423d [skip ci] Updated translations via Crowdin 2021-07-06 00:14:50 +00:00
GiteaBot
b808147924 [skip ci] Updated licenses and gitignores 2021-07-04 00:14:37 +00:00
GiteaBot
84b69df9de [skip ci] Updated translations via Crowdin 2021-07-03 00:14:49 +00:00
GiteaBot
b5ed5f6fcc [skip ci] Updated translations via Crowdin 2021-06-29 00:29:44 +00:00
GiteaBot
d1e7ca6ea1 [skip ci] Updated translations via Crowdin 2021-06-28 00:29:35 +00:00
Norwin
d59b6f0fb3 Link to previous blames in file blame page (#16259)
Adds a link to each blame hunk, to view the blame of an earlier version of the file, similar to GitHub. Also refactors the blame render from fmtstring based to template based.

* Fix blame bottom line and add blame prior button

* Jump to previous parent commit from the commit.

* Fix previous commit link

* Fix previous blame link

* Fix the given file not exist in the previous commit.

* Fix blameRow struct not export

* fix theming issues, rename template var

* remove unused LastCommit fetch

* fix location of blame-hunk divider

* rewrite previous commit checks

* remove duplicate commit lookup

its already resolved and stored in ctx.Repo.Commit!

* split out blamePart processing into function

Co-authored-by: rogerluo410 <rogerluo410@gmail.com>
2021-06-28 01:13:20 +02:00
GiteaBot
6dce115f12 [skip ci] Updated licenses and gitignores 2021-06-27 00:29:32 +00:00
Sergey Dryabzhinsky
297dc94f1f Add Visible modes function from Organisation to Users too (#16069)
You can limit or hide organisations. This pull make it also posible for users

- new strings to translte
- add checkbox to user profile form
- add checkbox to admin user.edit form
- filter explore page user search
- filter api admin and public user searches
- allow admins view "hidden" users
- add app option DEFAULT_USER_VISIBILITY
- rewrite many files to use Visibility field
- check for teams intersection
- fix context output
- right fake 404 if not visible

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2021-06-26 20:53:14 +01:00
John Olheiser
39fe2ea406 Add better errors for disabled account recovery (#15117)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
2021-06-25 23:16:36 -05:00
KN4CK3R
086615f964 Add tag protection (#15629)
* Added tag protection in hook.

* Prevent UI tag creation if protected.

* Added settings page.

* Added tests.

* Added suggestions.

* Moved tests.

* Use individual errors.

* Removed unneeded methods.

* Switched delete selector.

* Changed method names.

* No reason to be unique.

* Allow editing of protected tags.

* Removed unique key from migration.

* Added docs page.

* Changed date.

* Respond with 404 to not found tags.

* Replaced glob with regex pattern.

* Added support for glob and regex pattern.

* Updated documentation.

* Changed white* to allow*.

* Fixed edit button link.

* Added cancel button.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-06-25 16:28:55 +02:00
GiteaBot
b82075dacc [skip ci] Updated translations via Crowdin 2021-06-25 00:11:36 +00:00
GiteaBot
78f1f8b884 [skip ci] Updated translations via Crowdin 2021-06-24 00:11:37 +00:00
6543
e208c6d88c Fix Nits (#16234)
* template fix

* nits

* add doer to "created issue/pull"
2021-06-23 19:43:33 +02:00
6543
e30af859bb Localize Email Templates (#16200)
close #14822
2021-06-23 14:33:21 +02:00
GiteaBot
1c8d74e95f [skip ci] Updated translations via Crowdin 2021-06-21 00:11:34 +00:00