1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-02 01:15:48 +00:00
Commit Graph

9228 Commits

Author SHA1 Message Date
GiteaBot
29ed07ee02 [skip ci] Updated translations via Crowdin 2020-03-29 19:53:00 +00:00
zeripath
d01763ee14
Protect against NPEs in notifications list (#10879)
Unfortunately there appears to be potential race with notifications
being set before the associated issue has been committed.

This PR adds protection in to the notifications list to log any failures
and remove these notifications from the display.

References #10815 - and prevents the panic but does not completely fix
this.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-03-29 20:51:14 +01:00
zeripath
20d4f9206d
Change the order of issues.closed_by to list opening user first (#10876)
Fix #8266

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-03-29 13:09:23 -03:00
zeripath
209045f55b
Slight simplification of accessibleRepositoryCondition (#10875)
* Slight simplification of accessibleRepositoryCondition

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-03-29 15:31:10 +01:00
silverwind
ad4026431b
Add 'make lint', restructure 'compliance' pipeline (#10861)
- Added 'lint', 'lint-frontend', 'lint-backend' targets
- Added 'lint-frontend', 'lint-backend' ci steps and restructure the
  'compliance' pipeline to have a clear separation between frontend and
  backend and use parallelism where possible. Also, the main build
  pipelines now depend on 'compliance' so they will skip if it fails.
- Added dependencies on ci steps so they skip when 'compliance' fails
- Moved JS linters to devDependencies
- Removed deprecated 'js' and 'css' targets
2020-03-29 12:56:58 +01:00
John Olheiser
3f0cb8b33a
Remove test from installation directions (#10873)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-03-29 11:07:40 +01:00
zeripath
e83daf77ad
Avoid logging []byte in queue failures - convert to string first (#10865)
Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-03-29 15:12:15 +08:00
Lunny Xiao
61f603cd8a
Create a new function to build search repository condition (#10858)
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-03-29 02:27:06 -03:00
zeripath
48890ce546
Allow site admin to check /api/v1/orgs endpoints (#10867)
Fix #9950

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-03-28 19:45:55 +00:00
zeripath
052bff0cff
Convert plumbing.ErrObjectNotFound to git.ErrNotExist in getCommit (#10862)
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-03-28 20:59:21 +02:00
zeripath
ea67e563dd
Use ErrKeyUnableToVerify if fail to calc fingerprint in ssh-keygen (#10863)
* Use ErrKeyUnableToVerify if fail to calc fingerprint in ssh-keygen

Fix #3985

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

* Pass up the unable to verify
2020-03-28 19:24:55 +02:00
赵智超
f9f2c163b1
bug: fix assignees double load bug (#10856)
Because the assigness has been loaded in

compare.go 416:
    RetrieveRepoMetas(ctx, ctx.Repo.Repository, true)
then
issue.go 381
	RetrieveRepoMilestonesAndAssignees(ctx, repo)
then

issue.go 361 -- 365 , they are load assignees

So the code on compare.go 425 -- 427 is double work,
and which is the reason of #10853

Signed-off-by: a1012112796 <1012112796@qq.com>
2020-03-28 14:22:52 +00:00
S7evinK
828a27feeb
Add Matrix webhook (#10831)
* Add Matrix webhook

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Add template and related translations for Matrix hook

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Add actual webhook routes and form

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Add missing file

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Update modules/webhook/matrix_test.go

* Use stricter regex to replace URLs

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Escape url and text

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Remove unnecessary whitespace

* Fix copy and paste mistake

Co-Authored-By: Tulir Asokan <tulir@maunium.net>

* Fix indention inconsistency

* Use Authorization header instead of url parameter

* Add raw commit information to webhook

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Tulir Asokan <tulir@maunium.net>
2020-03-28 15:09:55 +02:00
zeripath
7cd47046ea
Handle push rejection in branch and upload (#10854)
* Handle push rejections and push out-of-date in branch creation and
file upload.
* Remove the duplicated sanitize from services/pull/merge
* Move the errors Err(Merge)PushOutOfDate and ErrPushRejected to
modules/git
* Handle errors better in the upload file dialogs

Fix #10460

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-03-28 01:13:18 -03:00
Bagas Sanjaya
cac30abefc
[Docs] Config Cheat Sheet: SSL_MODE Value Description (#10834)
* Add description of SSL_MODE values

* Apply suggestions from @guillep2k

Rewording suggestions

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-03-28 00:24:12 -03:00
GiteaBot
7e8ced07b3 [skip ci] Updated translations via Crowdin 2020-03-27 21:28:54 +00:00
zeripath
1737fca220
make gitea admin auth list formatting configurable (#10844)
* make admin auth list formatting configurable

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

* As per @guillep2k

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-03-27 22:26:43 +01:00
Success Go
8cffae65a6
Fix typo of MSSQL (#10850) 2020-03-27 16:12:39 +02:00
zeripath
e6baa656f7
make avatar lookup occur at image request (#10540)
speed up page generation by making avatar lookup occur at the browser
not at page generation

* Protect against evil email address ".."

* hash the complete email address

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

Co-Authored-By: Lauris BH <lauris@nix.lv>
2020-03-27 14:34:39 +02:00
Lauris BH
a3f90948d8
Set MySQL rowtype to dynamic for new tables (#10833)
* Set mysql rowtype to dynamic for new tables

* Update models.go
2020-03-27 10:44:05 +02:00
zeripath
453f6e6e5a
In authorized_keys use double-quote for windows compatibility (#10841)
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-03-27 09:49:39 +02:00
zeripath
cf4f2cfa3e
Fix internal server error on checkboxes (#10845)
Annoyingly goldmarks SetAttributeString requires that
the value of the attribute is still a []byte but does
not make it clear in the documentation.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-03-26 23:47:34 +00:00
Lauris BH
bbd910ed1b
Allow to set protected file patterns that can not be changed under no conditions (#10806)
Co-Authored-By: zeripath <art27@cantab.net>
2020-03-27 00:26:34 +02:00
zeripath
52cfd2743c
Option to set default branch at repository creation (#10803)
* Option to set default branch at repository creation
* Handle template repos with non-default master branch
* Add DefaultBranch handling on creation to API

Fix #9542

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-03-26 19:14:51 +00:00
silverwind
b1c331c845
Fix repo summary height (#10825)
Extracted the style that keeps the animation of the language bar in
check.

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-03-25 22:58:25 +00:00
Stefan Bethke
e72c5cb02a
Simplify grep regexp to be more compatible (#10765)
* Simplify grep regexp to be more compatible

The new expression also works with the BSD implementation of grep. Also,
I believe the expression did not work consistently for all possible
version numers, for example a two digit patch version would not have
been matched.

* Fix quote

* Allow for two and three part version numbers

* Select one, two and three part version numbers, reject amd64

* Also allow one to three parts for node version

* Use JS code to print node verion in correct format

* Avoid grep altogether

* Handle go1.14beta1 as well.

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
2020-03-26 00:21:33 +02:00
John Olheiser
ad6f2323b7
Fix milestone template (#10824)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-03-25 18:08:00 +01:00
Lunny Xiao
73f5ca70de
Upgrade xorm to v1.0.1 and fix start fail with potgres (#10819)
* upgrade xorm to v1.0.1

* fix start fail with postgres

Co-authored-by: zeripath <art27@cantab.net>
2020-03-25 16:32:23 +02:00
GiteaBot
b10cb7b258 [skip ci] Updated translations via Crowdin 2020-03-25 13:34:32 +00:00
Alexander Scheel
61830ace0b
Fix tab indentation in code view (#10671)
Resolves: #5596

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-03-25 13:33:03 +00:00
zeripath
311ed516ce
log.Fatal on failure to listen to SSH port (#10795)
Fix #10792
2020-03-23 07:59:38 +00:00
zeripath
f036de5a94
Completely fix task-list checkbox styling (#10798)
Continuing on from #10668 this PR makes goldmark apply the task-list styling to task-lists.
2020-03-22 22:25:38 +00:00
Lunny Xiao
c61b902538
Upgrade xorm to v1.0.0 (#10646)
* Upgrade xorm to v1.0.0

* small nit

* Fix tests

* Update xorm

* Update xorm

* fix go.sum

* fix test

* Fix bug when dump

* Fix bug

* update xorm to latest

* Fix migration test

* update xorm to latest

* Fix import order

* Use xorm tag
2020-03-22 11:12:55 -04:00
Lunny Xiao
dcaa5643d7
Fix branch api canPush and canMerge (#10776)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-03-20 23:41:33 -04:00
zeripath
b3f4f812d8
account for empty lines in receive-hook message (#10773)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2020-03-20 20:21:28 +02:00
techknowlogick
2fa1078911
go 1.14 (#10467) 2020-03-20 10:29:31 -04:00
Lauris BH
e5a008f7b2
Add nowrap to language bar items (#10755) 2020-03-20 10:10:02 +08:00
John Olheiser
7225453d5f
Update Gitea version in docs (#10772) 2020-03-19 16:05:19 -04:00
Lunny Xiao
83fe7d414e
Fix bug on branch API (#10767) 2020-03-19 11:39:08 -04:00
silverwind
661289d480
Move JS build dependencies to 'dependencies' (#10763)
- move all JS build dependencies to 'dependencies'
- update all JS dependencies

Reason for this is that npm will only install 'dependencies' when under
the effect of NODE_ENV=production which may be present on some build
systems.

Linters currently need to be depdendencies because we run linting as
part of the build step, but I plan to move them to a separate 'lint'
target which means they can move to devDependencies then.

Fixes: https://github.com/go-gitea/gitea/pull/10761
2020-03-19 10:45:23 +08:00
Simon Legner
a2809b391d
doc(authentication.en-us): remove superflous line (#10758) 2020-03-18 09:52:51 -05:00
silverwind
ed5140d235
disable webpack's size warnings (#10746)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-03-17 18:57:17 -04:00
silverwind
85fb33a65f
move jquery-datetimepicker to npm/webpack (#10713)
- update to latest version and move to npm
- adapt for api changes and css class rename
- add specificity to arc-green rules as dependency css now loads later
- use imports-loader to make it load correctly
- fix some wrong paths in librejs

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-03-17 15:08:15 -04:00
Lauris BH
43c09134a9
Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
赵智超
2f928316db
hide gear icon for user who can't use them on sidebar (#10750)
reason:
If user can't choose the Assignees labels and Milestone It's
not usefull to show a gear label , and it It will mislead the
user into thinking that it's a BUG rather than thy don't have
permission to chosse them.

Signed-off-by: a1012112796 <1012112796@qq.com>
2020-03-17 12:19:03 -04:00
Lauris BH
ca181100ca
FIx hiding of fields in authorization source page (#10734) 2020-03-17 10:12:44 +02:00
guillep2k
10e8da1f1a
Change PACKAGES to GO_PACKAGES for FreeBSD compatibility (#10747)
Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
2020-03-17 07:37:10 +02:00
John Olheiser
c7f3d1627f
Prevent default for linkAction (#10742)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-03-16 16:13:41 -05:00
赵智超
19ebe2b956
misc: change the "taskName" to "label" in vscode tasks.json (#10739)
because of vscode suggest
ref ISSUE: Microsoft/vscode-docs#1181

Signed-off-by: a1012112796 <1012112796@qq.com>
2020-03-16 18:46:26 +02:00
Lunny Xiao
cf7ece6245
Fix queue log param (#10733) 2020-03-16 16:59:21 +08:00