]> source.dussan.org Git - gitea.git/log
gitea.git
2 years ago[skip ci] Updated translations via Crowdin
MaeIsBad [Tue, 16 Aug 2022 00:20:56 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoFix the commit diff route (#20796)
MaeIsBad [Mon, 15 Aug 2022 06:13:08 +0000 (08:13 +0200)]
Fix the commit diff route (#20796)

Gitea used to return 500 on the /:user/:repo/:commit route due to locale
being undefined in the escape_title template.

Co-authored-by: bad <badatnames@tutanota.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
2 years agoFix push mirror address backend get error Address cause setting page display error...
xpy [Mon, 15 Aug 2022 03:12:01 +0000 (11:12 +0800)]
Fix push mirror address backend get error Address cause setting page display error (#20593)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoRemove follow from commits by file (#20765)
zeripath [Mon, 15 Aug 2022 01:22:13 +0000 (02:22 +0100)]
Remove follow from commits by file (#20765)

The use of `--follow` makes getting these commits very slow on large repositories
as it results in searching the whole commit tree for a blob.

Now as nice as the results of `--follow` are, I am uncertain whether it is really
of sufficient importance to keep around.

Fix #20764

Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2 years ago[skip ci] Updated translations via Crowdin
Gusted [Mon, 15 Aug 2022 00:20:43 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoFix `make watch` for generated files (#20794)
Gusted [Sun, 14 Aug 2022 21:22:09 +0000 (21:22 +0000)]
Fix `make watch` for generated files (#20794)

- Don't rebuild the binary when generated files are updated, which is the
case by-default when running `make watch`.

2 years agoAdd missing translation for queue flush workers (#20791)
Gusted [Sun, 14 Aug 2022 19:28:19 +0000 (19:28 +0000)]
Add missing translation for queue flush workers (#20791)

- Add a missing translation key and value for the flush worker indication
- Resolves #20770

2 years agoUpdate zh-cn translation for Installation from source (#20772)
PEN² [Sun, 14 Aug 2022 16:03:12 +0000 (00:03 +0800)]
Update zh-cn translation for Installation from source (#20772)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoImprove comment header for Mobile (#20781)
Gusted [Sun, 14 Aug 2022 16:02:59 +0000 (16:02 +0000)]
Improve comment header for Mobile (#20781)

- Since
https://github.com/go-gitea/gitea/commit/b9e8fa5beb300eac7bd0623c9d7201a9e3a92a4a
the avatar will be inlined into the comment header, so there's more room
for the actual comment container(thus more text per line in the comment
body). However this didn't take into consideration that the flex didn't
allow any wrapping and thus was shrinking the avatar. Well this isn't a
perfect solution, as you ideally all want these elements to be
individually wrapped(such that `comment-header-right` can be on the same
line as `comment-header-left`, which now causes a new line in certain
situations). It's a better solution than the current CSS and to not
mess with the desktop CSS/HTML.

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
2 years agoAdd myself to MAINTAINERS (#20786)
PEN² [Sun, 14 Aug 2022 10:08:53 +0000 (18:08 +0800)]
Add myself to MAINTAINERS (#20786)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago[skip ci] Updated licenses and gitignores
Frank [Sun, 14 Aug 2022 00:20:44 +0000 (00:20 +0000)]
[skip ci] Updated licenses and gitignores

2 years agoPreserve unix socket file (#20499)
Frank [Sat, 13 Aug 2022 21:31:33 +0000 (05:31 +0800)]
Preserve unix socket file (#20499)

By default Gitea will always unlink any sockets that are provided using the `LISTEN_FDS` environment variable. This is because it uses this variable to handle passing when it is doing a graceful restart. However, this same mechanism is used by systemd - which explicitly expects that passed in sockets should not be unlinked by the receiving process.

This PR adjusts Gitea's graceful restart mechanism to use an additional environment variable which tracks if a listening socket was opened by Gitea - and therefore should be unlinked on shutdown by Gitea.

Fix #20490

Co-authored-by: zeripath <art27@cantab.net>
2 years agoSwitch Unicode Escaping to a VSCode-like system (#19990)
zeripath [Sat, 13 Aug 2022 18:32:34 +0000 (19:32 +0100)]
Switch Unicode Escaping to a VSCode-like system (#19990)

This PR rewrites the invisible unicode detection algorithm to more
closely match that of the Monaco editor on the system. It provides a
technique for detecting ambiguous characters and relaxes the detection
of combining marks.

Control characters are in addition detected as invisible in this
implementation whereas they are not on monaco but this is related to
font issues.

Close #19913

Signed-off-by: Andrew Thornton <art27@cantab.net>
2 years agoFix git.Init for doctor sub-command (#20782)
wxiaoguang [Sat, 13 Aug 2022 16:33:18 +0000 (00:33 +0800)]
Fix git.Init for doctor sub-command (#20782)

2 years agoRemove the translation key website by PR #20777 (#20779)
PEN² [Sat, 13 Aug 2022 06:24:21 +0000 (14:24 +0800)]
Remove the translation key website by PR #20777 (#20779)

2 years agoMove the official website link at the footer of gitea (#20777)
PEN² [Sat, 13 Aug 2022 01:34:53 +0000 (09:34 +0800)]
Move the official website link at the footer of gitea (#20777)

2 years agoRemove useless JS operation for relative time tooltips (#20756)
silverwind [Fri, 12 Aug 2022 21:03:41 +0000 (23:03 +0200)]
Remove useless JS operation for relative time tooltips (#20756)

This operation that shifts the content from title to data-content is
useless when we can directly render the expected HTML instead.

This change does prevent these tooltips from working when the user has
JS disabled in their browser, but I think we made it clear by now that
JS is required for gitea to work properly.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2 years agoRemove debug output when coverage fails (#20733)
silverwind [Fri, 12 Aug 2022 20:13:31 +0000 (22:13 +0200)]
Remove debug output when coverage fails (#20733)

* Remove debug output when coverage fails

When coverage fails, it logs megabytes of debug to stdout, which seems
to break the drone ui as well as the log output download in drone,
presumably because of the size. I think with removal of this print, we
should still see any errors created by gocovmerge.go, but a few CI runs
may be necessary to get it to fail again.

* Update Makefile

* restart ci

* restart ci

* restart ci

* restart ci

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2 years agoSlightly reduce exclamation icon size (#20753)
silverwind [Fri, 12 Aug 2022 17:51:33 +0000 (19:51 +0200)]
Slightly reduce exclamation icon size (#20753)

It seemed a tad to big compared to other icons. Shrink it slightly.

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2 years agoFix disabled open in vscode menu when disabling download source from UI (#20713)
Lunny Xiao [Fri, 12 Aug 2022 05:16:05 +0000 (13:16 +0800)]
Fix disabled open in vscode menu when disabling download source from UI (#20713)

2 years agorefactor webhook *NewPost (#20729)
oliverpool [Thu, 11 Aug 2022 15:48:23 +0000 (17:48 +0200)]
refactor webhook *NewPost (#20729)

* refactor webhook *NewPost

* remove empty values

* always show errs.Message

* remove utils.IsValidSlackChannel

* move IsValidSlackChannel to services/webhook package

* binding: handle empty Message case

* make IsValidSlackChannel more strict

2 years agoAdd SAML SP status to Feature Comparison docs (#20743)
Kiel Hurley [Thu, 11 Aug 2022 05:04:09 +0000 (17:04 +1200)]
Add SAML SP status to Feature Comparison docs (#20743)

* Add SAML SP integration

Add current SAML 2.0 Service Provider (SP) status. RhodeCode EE supports SAML, CE does not.

Included issue links for both Gitea and Gogs, as corporate users will likely be interested in the status of both.

* Add SAML SP status to comparison for other translations

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoFix loading button with invalid form (#20754)
silverwind [Thu, 11 Aug 2022 03:54:34 +0000 (05:54 +0200)]
Fix loading button with invalid form (#20754)

Previously, if a invalid form was submitted (for example issue with no
title), the form could not be re-submitted again because the button
would not stay stuck in loading state. Fix that by hooking the 'submit'
event instead which triggers only when the form is valid.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago[skip ci] Updated translations via Crowdin
Gusted [Thu, 11 Aug 2022 00:20:58 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoMake branch icon stand out more (#20726)
Gusted [Wed, 10 Aug 2022 19:23:11 +0000 (19:23 +0000)]
Make branch icon stand out more (#20726)

* Make branch icon stand out more

- Currently the branch icon is "squashed" between the two branch names
and feels a bit "amateur-ish" to my feeling(relative to other UI
elements).
- This patch tries to improve that by making the icon bigger
and by adding some margin to not have a "squashed" icon.
- This patch also includes a "fix", for some reason this symbol is not
centering correctly within the span(or without for that matter), so
simply manually patch this by adding `bottom: 1.px`.

* Use svg

* Apply suggestion

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2 years agoUpdate docs for versions (#20750)
wxiaoguang [Wed, 10 Aug 2022 17:37:15 +0000 (01:37 +0800)]
Update docs for versions (#20750)

2 years agoReplace some icons with SVG (#20741)
silverwind [Wed, 10 Aug 2022 16:30:40 +0000 (18:30 +0200)]
Replace some icons with SVG (#20741)

- Replace some icons with SVG
- Create teams help page
- Application and SSH keys icons
- Add new icon for app token
- Use fontawesom-send

2 years agoUse separate class for tippy targets (#20742)
silverwind [Wed, 10 Aug 2022 14:47:28 +0000 (16:47 +0200)]
Use separate class for tippy targets (#20742)

Previous solution that re-purposed the 'hide' class by making it
`!important` had various unintended side-effects where jQuery .show() was
not able to outweight it. Use a separate class to prevent these
interactions.

2 years agoAdd support mCaptcha as captcha provider (#20458)
Gusted [Wed, 10 Aug 2022 13:20:10 +0000 (13:20 +0000)]
Add support mCaptcha as captcha provider (#20458)

https://mcaptcha.org/

Co-authored-by: Felipe Leopoldo Sologuren Gutiérrez <fsologureng@users.noreply.github.com>
2 years agoFix CI status popup (#20737)
silverwind [Wed, 10 Aug 2022 04:08:06 +0000 (06:08 +0200)]
Fix CI status popup (#20737)

2 years agoAdd documentation about pagination of the API (#20740)
techknowlogick [Wed, 10 Aug 2022 01:58:55 +0000 (21:58 -0400)]
Add documentation about pagination of the API (#20740)

* Add documentation about pagination of the API

* Update docs/content/doc/developers/api-usage.en-us.md

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years ago[skip ci] Updated translations via Crowdin
silverwind [Wed, 10 Aug 2022 00:20:57 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoChange commit status icons to SVG (#20736)
silverwind [Tue, 9 Aug 2022 21:55:29 +0000 (23:55 +0200)]
Change commit status icons to SVG (#20736)

* Fix commit status popover and switch to svg icons

* margin tweak

* fix integration, use warning sign for error to match previous

* remove fix from here, will be a new pr

* use top/bottom positioning

* vertically center

* use no-entry over alert oction

* add exclamation icon

* fix test selector

* more test fixes

2 years agoAdd support for NuGet API keys (#20721)
KN4CK3R [Tue, 9 Aug 2022 14:36:49 +0000 (16:36 +0200)]
Add support for NuGet API keys (#20721)

* Add support for NuGet API key.

* lint

* Apply suggestions from code review

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2 years agoKeep download count on Container tag overwrite (#20728)
KN4CK3R [Tue, 9 Aug 2022 13:47:57 +0000 (15:47 +0200)]
Keep download count on Container tag overwrite (#20728)

Co-authored-by: 6543 <6543@obermui.de>
2 years agoReplace fomantic popup module with tippy.js (#20428)
silverwind [Tue, 9 Aug 2022 12:37:34 +0000 (14:37 +0200)]
Replace fomantic popup module with tippy.js (#20428)

- replace fomantic popup module with tippy.js
- fix chaining and add comment
- add 100ms delay to tooltips
- stopwatch improvments, raise default maxWidth
- update web_src/js/features/common-global.js
- use type=submit instead of js

2 years agoAdd an option to create new issues from "/issues" page (#20650)
CodeDoctor [Tue, 9 Aug 2022 11:30:09 +0000 (13:30 +0200)]
Add an option to create new issues from "/issues" page (#20650)

2 years agoRestore history button and hide add button when unable to add (#20718)
silverwind [Tue, 9 Aug 2022 10:32:41 +0000 (12:32 +0200)]
Restore history button and hide add button when unable to add (#20718)

Fix two regressions from #20602:

- Restore the 'History' button that was previously unable to render
  because it's show condition was never hit
- Hide the 'Add File' button when there would be no items in the
  dropdown.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoRemove manual rollback for failed generated repositories (#20639)
Gabriel Vasile [Tue, 9 Aug 2022 09:41:52 +0000 (12:41 +0300)]
Remove manual rollback for failed generated repositories (#20639)

Generating repositories from a template is done inside a transaction.
Manual rollback on error is not needed and it always results in error
"repository does not exist".

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoAdd support for `npm unpublish` (#20688)
KN4CK3R [Tue, 9 Aug 2022 07:23:43 +0000 (09:23 +0200)]
Add support for `npm unpublish` (#20688)

2 years agoAllow multiple files in generic packages (#20661)
KN4CK3R [Tue, 9 Aug 2022 04:39:24 +0000 (06:39 +0200)]
Allow multiple files in generic packages (#20661)

* Allow multiple files in generic packages.
* Add deletion of a single file.
* Update docs.
* Change version check.

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoRefactor legacy git init (#20376)
wxiaoguang [Tue, 9 Aug 2022 03:22:24 +0000 (11:22 +0800)]
Refactor legacy git init (#20376)

* merge `CheckLFSVersion` into `InitFull` (renamed from `InitWithSyncOnce`)
* remove the `Once` during git init, no data-race now
* for doctor sub-commands, `InitFull` should only be called in initialization stage

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoFix typo in source (#20723)
luzpaz [Tue, 9 Aug 2022 01:53:40 +0000 (21:53 -0400)]
Fix typo in source (#20723)

Algorightm -> Algorithm

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago[skip ci] Updated translations via Crowdin
parnic [Tue, 9 Aug 2022 00:21:27 +0000 (00:21 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoAdd issue filter for Author (#20578)
parnic [Mon, 8 Aug 2022 20:03:58 +0000 (15:03 -0500)]
Add issue filter for Author (#20578)

This adds a new filter option on the issues and pulls pages to filter by the author/poster/creator of the issue or PR

2 years agoFix init mail render logic (#20704)
KN4CK3R [Mon, 8 Aug 2022 18:04:28 +0000 (20:04 +0200)]
Fix init mail render logic (#20704)

This bug affects tests which are sending emails (#20307). Some tests reinitialise the web routes (like `TestNodeinfo`) which messed up the mail templates. There is no reason why the templates should be loaded in the routes method.

2 years agoFrontport changelog v1.17.0 (#20712)
6543 [Mon, 8 Aug 2022 15:21:57 +0000 (17:21 +0200)]
Frontport changelog v1.17.0 (#20712)

* fix

* add

2 years agoFix disable download button (#20701)
Lunny Xiao [Mon, 8 Aug 2022 13:42:36 +0000 (21:42 +0800)]
Fix disable download button (#20701)

2 years agodocs: move search input to navbar (#20551)
Norwin [Mon, 8 Aug 2022 07:27:04 +0000 (09:27 +0200)]
docs: move search input to navbar (#20551)

* remove search item from sidebar
* fix search for some docs languages

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoFix SecToTime edge-cases (#20610)
Gusted [Mon, 8 Aug 2022 05:07:42 +0000 (05:07 +0000)]
Fix SecToTime edge-cases (#20610)

2 years ago[skip ci] Updated translations via Crowdin
Lunny Xiao [Mon, 8 Aug 2022 00:21:03 +0000 (00:21 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoFix v220 migration to be compatible for MSSQL 2008 r2 (#20702)
Lunny Xiao [Mon, 8 Aug 2022 00:16:22 +0000 (08:16 +0800)]
Fix v220 migration to be compatible for MSSQL 2008 r2 (#20702)

2 years agoRework repo buttons (#20602)
silverwind [Sun, 7 Aug 2022 23:15:11 +0000 (01:15 +0200)]
Rework repo buttons (#20602)

* Rework repo buttons

- Replace "New PR" and "Go to File" button with Icon Button
- Move all "Add File" actions into a dropdown button
- Remove most custom styling of clone buttons
- Margin and wiki tweaks

Buttons are now all equal height, mobile layout wraps gracefully.

Fixes: https://github.com/go-gitea/gitea/issues/13671
Replaces: https://github.com/go-gitea/gitea/pull/20375

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoSwitch to building with go1.19 (#20695)
techknowlogick [Sun, 7 Aug 2022 16:25:03 +0000 (12:25 -0400)]
Switch to building with go1.19 (#20695)

2 years agoUpdate maven deploy docs (#20691)
KN4CK3R [Sun, 7 Aug 2022 13:58:03 +0000 (15:58 +0200)]
Update maven deploy docs (#20691)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoAdd support for Pub packages (#20560)
KN4CK3R [Sun, 7 Aug 2022 10:09:54 +0000 (12:09 +0200)]
Add support for Pub packages (#20560)

* Added support for Pub packages.

* Update docs/content/doc/packages/overview.en-us.md

Co-authored-by: Gergely Nagy <algernon@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Gergely Nagy <algernon@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2 years agoFix typo overrided -> overridden (#20687)
luzpaz [Sun, 7 Aug 2022 00:54:26 +0000 (20:54 -0400)]
Fix typo overrided -> overridden (#20687)

2 years ago[skip ci] Updated licenses and gitignores
silverwind [Sun, 7 Aug 2022 00:20:52 +0000 (00:20 +0000)]
[skip ci] Updated licenses and gitignores

2 years agoUpdate JS dependencies, adjust eslint (#20659)
silverwind [Sat, 6 Aug 2022 15:30:13 +0000 (17:30 +0200)]
Update JS dependencies, adjust eslint (#20659)

* Update JS dependencies

- Update all JS dependencies minus vue-*
- Improve eslint restricted globals
- Tested build, lint and swagger

* few more lint improvements

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoBackground color of private list-items updated (#20630)
Luke Wyatt [Sat, 6 Aug 2022 14:25:58 +0000 (10:25 -0400)]
Background color of private list-items updated (#20630)

A minor color update on the dashboard. This PR simply changes the background from hard-coded light yellow to the theme colors (var).

2 years agoUse request timeout for git service rpc (#20689)
parnic [Sat, 6 Aug 2022 13:13:11 +0000 (08:13 -0500)]
Use request timeout for git service rpc (#20689)

This enables git.Command's Run to optionally use the given context directly so its deadline will be respected. Otherwise, it falls back to the previous behavior of using the supplied timeout or a default timeout value of 360 seconds.

repo's serviceRPC() calls now use the context's deadline (which is unset/unlimited) instead of the default 6-minute timeout. This means that large repo clones will no longer arbitrarily time out on the upload-pack step, and pushes can take longer than 6 minutes on the receive-pack step.

Fixes #20680

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoIncrease default item listing size `ISSUE_PAGING_NUM` to 20 (#20547)
Norwin [Sat, 6 Aug 2022 10:43:40 +0000 (12:43 +0200)]
Increase default item listing size `ISSUE_PAGING_NUM` to 20 (#20547)

* increase default page sizes to 20
* adjust docs to reflect that the setting is used all over the place
* fix tests

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years ago[skip ci] Updated translations via Crowdin
KN4CK3R [Sat, 6 Aug 2022 00:20:54 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoAllow multiple metadata files for Maven packages (#20674)
KN4CK3R [Fri, 5 Aug 2022 19:00:47 +0000 (21:00 +0200)]
Allow multiple metadata files for Maven packages (#20674)

* Allow file overwrite for meta files.

* Added tests.

* lint

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2 years agodocs: update comparison.zh-cn.md (#20656)
PEN² [Fri, 5 Aug 2022 18:56:09 +0000 (02:56 +0800)]
docs: update comparison.zh-cn.md (#20656)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoAdd a notice for breaking check in upgrade document (#20682)
wxiaoguang [Fri, 5 Aug 2022 14:20:13 +0000 (22:20 +0800)]
Add a notice for breaking check in upgrade document (#20682)

2 years agomove handleGlobalEnterQuickSubmit into a separate file to avoid cycle-import (#20679)
wxiaoguang [Fri, 5 Aug 2022 10:08:29 +0000 (18:08 +0800)]
move handleGlobalEnterQuickSubmit into a separate file to avoid cycle-import (#20679)

2 years agoUse correct field name. (#20675)
KN4CK3R [Fri, 5 Aug 2022 06:49:03 +0000 (08:49 +0200)]
Use correct field name. (#20675)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago[skip ci] Updated translations via Crowdin
KN4CK3R [Fri, 5 Aug 2022 00:20:59 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoUse correct context to get package content (#20673)
KN4CK3R [Thu, 4 Aug 2022 21:14:47 +0000 (23:14 +0200)]
Use correct context to get package content (#20673)

2 years agoExecutable check always returns true for windows (#20637)
JonRB [Thu, 4 Aug 2022 07:28:32 +0000 (08:28 +0100)]
Executable check always returns true for windows (#20637)

* Executable check always returns true for windows

Windows doesn't have the concept of "executable" POSIX bits so for now always return true to minimise doctor and logging noise. Addresses #20636

* gofmt tweak

* Update modules/repository/hooks.go

Co-authored-by: silverwind <me@silverwind.io>
* gofmt comment line

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2 years agoCheck webhooks slice length before calling xorm (#20642)
Gabriel Vasile [Thu, 4 Aug 2022 04:22:50 +0000 (07:22 +0300)]
Check webhooks slice length before calling xorm (#20642)

xorm.db.Insert errors for empty slices. Fixes: #20641

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoCheck issue labels slice length before calling xorm Insert; fixes #20654 (#20655)
Gabriel Vasile [Thu, 4 Aug 2022 03:20:22 +0000 (06:20 +0300)]
Check issue labels slice length before calling xorm Insert; fixes #20654 (#20655)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2 years ago[skip ci] Updated translations via Crowdin
wxiaoguang [Thu, 4 Aug 2022 00:20:55 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoFix the JS error "EventSource is not defined" caused by some non-standard browsers...
wxiaoguang [Wed, 3 Aug 2022 19:58:27 +0000 (03:58 +0800)]
Fix the JS error "EventSource is not defined" caused by some non-standard browsers (#20584)

* fall back to periodic poller

Co-authored-by: silverwind <me@silverwind.io>
2 years agoSend correct NuGet status codes (#20647)
KN4CK3R [Wed, 3 Aug 2022 15:22:32 +0000 (17:22 +0200)]
Send correct NuGet status codes (#20647)

* Fixed status codes.

* Fixed status codes.

2 years agoAdd default commit messages to PR for squash merge (#20618)
Tyrone Yeh [Wed, 3 Aug 2022 04:56:59 +0000 (12:56 +0800)]
Add default commit messages to PR for squash merge (#20618)

Keep the same behavior as 1.16

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2 years ago[skip ci] Updated translations via Crowdin
Gusted [Wed, 3 Aug 2022 00:21:26 +0000 (00:21 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoUse `strings.Cut` for GIT_PROTOCOL value (#20638)
Gusted [Tue, 2 Aug 2022 22:34:50 +0000 (00:34 +0200)]
Use `strings.Cut` for GIT_PROTOCOL value (#20638)

- As per https://github.com/go-gitea/gitea/pull/20616#discussion_r935612542

2 years agoFix the admin mailer config display (#20633)
wxiaoguang [Tue, 2 Aug 2022 16:43:27 +0000 (00:43 +0800)]
Fix the admin mailer config display (#20633)

2 years agoUse correct page size for link header pagination (#20546)
Norwin [Tue, 2 Aug 2022 14:59:44 +0000 (16:59 +0200)]
Use correct page size for link header pagination (#20546)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoFix package upload for files >32mb (#20622)
KN4CK3R [Tue, 2 Aug 2022 13:35:48 +0000 (15:35 +0200)]
Fix package upload for files >32mb (#20622)

* Rewind file before first read.
* Added tests.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoAdd info about Wire 2 when Git over SSH (#20619)
Gusted [Tue, 2 Aug 2022 10:25:26 +0000 (12:25 +0200)]
Add info about Wire 2 when Git over SSH (#20619)

- Follow up of #20616. Add a note about this in the config cheat
sheet, given there's no dedicated page for this.

2 years agoEnable Wire 2 for Internal SSH Server (#20616)
Gusted [Tue, 2 Aug 2022 07:56:38 +0000 (09:56 +0200)]
Enable Wire 2 for Internal SSH Server (#20616)

- Git only decides to use the Wire 2 protocol when `git
{receive,upload}-pack` receive the `GIT_PROTOCOL` environment with as
value `version=2`. Currently the internal SSH Server wasn't passing this
environment through. The `gitea serv` code already passed all received
environments to the git command, so no code changes there.

2 years agoRework mailer settings (#18982)
Clar Fon [Tue, 2 Aug 2022 05:24:18 +0000 (01:24 -0400)]
Rework mailer settings (#18982)

* `PROTOCOL`: can be smtp, smtps, smtp+startls, smtp+unix, sendmail, dummy
* `SMTP_ADDR`: domain for SMTP, or path to unix socket
* `SMTP_PORT`: port for SMTP; defaults to 25 for `smtp`, 465 for `smtps`, and 587 for `smtp+startls`
* `ENABLE_HELO`, `HELO_HOSTNAME`: reverse `DISABLE_HELO` to `ENABLE_HELO`; default to false + system hostname
* `FORCE_TRUST_SERVER_CERT`: replace the unclear `SKIP_VERIFY`
* `CLIENT_CERT_FILE`, `CLIENT_KEY_FILE`, `USE_CLIENT_CERT`: clarify client certificates here

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoAdd default value for clone URLs (#20600)
silverwind [Tue, 2 Aug 2022 02:52:05 +0000 (04:52 +0200)]
Add default value for clone URLs (#20600)

Default clone URLs to HTTP(S) in DOM rendering. JS will immediately
replace this if the user preference is SSH.

Fixes: https://github.com/go-gitea/gitea/issues/20558
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years ago[skip ci] Updated translations via Crowdin
PEN² [Tue, 2 Aug 2022 00:20:59 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agodocs: zh-cn translations for fail2ban setup (#20588)
PEN² [Mon, 1 Aug 2022 15:36:50 +0000 (23:36 +0800)]
docs: zh-cn translations for fail2ban setup (#20588)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years agoShould also support upper-case README files (#20581)
Gary Wang [Mon, 1 Aug 2022 12:15:40 +0000 (20:15 +0800)]
Should also support upper-case README files (#20581)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years agoFix typos in backup documentation (#20567)
tryfail [Mon, 1 Aug 2022 05:16:38 +0000 (06:16 +0100)]
Fix typos in backup documentation (#20567)

Fixed multiple typos "/user/local/bin" to the proper path "/usr/local/bin"

2 years ago[skip ci] Updated translations via Crowdin
Gary Wang [Mon, 1 Aug 2022 00:20:39 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

2 years agoSupport localized README (#20508)
Gary Wang [Sun, 31 Jul 2022 22:36:58 +0000 (06:36 +0800)]
Support localized README (#20508)

* Support localized README

* Slightly simplify getting the readme file and add some tests. Ensure that i18n also
works for docs/ etc.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update modules/markup/renderer.go

* Update modules/markup/renderer.go

* Update modules/markup/renderer.go

Co-authored-by: Andrew Thornton <art27@cantab.net>
2 years agoClean up and fix clone button script (#20415)
silverwind [Sun, 31 Jul 2022 18:29:55 +0000 (20:29 +0200)]
Clean up and fix clone button script (#20415)

The button 'primary' class needs to be set in a synchronous script to prevent flicker of the button which was regressed recently, fixed that.

Additionally, reduced the two script tags to just one, the previous scripts were actually initializing the buttons thrice on the empty repo page, now it only initializes once. Finally, removed duplicate code and re-used the inline function in the update code as well.

I had to split out the script into a separate template as on the empty repo page, the script needs access to the clone URL span in the example text, which is rendered below the clone buttons, so buttons and script could not be combined.

2 years agoAdd disable download source configuration (#20548)
Lunny Xiao [Sun, 31 Jul 2022 16:57:02 +0000 (00:57 +0800)]
Add disable download source configuration (#20548)

Add configuration to enable/disable download source from UI.

Co-authored-by: zeripath <art27@cantab.net>
2 years agoFix default merge style (#20564)
wxiaoguang [Sun, 31 Jul 2022 15:13:31 +0000 (23:13 +0800)]
Fix default merge style (#20564)

2 years agoUpdate login methods in package docs (#20561)
KN4CK3R [Sun, 31 Jul 2022 13:41:25 +0000 (15:41 +0200)]
Update login methods in package docs (#20561)

2 years agoAdd missing Tabs on organisation/package view (Frontport #20539) (#20540)
6543 [Sun, 31 Jul 2022 12:32:51 +0000 (14:32 +0200)]
Add missing Tabs on organisation/package view (Frontport #20539) (#20540)

hotfix #20106

2 years ago[skip ci] Updated licenses and gitignores
Norwin [Sun, 31 Jul 2022 00:20:42 +0000 (00:20 +0000)]
[skip ci] Updated licenses and gitignores

2 years agoAdd setting `SQLITE_JOURNAL_MODE` to enable WAL (#20535)
Norwin [Sat, 30 Jul 2022 19:57:41 +0000 (21:57 +0200)]
Add setting `SQLITE_JOURNAL_MODE` to enable WAL (#20535)

Co-authored-by: Andrew Thornton <art27@cantab.net>
2 years agoRework file highlight rendering and fix yaml copy-paste (#19967)
silverwind [Sat, 30 Jul 2022 19:17:43 +0000 (21:17 +0200)]
Rework file highlight rendering and fix yaml copy-paste (#19967)

* Rework file highlight rendering and fix yaml copy-paste

* use Split+Trim to replace tag parser

* remove unnecessary bytes.Count

* remove newLineInHTML = "&#10;"

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>