]> source.dussan.org Git - gitea.git/log
gitea.git
3 years agoAdd cloudron to img-src CSP (#13887)
John Olheiser [Mon, 7 Dec 2020 16:33:22 +0000 (10:33 -0600)]
Add cloudron to img-src CSP (#13887)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 7 Dec 2020 12:09:02 +0000 (12:09 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoissue #12450: return original URL in `original_url` JSON field (#13885)
Eric Belhomme [Mon, 7 Dec 2020 12:07:48 +0000 (13:07 +0100)]
issue #12450: return original URL in `original_url` JSON field (#13885)

Co-authored-by: Gitea <gitea@fake.local>
3 years agoREADME: Add more contents to the "further information" section. (#13871)
Patrick Schratz [Sun, 6 Dec 2020 13:56:46 +0000 (14:56 +0100)]
README: Add more contents to the "further information" section. (#13871)

3 years agoFix mermaid chart size (#13863)
silverwind [Sun, 6 Dec 2020 03:05:22 +0000 (04:05 +0100)]
Fix mermaid chart size (#13863)

* Fix mermaid chart size

Seems like one of the recent updates to the module unexpectedly shrunk
these charts, bring them back up to full width.

* don't stretch to full width

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoAdd link to shop in docs (#13864)
techknowlogick [Sat, 5 Dec 2020 22:34:29 +0000 (17:34 -0500)]
Add link to shop in docs (#13864)

Replaced link to code.gitea.io as that subdomain isn't meant for human consumption, but rather for our vanity go import URLs
Only replaced link for english, open to adding links for other languages if anyone is able/willing to add them

3 years agoUpdate go-enry dependency to v2.6.0 (#13861)
Lauris BH [Sat, 5 Dec 2020 18:31:18 +0000 (20:31 +0200)]
Update go-enry dependency to v2.6.0 (#13861)

3 years agoFix branch/tag notifications in mirror sync (#13855)
manuelluis [Sat, 5 Dec 2020 15:13:11 +0000 (16:13 +0100)]
Fix branch/tag notifications in mirror sync (#13855)

* Fix branch/tag notifications in mirror sync

* Fix gofmt

Co-authored-by: Gitea <gitea@fake.local>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoFont weight tweaks (#13854)
silverwind [Sat, 5 Dec 2020 11:00:36 +0000 (12:00 +0100)]
Font weight tweaks (#13854)

Font weight 500 is not discernible from 400 on some fonts/operating
systems so push them back to previous value 600 except for
fomantic-ui elements which stay at 500.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoImprove migrate page and add card CSS (#13751)
silverwind [Sat, 5 Dec 2020 10:09:09 +0000 (11:09 +0100)]
Improve migrate page and add card CSS (#13751)

- Use original gitea logo on migrate page
- Add card styles and map colors to css vars
- Tweak migrate page, adding hover effect to cards

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago[Docs] fix typos and reference to structs package (#13856)
Nuno Silva [Sat, 5 Dec 2020 05:08:46 +0000 (05:08 +0000)]
[Docs] fix typos and reference to structs package (#13856)

3 years agoRemove Noto Color Emoji fallback (#13838)
silverwind [Fri, 4 Dec 2020 15:01:47 +0000 (16:01 +0100)]
Remove Noto Color Emoji fallback (#13838)

It's causing browser errors logged in Firefox under certain
circumstances, and I think we're better off recommending Linux users to
install a proper emoji font into their system.

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 4 Dec 2020 11:19:46 +0000 (11:19 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoStyle and template tweaks (#13828)
silverwind [Fri, 4 Dec 2020 11:18:37 +0000 (12:18 +0100)]
Style and template tweaks (#13828)

* Style and template tweaks

- Get red and green buttons on arc green closer to base theme
- EasyMDE adjustments, toolbar and focus border
- Fix header on 404 repo page
- Tweaks to frontpage search, add 'Create Repo' button
- Fix misaligned box headers
- Fix pagination on arc-green
- Fix background and footer on explore and repo search

* better fix for header button alignment

* add label hover for reactions

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 4 Dec 2020 07:34:40 +0000 (07:34 +0000)]
[skip ci] Updated translations via Crowdin

3 years agofixed and updated FAQ table of contents links (#13835)
Holger Schmidt [Fri, 4 Dec 2020 07:33:38 +0000 (08:33 +0100)]
fixed and updated FAQ table of contents links (#13835)

* fixed and updated FAQ table of contents links, rewording one heading that wouldn't generate a working link

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoUser Settings: Ignore empty language codes & validate (#13755)
6543 [Fri, 4 Dec 2020 06:20:30 +0000 (07:20 +0100)]
User Settings: Ignore empty language codes & validate (#13755)

3 years agoFix crash in short link processor (#13839)
mrsdizzie [Fri, 4 Dec 2020 02:01:42 +0000 (21:01 -0500)]
Fix crash in short link processor (#13839)

Fixes #13819

3 years agoUpdate font stack to bootstrap's latest (#13834)
silverwind [Fri, 4 Dec 2020 00:12:16 +0000 (01:12 +0100)]
Update font stack to bootstrap's latest (#13834)

Update to latest Bootstrap font stack [1].

Should fix https://github.com/go-gitea/gitea/issues/13784.

[1] https://github.com/twbs/bootstrap/blob/bf3c4d0b6891c21377e6b1fb7962f5fbf198325f/scss/_variables.scss#L396

Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix avatar template error (#13833)
silverwind [Thu, 3 Dec 2020 23:12:59 +0000 (00:12 +0100)]
Fix avatar template error (#13833)

Fixes: https://github.com/go-gitea/gitea/issues/13831
3 years agoMake sure email recipients can see issue (#13820)
John Olheiser [Thu, 3 Dec 2020 20:25:49 +0000 (14:25 -0600)]
Make sure email recipients can see issue (#13820)

* Initial pass

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Remove over-op

Signed-off-by: jolheiser <john.olheiser@gmail.com>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 3 Dec 2020 18:47:16 +0000 (18:47 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoDirect avatar rendering (#13649)
silverwind [Thu, 3 Dec 2020 18:46:11 +0000 (19:46 +0100)]
Direct avatar rendering (#13649)

* Direct avatar rendering

This adds new template helpers for avatar rendering which output image
elements with direct links to avatars which makes them cacheable by the
browsers.

This should be a major performance improvment for pages with many avatars.

* fix avatars of other user's profile pages

* fix top border on user avatar name

* uncircle avatars

* remove old incomplete avatar selector

* use title attribute for name and add it back on blame

* minor refactor

* tweak comments

* fix url path join and adjust test to new result

* dedupe functions

3 years agoFix various CSS issues (#13769)
silverwind [Thu, 3 Dec 2020 17:05:35 +0000 (18:05 +0100)]
Fix various CSS issues (#13769)

- Fix black text being white on base theme
- Fix file/blame button group
- Fix label margin in dropdown (regression from graph pr)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoReply button is not removed when deleting a code review comment (#13774)
Jimmy Praet [Thu, 3 Dec 2020 15:05:27 +0000 (16:05 +0100)]
Reply button is not removed when deleting a code review comment (#13774)

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
3 years agoMove LFSLock APIFormat into convert package (#13808)
6543 [Thu, 3 Dec 2020 14:05:48 +0000 (15:05 +0100)]
Move LFSLock APIFormat into convert package (#13808)

3 years agoExpose default theme in meta and API (#13809)
John Olheiser [Thu, 3 Dec 2020 12:53:21 +0000 (06:53 -0600)]
Expose default theme in meta and API (#13809)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoClickable links in pull request (and issue) titles (#13695)
Jimmy Praet [Thu, 3 Dec 2020 10:50:47 +0000 (11:50 +0100)]
Clickable links in pull request (and issue) titles (#13695)

* clickable links in pull request (and issue) titles #13658

reuses the existing logic to render clickable links in commit messages

* dedicated RenderIssueTitle function

applied patch from @mrsdizzie

3 years agoReduce make verbosity (#13803)
silverwind [Thu, 3 Dec 2020 01:54:30 +0000 (02:54 +0100)]
Reduce make verbosity (#13803)

Various make targets log huge lists of files to the terminal which are
generally useless to read. Replace those cases with short replacement
messages.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoWhen reinitialising DBConfig reset the database use flags (#13796)
zeripath [Thu, 3 Dec 2020 00:39:48 +0000 (00:39 +0000)]
When reinitialising DBConfig reset the database use flags (#13796)

One perennial issue is users running the install page,
changing the database dialect and then suffering with issues

This PR simply resets all of the database.Use flags on
initDBConfig. This should prevent this issue from occuring.

Fix #13788
Fix #5480

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoUpdate docker ssh passthrough docs (#13732)
Patrick Schratz [Wed, 2 Dec 2020 23:23:54 +0000 (00:23 +0100)]
Update docker ssh passthrough docs (#13732)

* update docker ssh passthrough docs

* remove mailto:git part in SSH forwarding call

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoMove Repo APIFormat to convert package (#13787)
6543 [Wed, 2 Dec 2020 21:38:30 +0000 (22:38 +0100)]
Move Repo APIFormat to convert package (#13787)

* Move Repo APIFormat to convert package

* tweek

3 years agoMigrations: Use Process Manager to create own Context (#13792)
6543 [Wed, 2 Dec 2020 18:36:06 +0000 (19:36 +0100)]
Migrations: Use Process Manager to create own Context (#13792)

3 years agofrontport 1.13.0 changelog (#13790)
techknowlogick [Wed, 2 Dec 2020 16:39:22 +0000 (11:39 -0500)]
frontport 1.13.0 changelog (#13790)

3 years agoUpdate Gitea Version & Fix Migration Comments (#13789)
6543 [Wed, 2 Dec 2020 16:04:19 +0000 (17:04 +0100)]
Update Gitea Version & Fix Migration Comments (#13789)

* correct migration version comments

* update lates version in docs

3 years agomove notification APIFormat (#13783)
6543 [Wed, 2 Dec 2020 09:24:35 +0000 (10:24 +0100)]
move notification APIFormat (#13783)

3 years agoRefactor doctor (#12264)
zeripath [Wed, 2 Dec 2020 04:56:04 +0000 (04:56 +0000)]
Refactor doctor (#12264)

* Refactor Logger

Refactor Logger to make a logger interface and make it possible to
wrap loggers for specific purposes.

* Refactor Doctor

    Move the gitea doctor functions into its own module.
    Use a logger for its messages instead of returning a results string[]

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

Co-authored-by: 6543 <6543@obermui.de>
* Update modules/doctor/misc.go

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoSwap swagger-ui with swagger-ui-dist (#13777)
silverwind [Wed, 2 Dec 2020 01:18:39 +0000 (02:18 +0100)]
Swap swagger-ui with swagger-ui-dist (#13777)

* Swap swagger-ui with swagger-ui-dist

The prebuilt version of swagger-ui is identical to the regular one but
brings the benefit of faster webpack compilation and less npm
dependencies so it npm installs will speed up too.

* use bundle file directly

3 years agoAdd class to page content to unify top margin (#13766)
silverwind [Tue, 1 Dec 2020 04:00:14 +0000 (05:00 +0100)]
Add class to page content to unify top margin (#13766)

* Add class to page content to unify top margin

Previously pages would individually set this margin but some didn't so
content would stick to the header without any space. Resolve this by
adding a new class that is added on all pages. The only place where we
remove this margin again is on the pages with menu or wrapper in the
header.

* fix admin notices

* fix team pages

* fix loading segment on gitgraph for arc-green

* fix last missing case

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFlip RUN_MODE detection in router (#13768)
silverwind [Tue, 1 Dec 2020 01:54:44 +0000 (02:54 +0100)]
Flip RUN_MODE detection in router (#13768)

Missed that part in https://github.com/go-gitea/gitea/pull/13765. It's
already in the 1.13 backport so this forward-ports that change again.

3 years agoSet RUN_MODE prod by default (#13765)
silverwind [Mon, 30 Nov 2020 19:52:04 +0000 (20:52 +0100)]
Set RUN_MODE prod by default (#13765)

I think it's a bad default to have "dev" as the default run mode which
enables debugging and now also disables HTTP caching. It's better to
just default to a value suitable for general deployments.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoset git-core paths in snap (#13711)
Jeremie Deray [Mon, 30 Nov 2020 18:49:11 +0000 (13:49 -0500)]
set git-core paths in snap (#13711)

Signed-off-by: artivis <deray.jeremie@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix bogus http requests on diffs (#13760)
silverwind [Mon, 30 Nov 2020 17:47:01 +0000 (18:47 +0100)]
Fix bogus http requests on diffs (#13760)

The .blob-excerpt elements don't have these data attributes in some
cases resulting in bogus http request when expanding a diff and clicking
into the expanded area. This prevents those.

Should backport to 1.13.

Fixes: https://github.com/go-gitea/gitea/issues/13759
3 years agoFix avatar offset on PR/issue timeline view (#13753)
Cirno the Strongest [Mon, 30 Nov 2020 16:11:17 +0000 (17:11 +0100)]
Fix avatar offset on PR/issue timeline view (#13753)

* Fix avatar offset on PR/issue timeline view

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
3 years agoFix webpack build warnings (#13752)
silverwind [Sun, 29 Nov 2020 23:16:04 +0000 (00:16 +0100)]
Fix webpack build warnings (#13752)

Turns out some of the dependencies make use of optional dependencies
like the vue-template-compiler. Install them again and install
fomantic-ui only when it's being build to fix webpack warnings.

3 years agoUpdate JS dependencies and misc tweaks (#13741)
silverwind [Sun, 29 Nov 2020 21:39:36 +0000 (22:39 +0100)]
Update JS dependencies and misc tweaks (#13741)

* Update JS dependencies and misc tweaks

- Update all JS dependencies minus webpack
- Adapt CodeMirrors styling to new CSS parent introduced by EasyMDE
- Set eslint parser to latest and add new eslint 7.14 rule
- Speed up npm install by disabling audit and fund checks
- Move fomantic-ui to optional dependencies to further speed up npm
- Enable syntax highlighting on GH for .eslintrc and .stylelintrc
- Makefile cleanups

* disable audit in npmrc

* add missing dash

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago[Vendor] Update Batch 2020-11 (#13746)
6543 [Sun, 29 Nov 2020 20:54:08 +0000 (21:54 +0100)]
[Vendor] Update Batch 2020-11 (#13746)

* github.com/alecthomas/chroma v0.8.1 -> v0.8.2

Changelog: https://github.com/alecthomas/chroma/releases/tag/v0.8.2

* github.com/blevesearch/bleve v1.0.12 -> v1.0.13

Changelog: https://github.com/blevesearch/bleve/releases/tag/v1.0.13

* github.com/editorconfig/editorconfig-core-go v2.3.8 -> v2.3.9

Changelog: https://github.com/editorconfig/editorconfig-core-go/releases/tag/v2.3.9

* github.com/klauspost/compress v1.11.2 -> v1.11.3

Changelog: https://github.com/klauspost/compress/releases/tag/v1.11.3

* github.com/minio/minio-go v7.0.5 -> v7.0.6

Changelog: https://github.com/minio/minio-go/releases/tag/v7.0.6

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoUpdate discord domain (#13747)
hana [Sun, 29 Nov 2020 17:33:33 +0000 (00:33 +0700)]
Update discord domain (#13747)

Update discord domain in webhook repository settings.

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 29 Nov 2020 15:53:10 +0000 (15:53 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoMarkdown and Repo header tweaks (#13744)
silverwind [Sun, 29 Nov 2020 15:52:11 +0000 (16:52 +0100)]
Markdown and Repo header tweaks (#13744)

* Markdown and Repo header tweaks

- Use CSS vars for all markdown colors
- Tweak repo header, removing double borders and adjust sizes
- Use menu instead of buttons for issue open/close switcher
- Add emoji inversion for select emoji glyphs in arc-green
- Use border over box-shadow for all buttons
- Add spacing element to login form without openid

* repo settings navbar fix

* use shared template in more places and adjust dashboard

* fix remaining open/close combos

3 years agoDropdowns, Labels fixes and more CSS tweaks (#13733)
silverwind [Sun, 29 Nov 2020 06:22:04 +0000 (07:22 +0100)]
Dropdowns, Labels fixes and more CSS tweaks (#13733)

* Dropdowns and Labels fixes

- Rework dropdown, menu and label styles
- Improve issue sidebar milestone and label sections
- Fix archived repo and private org badge
- Move more colors to CSS vars
- Move issue number to end of title on issue page

* more dropdown fixes

* fix basic blue labels - fixes #13731

* improve class setting on svg

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix label styles affecting shabox (#13734)
silverwind [Sun, 29 Nov 2020 03:26:03 +0000 (04:26 +0100)]
Fix label styles affecting shabox (#13734)

* Fix label styles affecting shabox

Add common parent .labels-list to issue labels lists to prevent
affecting other elements.

Fixes: https://github.com/go-gitea/gitea/issues/13704
* Update templates/shared/issuelist.tmpl

* Update templates/shared/issuelist.tmpl

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoAdd Allow-/Block-List for Migrate & Mirrors (#13610)
6543 [Sun, 29 Nov 2020 00:37:58 +0000 (01:37 +0100)]
Add Allow-/Block-List for Migrate & Mirrors (#13610)

* add black list and white list support for migrating repositories

* fix fmt

* fix lint

* fix vendor

* fix modules.txt

* clean diff

* specify log message

* use blocklist/allowlist

* allways use lowercase to match url

* Apply allow/block

* Settings: use existing "migrations" section

* convert domains lower case

* dont store unused value

* Block private addresses for migration by default

* fix lint

* use proposed-upstream func to detect private IP addr

* a nit

* add own error for blocked migration, add tests, imprufe api

* fix test

* fix-if-localhost-is-ipv4

* rename error & error message

* rename setting options

* Apply suggestions from code review

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoVerify password for local-account activation (#13631)
6543 [Sat, 28 Nov 2020 22:41:06 +0000 (23:41 +0100)]
Verify password for local-account activation (#13631)

* Verify passwords for activation

This is to prevent 3rd party activation

* Fix function comment

* only veify password on local-account aktivation

* fix lint

* Update templates/user/auth/activate.tmpl

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Andreas Shimokawa <shimokawa@fsfe.org>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoReduce number of docker pulls on ci (#13739)
silverwind [Sat, 28 Nov 2020 21:59:05 +0000 (22:59 +0100)]
Reduce number of docker pulls on ci (#13739)

Should reduce errors like https://drone.gitea.io/go-gitea/gitea/32989/7/2
by only pulling each distinct image once per pipeline.

Co-authored-by: zeripath <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 28 Nov 2020 21:01:53 +0000 (21:01 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoPush HEAD instead of master when initialising repositories (#13719)
zeripath [Sat, 28 Nov 2020 21:00:38 +0000 (21:00 +0000)]
Push HEAD instead of master when initialising repositories (#13719)

* Push HEAD instead of master when initialising repositories

It is possible on modern gits to change the initial branch to something other than
master. This breaks initialising repositories because we assume that the initial
branch is going to be master unless specifically changed.

This PR simply bypasses this issue by pushing the HEAD rather than the master branch.

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

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoAdd block on official review requests branch protection (#13705)
a1012112796 [Sat, 28 Nov 2020 19:30:46 +0000 (03:30 +0800)]
Add block on official review requests branch protection (#13705)

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoFix .editorconfig (#13735)
silverwind [Sat, 28 Nov 2020 18:29:46 +0000 (19:29 +0100)]
Fix .editorconfig (#13735)

These whitespaces introduced in #13698 seem to break my editorconfig
plugin in sublime text resulting in tab-indented files getting converted
to spaces on save.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoFix missing stylesheets on installation page (#13736)
Simon [Sat, 28 Nov 2020 17:52:30 +0000 (18:52 +0100)]
Fix missing stylesheets on installation page (#13736)

When running gitea for the first time, the stylesheets for the
installation page are broken since the middleware that statically serves
stylesheets does not get executed by chi. This is because if no handlers
are registered in chi, it will drop all middleware.

This commit introduces a "dummy" handler to deal with that quirk.

Closes #13725

Thanks: Lunny Xiao <xiaolunwen@gmail.com> for finding the quirk

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoui: show 'owner' tag for real owner (#13689)
a1012112796 [Sat, 28 Nov 2020 15:52:29 +0000 (23:52 +0800)]
ui: show 'owner' tag for real owner (#13689)

* ui: show 'owner' tag for real owner

Signed-off-by: a1012112796 <1012112796@qq.com>
* Update custom/conf/app.example.ini

* simplify logic

fix logic
fix a small bug about original author

* remove system manager tag

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoFix review request notification issue link when external issue tracker is enabled...
Jimmy Praet [Sat, 28 Nov 2020 11:06:59 +0000 (12:06 +0100)]
Fix review request notification issue link when external issue tracker is enabled (#13723)

The issue.HTMLURL() automatically gets converted to the expected #issue format by the post processors

3 years agoFormat files (#13698)
6543 [Sat, 28 Nov 2020 06:12:22 +0000 (07:12 +0100)]
Format files (#13698)

* align "make help"

* format

* untouch build/generate-svg.js

* untouch .eslintrc

* combine editorconfig's

* rm editorconfig

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoHandle and propagate errors when checking if paths are Dirs, Files or Exist (#13186)
zeripath [Sat, 28 Nov 2020 02:42:08 +0000 (02:42 +0000)]
Handle and propagate errors when checking if paths are Dirs, Files or Exist (#13186)

* Ensure errors from IsDir propagate

* Handle errors when checking IsFile

* Handle and propagate errors from IsExist

* Update modules/templates/static.go

* Update modules/templates/static.go

* Return after ctx.ServerError

* Apply suggestions from code review

* Fix tests

The previous merge managed to break repo_form.go

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoFixed the log path on fail2ban page (#13726)
Jesse Laprade [Sat, 28 Nov 2020 01:08:23 +0000 (20:08 -0500)]
Fixed the log path on fail2ban page (#13726)

* Changed path from /home/git/gitea/log/gitea.log to
  /var/lib/gitea/log/gitea.log on the fail2ban page, so the log matches
  the instructions found on the following binary installation page:
  https://docs.gitea.io/en-us/install-from-binary/#create-required-directory-structure

3 years agoEnable linting of JS inside templates (#13708)
silverwind [Fri, 27 Nov 2020 23:01:33 +0000 (00:01 +0100)]
Enable linting of JS inside templates (#13708)

Indentation-related rules are disabled because indent templates with
tabs but our lint rules expect spaces.

Also had to exclude a few files where using template variables in the JS
is causing syntax errors for the JS parser. I don't think there's a way
to solve this otherwise.

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoUse trashcan icon for remove review request (#13722)
Jimmy Praet [Fri, 27 Nov 2020 20:55:59 +0000 (21:55 +0100)]
Use trashcan icon for remove review request (#13722)

3 years agoIncrement skip to avoid infini-loop (#13703)
John Olheiser [Fri, 27 Nov 2020 20:00:52 +0000 (14:00 -0600)]
Increment skip to avoid infini-loop (#13703)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoPrevent clone protocol button flash on page load (#13626)
silverwind [Thu, 26 Nov 2020 20:31:09 +0000 (21:31 +0100)]
Prevent clone protocol button flash on page load (#13626)

* Prevent clone protocol button flash on page load

Previously, the saved active buttons would flash on page load because if
delay involved in JS execution. Prevent these flashes bydisabling
transitions on page load and run the script right after. It's not an
ideal solution (which would require server-side storage of user
settings like this) but I'd say better than before.

* add defer

Co-authored-by: zeripath <art27@cantab.net>
3 years agoCSS navbar and color tweaks (#13609)
silverwind [Thu, 26 Nov 2020 19:33:28 +0000 (20:33 +0100)]
CSS navbar and color tweaks (#13609)

* CSS and color tweaks

- Unify navbar-style menus
- Fix admin bar overlapping menu bar
- Fixes file edit comment box
- Fix double border on review box
- Fix review timeline icons

* Many fixes to new-menu and navbar layout enhancements

* misc settings fixes

* navbar tweak

* fix pr tabs

* branch tag and arc color tweaks

3 years agoUse chronological commit order in default squash message (#13661) (#13696)
Jimmy Praet [Wed, 25 Nov 2020 20:08:17 +0000 (21:08 +0100)]
Use chronological commit order in default squash message (#13661) (#13696)

3 years agoSupport shortened commit SHAs in URLs (#13686)
Lauris BH [Wed, 25 Nov 2020 20:07:39 +0000 (22:07 +0200)]
Support shortened commit SHAs in URLs (#13686)

* Support shortened commit SHAs in URLs and API

* Add test case for short sha

* Fix format

* Revert API support

* Add canonical link headers for short commit ID URLs

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 25 Nov 2020 11:21:50 +0000 (11:21 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoIssue and Pulls lists rework (#13594)
silverwind [Wed, 25 Nov 2020 11:20:40 +0000 (12:20 +0100)]
Issue and Pulls lists rework (#13594)

* Issue and Pulls lists rework

Reorganized and restyled the issue and pull request lists.

* color and layout tweaks

* use new issue list on dashboard as well

* move pagination into template

* misc tweaks

* fix label hover

* fix milestone list

* fix discrepancies between issue and milestone list, add new 'merge' helper

* fmt

* simplify merge helper

* remove whitespace

* fix startIndex

* further simplify dict merging

* rename helper to 'mergeinto' for clarity

* allow bottom-row to wrap

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoCSS table fixes (#13692)
silverwind [Tue, 24 Nov 2020 19:27:10 +0000 (20:27 +0100)]
CSS table fixes (#13692)

* CSS table fixes

Override the right fomantic selectors.

Fixes: https://github.com/go-gitea/gitea/issues/13690
* use flexbox

3 years agoFix heatmap rendering in Chrome and Safari (#13645)
silverwind [Mon, 23 Nov 2020 22:41:09 +0000 (23:41 +0100)]
Fix heatmap rendering in Chrome and Safari (#13645)

* Fix heatmap rendering in Chrome and Safari

Apparently SVG inside flexbox renders slightly different across browsers
where Firefox would stretch to fit the parent while Chrome and safari
wouldn't. Stretch the SVG to the width of the parent for consistent
rendering.

Also did a few minor tweaks on the min-height of the box so it takes up
less space on smaller responsive breakpoints.

Fixes: https://github.com/go-gitea/gitea/issues/13634
Fixes: https://github.com/go-gitea/gitea/pull/13637
* position tweak

Co-authored-by: zeripath <art27@cantab.net>
3 years ago[API] Add more filters to issues search (#13514)
6543 [Mon, 23 Nov 2020 20:49:36 +0000 (21:49 +0100)]
[API] Add more filters to issues search (#13514)

* Add time filter for issue search

* Add limit option for paggination

* Add Filter for: Created by User, Assigned to User, Mentioning User

* update swagger

* Add Tests for limit, before & since

3 years agoUpdate _repository.less (#13672)
Cirno the Strongest [Mon, 23 Nov 2020 09:42:24 +0000 (10:42 +0100)]
Update _repository.less (#13672)

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoSend error message when CSRF token is missing (#13676)
Kevin Zúñiga [Mon, 23 Nov 2020 07:56:04 +0000 (02:56 -0500)]
Send error message when CSRF token is missing (#13676)

3 years agoDon't show a dropdown menu when only 1 merge option is available (#13660) (#13670)
Jimmy Praet [Sun, 22 Nov 2020 13:58:12 +0000 (14:58 +0100)]
Don't show a dropdown menu when only 1 merge option is available (#13660) (#13670)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 21 Nov 2020 22:42:26 +0000 (22:42 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoHandle incomplete diff files properly (#13662)
zeripath [Sat, 21 Nov 2020 22:41:24 +0000 (22:41 +0000)]
Handle incomplete diff files properly (#13662)

* Handle incomplete diff files properly

The code for parsing diff hunks has a bug whereby a very long line
in a very long diff would not be completely read leading to an unexpected
character.

This PR ensures that the line is completely cleared

Fix #13602

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Also allow git max line length <4096

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add test case

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoImprove strings (#13548)
Norwin [Sat, 21 Nov 2020 03:32:27 +0000 (03:32 +0000)]
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>
3 years agoRefactor combine label comments with tests (#13619)
Lunny Xiao [Fri, 20 Nov 2020 22:29:09 +0000 (06:29 +0800)]
Refactor combine label comments with tests (#13619)

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoskip email validation on empty string (#13627)
6543 [Fri, 20 Nov 2020 21:45:55 +0000 (22:45 +0100)]
skip email validation on empty string (#13627)

- move validation into its own function
- use a session for UpdateUserSetting

3 years agoAPI: Admin EditUser: Make FullName, Email, Website & Location optional (#13562)
6543 [Fri, 20 Nov 2020 01:56:42 +0000 (02:56 +0100)]
API: Admin EditUser: Make FullName, Email, Website & Location optional (#13562)

* API: Admin EditUser: Make FullName, Email, Website & Location optional

* update swagger docs

* add Tests

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agofinaly fix gitlab migration with subdir 2.0 (#13646)
6543 [Thu, 19 Nov 2020 23:18:34 +0000 (00:18 +0100)]
finaly fix gitlab migration with subdir 2.0 (#13646)

* final fix 2.0?

* ignore Approvals for pulls if not found

* CI.restart()

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoFix issue/pull request list assignee filter (#13647)
Karl Heinz Marbaise [Thu, 19 Nov 2020 21:39:55 +0000 (22:39 +0100)]
Fix issue/pull request list assignee filter (#13647)

* Fixes #13641 - Filtering in Pull Request kept all the time.
 - The URL contains all the time the assignee in cases
   where once a type has been selected.

Signed-off-by: Karl Heinz Marbaise <kama@soebes.de>
* Followup Fixes #13641 - Filtering in Pull Request kept all the time.
 - The URL contains all the time the assignee in cases
   where once a type has been selected.
 - The same behaviour was observed issues viewed via milestones.

Signed-off-by: Karl Heinz Marbaise <kama@soebes.de>
3 years agospecific version in docker compose (#13644)
techknowlogick [Thu, 19 Nov 2020 16:36:48 +0000 (11:36 -0500)]
specific version in docker compose (#13644)

* specific version in docker compose

fix #13643

* update latest version

3 years agofinaly fix gitlab migration with subdir (#13629)
6543 [Thu, 19 Nov 2020 05:17:56 +0000 (06:17 +0100)]
finaly fix gitlab migration with subdir (#13629)

* finaly fix #13535

* add logging

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 18 Nov 2020 22:01:29 +0000 (22:01 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoRemove fetch request from heatmap (#13623)
silverwind [Wed, 18 Nov 2020 22:00:16 +0000 (23:00 +0100)]
Remove fetch request from heatmap (#13623)

* Remove fetch request from heatmap

Render heatmap data directly to HTML, eliminating one HTTP request on
frontpage and user profile. Also added min-height to the container so
the page content will no longer move after loading.

* rename and error display

* also log the js error

* add error handler

* remove useless inline style and hide divider on small screens

* Update routers/user/home.go

* Update routers/user/profile.go

3 years agoConfig lock bot (#13624)
6543 [Wed, 18 Nov 2020 19:42:31 +0000 (20:42 +0100)]
Config lock bot (#13624)

* config lock bot

* Update .github/lock.yml

3 years agoFix a bug when check if owner is active (#13612)
Lunny Xiao [Wed, 18 Nov 2020 09:58:25 +0000 (17:58 +0800)]
Fix a bug when check if owner is active (#13612)

3 years agoDocs: Installation from package (#13607)
gsilvan [Tue, 17 Nov 2020 23:51:22 +0000 (00:51 +0100)]
Docs: Installation from package (#13607)

* add Arch Linux

* add Arch Linux ARM

* remove Debian

There is no package in any of Debian's official repositories as of 17.11.2020 17:55 UTC.

* shrink Alpine Linux

* Update docs/content/doc/installation/from-package.en-us.md

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <matti@mdranta.net>
3 years agoHTTP cache rework and enable caching for storage assets (#13569)
silverwind [Tue, 17 Nov 2020 22:44:52 +0000 (23:44 +0100)]
HTTP cache rework and enable caching for storage assets (#13569)

This enabled HTTP time-based cache for storage assets, primarily
avatars. I have not observed If-Modified-Since from browsers during
tests but I guess it's good to support regardless.

It introduces a new generic httpcache module that can handle both
time-based and etag-based caching.

Additionally, manifest.json and robots.txt are now also cachable.

3 years agoMove metrics from macaron to chi (#13601)
Lunny Xiao [Tue, 17 Nov 2020 20:50:06 +0000 (04:50 +0800)]
Move metrics from macaron to chi (#13601)

3 years agofix media query edge case (#13546)
Norwin [Tue, 17 Nov 2020 05:33:19 +0000 (05:33 +0000)]
fix media query edge case (#13546)

* fix media query edge case

was failing for 768px width before

* code review

* define responsive breakpoints as less variables

* add missing variables.less

* rename variables, drop screen constraints

* fix less import

* Apply suggestions from code review

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

altough it doesnt matter, LESS lazy evals variables

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix label display on new issues (#13590)
silverwind [Tue, 17 Nov 2020 05:02:41 +0000 (06:02 +0100)]
Fix label display on new issues (#13590)

* Fix label display on new issues

PR #13570 broke label rendering for new issues and pulls because
missed the fact that the code was relying on the DOM elements being
toggled by JavaScript.

On top of that, the label rendering for new issues and pull was using
an outdated template which I consolidated in a new shared template.

* remove wrapper element and style tweaks

* style tweaks

* use shared template for whole label list

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoChange markdown font weight to 600 (#13584)
silverwind [Tue, 17 Nov 2020 03:33:18 +0000 (04:33 +0100)]
Change markdown font weight to 600 (#13584)

Previously it was reduced globally from 700 to 500 but it actually needs
to be 600 to match GitHub's rendering.

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>