Commit Graph

9703 Commits

Author SHA1 Message Date
silverwind 2447ffc74a
Disable all typographic replacements in markdown renderer (#11871)
* Disable all typographic replacements in markdown renderer

Previously we only disabled some of them. This disables all the default
replacements that goldmark's typographer extension offers, matching
GitHub's renderer.

Ref: https://github.com/yuin/goldmark#typographer-extension
Fixes: https://github.com/go-gitea/gitea/issues/11001

* remove typographer extension completely

* fix test

* really fix test

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-13 02:10:17 -04:00
Cirno the Strongest b6adf80a80
Fix repo internal icon when avatar is present (#11873)
* Fix repo internal icon when avatar is present

* fix tabs

* move repo icons in header to separate template
2020-06-13 00:24:41 +03:00
GiteaBot 83e9ac57a1 [skip ci] Updated translations via Crowdin 2020-06-12 18:03:15 +00:00
mrsdizzie d729d685d0
Fix 500 error on repos with no tags (#11870)
#11846 Introduced feature to show exact tag on commit view. However if a repo has no tags at all git prints out a separate and unhandled error " No names found, cannot describe anything."

 Adding --always to the command makes it always use the error in the style of "fatal: no tag exactly matches" even if there are no tags at all.

 Fixes #11869
 Fixes #11868
2020-06-12 14:02:14 -04:00
silverwind bc4f7ba69b
Add automatic JS license generation (#11810)
* Add automatic JS license generation

Removed librejs file and replaced it with a plaintext file that is built
from all JS dependencies that are included in the webpack build. It does
not cover the few remaining statically vendored files and fomantic is
added manually because it's not yet in the webpack build process.

Fixes: https://github.com/go-gitea/gitea/issues/11630

* fix lint

* remove jslicense, we're not librejs compatible any more

* remove license.txt test as it depens on absent files

* small optimization

* trailing comma

* localize and capitalize the word 'licenses'

* reduce text to just 'Licenses'

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-12 14:26:37 +03:00
mrsdizzie 2b573f49cf
Fix nil pointer in default issue mail template (#11862)
* Fix nil pointer in default issue mail template

Fix: template: issue/default:20:17: executing "issue/default" at <.Comment.Type>: nil pointer evaluating interface {}.Type

Introduced in #11167

* another one

Co-authored-by: zeripath <art27@cantab.net>
2020-06-12 11:56:31 +03:00
GiteaBot 13fcd04fe4 [skip ci] Updated translations via Crowdin 2020-06-12 03:35:58 +00:00
Cirno the Strongest 8770bceafa
Fix search form button overlap (#11840)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-11 23:35:03 -04:00
zeripath 0973c03601
Handle more pathological branch and tag names (#11843)
* Handle more pathological branch and tag names

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

* Fix failing test

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-11 19:49:47 -04:00
GiteaBot 6c2a59b50c [skip ci] Updated translations via Crowdin 2020-06-11 21:45:34 +00:00
Cirno the Strongest 5a26192350
Fix commit search in all branches (#11849)
* Fix commit search in all branches

* comments

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-11 17:44:39 -04:00
silverwind ca8ecf7ffc
Improve label edit buttons labels (#11841)
* Improve label edit buttons labels

Previously when editing the buttons in the "Edit Label" modal were a
strange "Update" and "No". Improved them to "Save" and "Cancel".

Also fixed indentation in the template file, recommended to view changes
with the "Hide whitespace changes" option enabled on GitHub.

* remove unnecessary button icon

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-11 17:06:20 -04:00
zeripath b9e281265e
Add migration to set IsArchived false if it is null (#11853)
* Add migration to set IsArchived false if it is null

Fix #11824

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

* Add doctor

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-11 16:18:11 -04:00
Cirno the Strongest b682a2c1b2
Show exact tag for commit on diff view (#11846)
* Show exact tag for commit on diff view

* Fix comment

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-11 15:42:55 -04:00
Girish Ramakrishnan e282fbe753
cloudron: update link to demo (#11857) 2020-06-11 14:38:26 -04:00
zeripath 9ecf732abc
Prevent panic on empty HOST for mysql (#11850)
Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-06-11 12:47:55 -04:00
Gernot Eger a3fe9d87f2
Set the base url when migrating from Gitlab using access token or username without password (#11852)
When migrating from gitlab, set the baseUrl in NewGitlabDownloader when using an access token or username without password

Fix #11851
2020-06-11 16:41:01 +01:00
silverwind c99ae4cff4
Update JS dependencies (#11842)
Result of `make npm-update`, no noteworthy changes.
2020-06-11 12:02:24 +01:00
Cirno the Strongest 4a4977a1f0
Don't consider tag refs as valid for branch name (#11847)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-10 19:00:39 -04:00
silverwind a05a30c1c1
Don't add same line code comment box twice (#11837)
* Don't add same line code comment box twice

Clicking the same '+' button multiple times adds multiple comment boxes
to the same line. Prevent this by assigning a unique key to each comment
box and checking if it already exists in the DOM.

Also cleaned up the code around this a bit.

* Update web_src/js/index.js

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

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-10 18:16:35 -04:00
zeripath 8ffc0ed13f
Re-center the cog on the center of the lock (#11844)
Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-10 17:01:03 -04:00
silverwind 628ee1d82e
Replace jquery-datetimepicker with native date input (#11684)
This removes the jQuery plugin as well as the associated config options.
Native input[type=date] does not require a language attribute as it is
localized by default, except for the placeholder attribute for which I
currently piggy-back the repo.issues.due_date_form localization option.

Implementation should pretty much match GH. Of note is that Safari does
not provide a UI for this input type, but I don't think providing one is
neccessary and GH did not bother either.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-10 14:35:27 -04:00
Cirno the Strongest 42752f3902
Fix inserting excerpt on compare diff (#11833)
* Fix inserting excerpt on compare diff

* use currentTarget

* remove comment

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-10 13:42:14 -04:00
Cirno the Strongest 2b2b3e4c37
Use DEFAULT_PAGING_NUM instead of MAX_RESPONSE_ITEMS in ListOptions (#11831)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-10 12:23:22 -04:00
赵智超 ac2304f7a0
fix a small nit (#11834)
As title, run this line in one time is enough.

Signed-off-by: a1012112796 <1012112796@qq.com>
2020-06-10 11:26:28 -04:00
GiteaBot df231b7255 [skip ci] Updated translations via Crowdin 2020-06-10 12:06:44 +00:00
6543 68a2af6d68
API expose usefull General Repo settings settings (#11758)
* GeneralRepoSettings expose MirrorsDisabled, HTTPGitDisabled, MaxCreationLimit

* Apply suggestions from code review

Co-authored-by: proton <25139420+proton-ab@users.noreply.github.com>

* lint

Co-authored-by: proton <25139420+proton-ab@users.noreply.github.com>
2020-06-10 15:05:46 +03:00
6543 1ac46186ff
API allow to create closed milestones (#11745)
* API allow to create closed milestones

* set CloseDate too

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-09 18:01:36 -04:00
silverwind 19db3f4f0a
rework eslint config (#11615)
* rework eslint config

- use explicit config that only enables rules
- upgrade eslint to 7.1.0
- add new plugins with selected rules enabled
- fix discovered issues, remove global wipPrefixes

* remove if

* undo template change

* add disabled rules as well for easier config updating

* add missing disabled rule

* update eslint and plugins

* fix new violation

* remove deprecated rules

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-06-09 17:31:15 -04:00
6543 363e51d19c
Refactor: Remove Dependencys from Migration v112-v119 (#11811)
* v119

* v116

* v112
2020-06-09 16:34:05 -04:00
John Olheiser aaff47ad75
Fix reply octicon (#11821)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-06-09 10:13:00 -05:00
Cirno the Strongest 777015c2c2
Use crispEdges rendering for octicon-internal-repo (#11801)
* Use crispEdges rendering for octicon-internal-repo

* Update _svg.less

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-09 01:33:09 -04:00
Cirno the Strongest 27a6e03906
Remove page size limit comment from swagger (#11806)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-09 00:57:38 -04:00
Cirno the Strongest cefbf73aea
Honor DEFAULT_PAGING_NUM for API (#11805)
* Honor DEFAULT_PAGING_NUM for API

* set pagination to 10 for tests

* lint

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-08 22:46:51 -04:00
6543 5734524378
give gitea time to calculate language stats (#11812) 2020-06-08 20:15:45 -04:00
GiteaBot 218d922d33 [skip ci] Updated translations via Crowdin 2020-06-08 18:08:42 +00:00
zeripath 09f7d84f4c
Ensure rejected push to refs/pull/index/head fails nicely (#11724)
A pre-receive hook that rejects pushes to refs/pull/index/head
will cause a broken PR which causes an internal server error
whenever it is viewed. This PR handles prevents the internal server
error by handling non-existent pr heads and sends a flash error
informing the creator there was a problem.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-06-08 19:07:41 +01:00
6543 5814079bf5
Add option to API to update PullRequest base branch (#11666)
* EditPull: add option to change base

Close #11552
2020-06-07 20:13:40 +01:00
Cirno the Strongest 880ae454db
Work around fomantic 2.8.5 bugs (#11767)
Work around fomantic 2.8.5 bugs 

Closes #11759

Related fomantic/Fomantic-UI#1372 and fomantic/Fomantic-UI#1473
2020-06-07 19:25:52 +01:00
6543 479ef5c379
In File Create/Update API return 404 if Branch does not exist (#11791) 2020-06-07 18:30:58 +01:00
GiteaBot 3f3a081758 [skip ci] Updated translations via Crowdin 2020-06-07 15:24:09 +00:00
赵智超 ba8efe3547
Fix doer of rename repo (#11789)
fix #11725

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

Co-authored-by: zeripath <art27@cantab.net>
2020-06-07 18:23:13 +03:00
GiteaBot 1cc33c37ff [skip ci] Updated translations via Crowdin 2020-06-07 11:49:39 +00:00
Lauris BH 2874ab54bc
Add language statistics API endpoint (#11737)
* Add language statistics API

* Add tests
2020-06-07 14:48:41 +03:00
Cirno the Strongest 94f60e199b
Fix visibility of forked public repos from private orgs (#11717)
* Fix visibility of forked public repos from private orgs

* update forks visibility when org visibility is changed

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-06-06 20:45:12 -04:00
Cirno the Strongest 594db7fb43
Fix missing CGO_EXTRA_FLAGS build arg for docker (#11782)
Co-authored-by: zeripath <art27@cantab.net>
2020-06-06 17:42:32 -04:00
GiteaBot 304542af31 [skip ci] Updated translations via Crowdin 2020-06-06 20:31:10 +00:00
Cirno the Strongest f6315fb477
Fix align issues and decrease avatar size on PR timeline (#11689)
* Fix margin for referenced issue title

* Change avatar size to 20px, align referenced issue title to avatar

* better align
2020-06-06 21:30:10 +01:00
GiteaBot c8b1c4b10a [skip ci] Updated translations via Crowdin 2020-06-06 14:16:14 +00:00
zeripath 1ee6c13f11
Initialize SimpleMDE when making a code comment (#11749)
Fix #11704

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-Authored-By: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
2020-06-06 15:15:14 +01:00