Commit graph

7392 commits

Author SHA1 Message Date
GiteaBot
4ad65bb89b [skip ci] Updated translations via Crowdin 2019-04-11 20:21:44 +00:00
silverwind
dc52868e1e Minor CSS cleanup for the navbar (#6553)
* Minor CSS cleanup for the navbar
* move height fix to navbar
2019-04-11 21:19:43 +01:00
zeripath
c02c6a144f Fix race in integration testlogger (#6556)
* Fix race in logger

* At testing end drop the reference to the last test.
2019-04-11 19:49:49 +08:00
GiteaBot
346036d47f [skip ci] Updated translations via Crowdin 2019-04-11 08:35:26 +00:00
Matthias Beckert
5348573fdf Allow admin users to set a repositoires visibility to public, even if FORCE_PRIVATE is to true (#6541) (#6572)
Signed-off-by: Matthias Beckert <beckert.matthias@googlemail.com>
2019-04-11 16:32:42 +08:00
0x5c
66fa092cc8 [FIX] Docs: Backup&Restore: fixed rendering + minor fixes (#6569)
- Fixed a code block inverting the code blocks of the rest of the page
- Fixed various markdown syntax errors
- Fixed some spelling I could notice

Signed-off-by: 0x5c <0x5c.dev@gmail.com>
2019-04-10 09:34:44 -04:00
Richard Mahn
2664adf677 Fixes #6514 - New Pull Request on files and pulls pages the same (#6515)
* Fixes #6514 - New Pull Request on files and pulls pages the same
2019-04-09 22:16:29 +01:00
zeripath
89cc7c646d
Prevent server 500 on compare branches with no common history (#6555)
* Prevent 500 if there is no common mergebase
* Prevent creation of PR with no history
2019-04-09 21:45:58 +01:00
mrsdizzie
7350e439bf Add myself to MAINTAINERS (#6554) 2019-04-09 15:42:20 -04:00
zeripath
0af0b078f9 wrap the ServerError and NotFound and log from the caller (#6550) 2019-04-09 21:10:42 +03:00
ngourdon
2b9b3310f6 Add username flag in create-user command (#6534)
* Add username flag in create-user command

* Fix the error message

* Change name to username on flag of create-user command

* Include create-user flags of both versions

* delete deprecated example of create-user command
2019-04-09 11:21:55 -04:00
silverwind
8e949db3b5 Render SHA1 links as code blocks (#6546) 2019-04-09 06:18:48 +03:00
Alexandros Nicolaides
61b85990a6 Added docker example for backup (#5846)
* Added docker example for backup

* Fix using docker command example

* Clarify --tempdir as per @lafriks suggestion
2019-04-08 15:45:29 +03:00
Lunny Xiao
e7d7dcb090 Issue indexer queue redis support (#6218)
* add redis queue

* finished indexer redis queue

* add redis vendor

* fix vet

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

Co-Authored-By: lunny <xiaolunwen@gmail.com>

* switch to go mod

* Update required changes for new logging func signatures
2019-04-08 12:05:15 +03:00
Mario Lubenka
6e4af4985e Fixes pagination width on mobile view (#5711) (#6532)
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
2019-04-08 09:31:54 +03:00
John Olheiser
aa02463ded Delete local branch if it exists (#6497)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-04-08 08:08:02 +03:00
Vasek Sraier
49b2f45f75 Cleaned permission checks for API -> site admin can now do anything (#6483)
* cleaned permission checks for API -> site admin can now do anything

Signed-off-by: Vasek Sraier <git@vakabus.cz>

* PR #6483: helper methods moved to context/context.go, added missing return

Signed-off-by: Vasek Sraier <git@vakabus.cz>

* PR #6483: added documentation to new exported helper functions in context/context.go

Signed-off-by: Vasek Sraier <git@vakabus.cz>
2019-04-08 01:49:34 +03:00
ngourdon
592e6c398e Fixes #6446 - Sort team members and team's repositories (#6525)
* sort team's repositories by name

* sort team members by display name
2019-04-07 14:44:34 +01:00
mrsdizzie
6293736d02 Use stricter boundaries for auto-link detection (#6522)
* Use stricter boundaries for auto-link detection

Currently autolinks use \W for boundary detection which creates many
situations of inserting links into places they don't belong (paths,
URLs, UUIDs, etc...)

This fixes that by replacing \W and only allowing these matches to touch
an open paren or bracket (matching what seems to be Github behavior) in
addition to whitespace and start of line. Similar for ending boundary as
well.

Fixes #6149
(and probably others)

* Update test

Replace incorrect test with a value that is a valid username, based on:

"Username should contain only alphanumeric, dash ('-'), underscore ('_')
and dot ('.') characters."

* Also allow for period at the end

Matching Github behavior

* Fix email regex to work properly with specificed boundaries

Create a specific capture group for email address and then use
FindStringSubmatchIndex to allow for non-matching patterns as
boundaries.

* Add Tests

Add tests for new behavior -- including tests for email addresses which
were absent before.
2019-04-07 12:18:16 +01:00
zeripath
5422f23ed8 Quieter Integration Tests (#6513)
* Rename BaseLogger to WriterLogger to help the creation of other providers

* Don't export ColorBytes and ResetBytes from ColoredValues

* Make integration tests only print logs if they fail

* check can color before coloring

* I always forget about MSSQL

* Oh and use LEVEL in sqlite.ini

* Make the test logger log at info - as it means you see the router

* Remove empty expected changes

* Make the migrations quieter too

* Don't display SQL on error - it can be looked at in the file logs if necessary

* Fix skip when using onGiteaRun
2019-04-07 03:25:14 +03:00
silverwind
7ed65a98e8 UI: Use regular line-height on frontpage entries (#6518) 2019-04-06 19:20:16 -04:00
GiteaBot
d1b8840bd8 [skip ci] Updated translations via Crowdin 2019-04-06 18:30:54 +00:00
silverwind
2242a9f82e Improve SHA1 link detection (#6526)
This improves the SHA1 link detection to not pick up extraneous
non-whitespace characters at the end of the URL. The '.' is a special
case handled in code itself because of missing regexp lookahead
support.

Regex test cases: https://regex101.com/r/xUMlqh/3
2019-04-06 21:28:45 +03:00
mrsdizzie
0bdd81df9d Properly escape release attachment URL (#6512)
Make sure file attachments on a release get a properly escaped URL when
linking.

Fixes #6506
2019-04-05 11:28:10 -04:00
John Olheiser
9bf20f47c4 Enabled emoji in Hugo (#6521)
Removed extra asterisks in Docker doc

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-04-05 18:01:38 +03:00
mrsdizzie
e14cad79c9 Include custom configuration file in dump (#6516)
When running the dump command, include the specific configuration file
provided as part of the backup. Currently we only zip up custom/ and this
misses the config file if it is somewhere else, like /etc/gitea/app.ini

Fixes #6034
2019-04-05 09:24:28 -04:00
Mura Li
d8802b1298 Add a new Make target for running single integration test (#6500)
* Add a new Make target for running single integration test

* Use # instead of - as the delimiter
2019-04-04 12:22:10 -04:00
nodiscc
0f54f42646 docs: document setup with read-only config (#6348) 2019-04-04 10:21:54 -04:00
zeripath
059b52759e
Some logging documentation (#6498) 2019-04-04 09:44:01 +01:00
GiteaBot
8fcbfa7df9 [skip ci] Updated translations via Crowdin 2019-04-04 07:55:02 +00:00
mrsdizzie
04003d9dc7 Make distinction between DisplayName and Username in email templates (#6495)
* Make distinction between DisplayName and Username in email templates

Store the actual username in the variable named Username and store the
separate DisplayName in another variable. This allows us to access the
actual username when we need, which currently fails if a user has set a
full name.

Fixes #6161

* Use u.Name directly

No need for extra function, also change use in all mail sending
functions here

* Don't include Username when not used
2019-04-04 10:52:48 +03:00
Jakob Ackermann
3f4e2d9d37 [docker] drop the bits argument when generating an ed25519 key (#6504)
From the man page of ssh-keygen:

  Ed25519 keys have a fixed length and the -b flag will be ignored.

[skip ci]

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-04-04 08:09:38 +03:00
Elias Norberg
bf5af87eef Show last commit status in pull request lists (#6465) 2019-04-02 15:54:29 -04:00
Lunny Xiao
09fb036ad6 fix upload attachments (#6481)
* fix upload attachments

* add migration for new column uploader_id on table attachment

* fix imports sequence
2019-04-02 15:25:05 -04:00
Lunny Xiao
0a8e63c682 add make version on gitea version (#6485) 2019-04-02 12:10:11 -04:00
GiteaBot
60ba903a57 [skip ci] Updated translations via Crowdin 2019-04-02 15:48:05 +00:00
mrsdizzie
54c1cb6c5f Add X-Auto-Response-Suppress header to outgoing messages (#6492)
This is a header used to suggest mail servers not to respond to a message
with an auto-responder:

 https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcmail/ced68690-498a-4567-9d14-5c01f974d8b1

This header is also used by github and gitlab in outgoing messages.

Fixes #6484
2019-04-02 11:45:54 -04:00
zeripath
704da08fdc
Better logging (#6038) (#6095)
* Panic don't fatal on create new logger

Fixes #5854

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

* partial broken

* Update the logging infrastrcture

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

* Reset the skip levels for Fatal and Error

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

* broken ncsa

* More log.Error fixes

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

* Remove nal

* set log-levels to lowercase

* Make console_test test all levels

* switch to lowercased levels

* OK now working

* Fix vetting issues

* Fix lint

* Fix tests

* change default logging to match current gitea

* Improve log testing

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

* reset error skip levels to 0

* Update documentation and access logger configuration

* Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE

* Fix broken level caching

* Refactor the router log

* Add Router logger

* Add colorizing options

* Adjust router colors

* Only create logger if they will be used

* update app.ini.sample

* rename Attribute ColorAttribute

* Change from white to green for function

* Set fatal/error levels

* Restore initial trace logger

* Fix Trace arguments in modules/auth/auth.go

* Properly handle XORMLogger

* Improve admin/config page

* fix fmt

* Add auto-compression of old logs

* Update error log levels

* Remove the unnecessary skip argument from Error, Fatal and Critical

* Add stacktrace support

* Fix tests

* Remove x/sync from vendors?

* Add stderr option to console logger

* Use filepath.ToSlash to protect against Windows in tests

* Remove prefixed underscores from names in colors.go

* Remove not implemented database logger

This was removed from Gogs on 4 Mar 2016 but left in the configuration
since then.

* Ensure that log paths are relative to ROOT_PATH

* use path.Join

* rename jsonConfig to logConfig

* Rename "config" to "jsonConfig" to make it clearer

* Requested changes

* Requested changes: XormLogger

* Try to color the windows terminal

If successful default to colorizing the console logs

* fixup

* Colorize initially too

* update vendor

* Colorize logs on default and remove if this is not a colorizing logger

* Fix documentation

* fix test

* Use go-isatty to detect if on windows we are on msys or cygwin

* Fix spelling mistake

* Add missing vendors

* More changes

* Rationalise the ANSI writer protection

* Adjust colors on advice from @0x5c

* Make Flags a comma separated list

* Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING

* Ensure matching is done on the non-colored message - to simpify EXPRESSION
2019-04-02 08:48:31 +01:00
Lunny Xiao
ef2a343e27 fix bug when user login and want to resend register confirmation email (#6482) 2019-04-02 08:44:33 +03:00
John Olheiser
b04a1d9d63 Add ui class to sub_menu to fix style in arc-green (#6477)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-04-02 08:41:19 +08:00
GiteaBot
5c4b96188c [skip ci] Updated translations via Crowdin 2019-04-01 15:30:21 +00:00
Richard Mahn
4e3ce71ac9 Fies #6468 - Uses space match and adds newline for all sed flavors (#6473) 2019-04-01 23:27:40 +08:00
glaszig
dbba46c216 support custom file name in gitea dump command (#6474)
* support custom file name in `gitea dump` command

* simpler approach to handle default dump file name
in `gitea dump` command
2019-04-01 00:31:37 -04:00
BetaCat
2e1ead8054 fix: avoid multi-clicks when perform oauth2 login (#6467) 2019-03-31 19:58:53 +08:00
zeripath
04d78b60f8 Fix link to Hacking on Gitea on From-Source doc page (#6471)
* fix rel-ref

* fixup
2019-03-30 12:15:16 -04:00
Ilya
8c3082bdb4 fix typos in docs command-line examples (#6466)
Signed-off-by: Ilya Pavlov <ilux@cpan.org>
2019-03-29 12:16:07 +00:00
GiteaBot
01589b9eed [skip ci] Updated translations via Crowdin 2019-03-28 18:42:28 +00:00
zeripath
5e23c33d9e Hacky fix for alignment of the create-organization dialog (#6455)
* Hacky fix for alignment of the create-organization dialog

* Mangle the post-scripted red-asterisk back in to follow the Visibility Header
2019-03-28 20:36:17 +02:00
oscar.lofwenhamn
2019983e77 Make "Ghost" not link to 404 page (#6410)
* Make Ghost not link to 404 page

* Make correct localization label show

* Create and use GetLastEventLabelFake for when a Ghost user has made the action, thus not linking to a user profile
* Add corresponding _fake entries to locale_en-US

* Make Ghost avatar not link to 404 page

* Make Ghost on milestone_issues not link to 404 page
2019-03-27 18:22:39 -04:00
John Olheiser
ee0d3eeadc Changelogs 1.7.5 & 1.8.0-rc2 (#6453)
* Changelog 1.8.0 rc2 (#6451)

* Changelog 1.7.5 (#6444) (#6448)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-03-27 21:57:36 +02:00