7488 Commits (1dc401635b8acb20f4222216ad0828ef39617989)
 

Author SHA1 Message Date
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>
5 years ago
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>
5 years ago
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
5 years ago
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
5 years ago
mrsdizzie 7350e439bf Add myself to MAINTAINERS (#6554) 5 years ago
zeripath 0af0b078f9 wrap the ServerError and NotFound and log from the caller (#6550) 5 years ago
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
5 years ago
silverwind 8e949db3b5 Render SHA1 links as code blocks (#6546) 5 years ago
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
5 years ago
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
5 years ago
Mario Lubenka 6e4af4985e Fixes pagination width on mobile view (#5711) (#6532)
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
5 years ago
John Olheiser aa02463ded Delete local branch if it exists (#6497)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
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>
5 years ago
ngourdon 592e6c398e Fixes #6446 - Sort team members and team's repositories (#6525)
* sort team's repositories by name

* sort team members by display name
5 years ago
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.
5 years ago
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
5 years ago
silverwind 7ed65a98e8 UI: Use regular line-height on frontpage entries (#6518) 5 years ago
GiteaBot d1b8840bd8 [skip ci] Updated translations via Crowdin 5 years ago
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
5 years ago
mrsdizzie 0bdd81df9d Properly escape release attachment URL (#6512)
Make sure file attachments on a release get a properly escaped URL when
linking.

Fixes #6506
5 years ago
John Olheiser 9bf20f47c4 Enabled emoji in Hugo (#6521)
Removed extra asterisks in Docker doc

Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
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
5 years ago
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
5 years ago
nodiscc 0f54f42646 docs: document setup with read-only config (#6348) 5 years ago
zeripath 059b52759e
Some logging documentation (#6498) 5 years ago
GiteaBot 8fcbfa7df9 [skip ci] Updated translations via Crowdin 5 years ago
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
5 years ago
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>
5 years ago
Elias Norberg bf5af87eef Show last commit status in pull request lists (#6465) 5 years ago
Lunny Xiao 09fb036ad6 fix upload attachments (#6481)
* fix upload attachments

* add migration for new column uploader_id on table attachment

* fix imports sequence
5 years ago
Lunny Xiao 0a8e63c682 add make version on gitea version (#6485) 5 years ago
GiteaBot 60ba903a57 [skip ci] Updated translations via Crowdin 5 years ago
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
5 years ago
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
5 years ago
Lunny Xiao ef2a343e27 fix bug when user login and want to resend register confirmation email (#6482) 5 years ago
John Olheiser b04a1d9d63 Add ui class to sub_menu to fix style in arc-green (#6477)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
GiteaBot 5c4b96188c [skip ci] Updated translations via Crowdin 5 years ago
Richard Mahn 4e3ce71ac9 Fies #6468 - Uses space match and adds newline for all sed flavors (#6473) 5 years ago
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
5 years ago
BetaCat 2e1ead8054 fix: avoid multi-clicks when perform oauth2 login (#6467) 5 years ago
zeripath 04d78b60f8 Fix link to Hacking on Gitea on From-Source doc page (#6471)
* fix rel-ref

* fixup
5 years ago
Ilya 8c3082bdb4 fix typos in docs command-line examples (#6466)
Signed-off-by: Ilya Pavlov <ilux@cpan.org>
5 years ago
GiteaBot 01589b9eed [skip ci] Updated translations via Crowdin 5 years ago
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
5 years ago
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
5 years ago
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>
5 years ago
mrsdizzie c8650aef0a Change order that PostProcess Processors are run (#6445)
Make sure Processors that work on full links are run first so that
something matching another pattern doesn't alter a link before we get to
it, for example:

 https://stackoverflow.com/questions/2896191/what-is-go-used-fore

Fixes #4813
5 years ago
Mura Li d77176912b Use Go1.11 module (#5743)
* Migrate to go modules

* make vendor

* Update mvdan.cc/xurls

* make vendor

* Update code.gitea.io/git

* make fmt-check

* Update github.com/go-sql-driver/mysql

* make vendor
5 years ago
Lunny Xiao d578b71d61
move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)
* move code.gitea.io/git to code.gitea.io/gitea/modules/git

* fix imports

* fix fmt

* fix misspell

* remove wrong tests data

* fix unit tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* enable Debug to trace the failure tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* comment commit count tests since git clone depth is 50

* fix tests

* update from code.gitea.io/git

* revert change to makefile
5 years ago
mrsdizzie d056bf300f Clean up ref name rules (#6437)
* Clean up ref name rules

Clean up checks on reference names to better conform to the guideline
here: https://git-scm.com/docs/git-check-ref-format

This fixes half of #6321

* Update branch create integration test

According to: https://git-scm.com/docs/git-check-ref-format

And: git check-ref-format "master/feature=test1"

This is a valid branch name and we should not be testing for it to fail.
5 years ago