Commit Graph
200 Commits
Author SHA1 Message Date
Lauris BHandLunny Xiao 7b3b295229 Add notice for awesome-gitea (#10612)
Signed-off-by: jolheiser <[email protected]>

Co-authored-by: Lunny Xiao <[email protected]>
2020-03-05 11:55:28 +02:00
guillep2k acd1034d5e Versions (#10597)
Signed-off-by: jolheiser <[email protected]>
2020-03-04 21:37:19 -03:00
9bd3c9a3c2 Add max-file-size to LFS (#10463)
* Add max-file-size to LFS

* Update modules/lfs/server.go

* As per @silverwind

Co-Authored-By: silverwind <[email protected]>

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: guillep2k <[email protected]>
2020-02-28 01:46:57 -03:00
Lauris BH cbcd76f395 Add detected file language to code search (#10256)
Move langauge detection to separate module to be more reusable

Add option to disable vendored file exclusion from file search

Allways show all language stats for search
2020-02-20 16:53:55 -03:00
John Olheiser 6922e8cfa4 Re-order GPG signing docs and fix code blocks (#10349)
* Move chunk and format

Signed-off-by: jolheiser <[email protected]>

* word

Signed-off-by: jolheiser <[email protected]>
2020-02-19 02:23:45 +01:00
Mike GerberandLunny Xiao 711e4528f4 Fix cron.repo_health_check schedule example in config cheat sheet (#10324)
Fixes #10274.

Co-authored-by: Lunny Xiao <[email protected]>
2020-02-17 22:14:11 -05:00
Lunny Xiao 5e8235352e Issue search support elasticsearch (#9428)
* Issue search support elasticsearch

* Fix lint

* Add indexer name on app.ini

* add a warnning on SearchIssuesByKeyword

* improve code
2020-02-13 14:06:17 +08:00
techknowlogick 1645730ca1 Add note about which version embedded tool is implemented (#10255) 2020-02-12 14:30:48 -05:00
zeripath 040f012239 Add Unique Queue infrastructure and move TestPullRequests to this (#9856)
* Upgrade levelqueue to version 0.2.0

This adds functionality for Unique Queues

* Add UniqueQueue interface and functions to create them

* Add UniqueQueue implementations

* Move TestPullRequests over to use UniqueQueue

* Reduce code duplication

* Add bytefifos

* Ensure invalid types are logged

* Fix close race in PersistableChannelQueue Shutdown
2020-02-02 23:19:58 +00:00
b78d4b0cb9 Implement "embedded" command to extract static resources (#9982)
* draft

* Implement extract command

* Fix nits and force args on extract

* Add !bindata stub, support Windows, fmt

* fix vendored flag

* Remove leading slash for matching

* Add docs

* Fix typos

* Add embedded view command

Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2020-02-02 10:17:44 +08:00
Lunny Xiao c1176c3a12 Cache last commit to accelerate the repository directory page visit (#10069)
* Cache last commit to accelerate the repository directory page visit

* Default use default cache configuration

* add tests for last commit cache

* Simplify last commit cache

* Revert Enabled back

* Change the last commit cache default ttl to 8760h

* Fix test
2020-02-01 19:11:32 +00:00
6543 265201a3ba update (#10079) 2020-01-31 07:01:32 +02:00
136b401252 Update documentation for the go module era (#9751)
* Update documentation for the go module era

use go env instead of $GOPATH

Update instructions to just use git clone

Slight update to readme

Signed-off-by: Andrew Thornton <[email protected]>

* fixup

* Apply suggestions from code review

Co-Authored-By: Antoine GIRARD <[email protected]>
Co-Authored-By: Bagas Sanjaya <[email protected]>

* Apply suggestions from code review

* Fix GOPATH settings

Co-authored-by: Antoine GIRARD <[email protected]>
Co-authored-by: Bagas Sanjaya <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-01-28 21:30:02 -05:00
silverwindandzeripath 231071663b move CSS build to webpack (#9983)
- added new 'make webpack' target
- deprecated 'make js' and 'make css'
- extend webpack config to load the less files
- updated docs

I had to rename the source file of `arc-green.less` to avoid generating
a useless JS entrypoint via webpack-fix-style-only-entries which would
not work with different source/destination filenames. I hear that there
should be cleaner solutions possible once we upgrade to Webpack 5.

Co-authored-by: zeripath <[email protected]>
2020-01-28 07:30:39 +00:00
zeripath 0827958b01 Make archive prefixing configurable with a global setting (#9943)
* Allow archive prefix setting

* Update copyright

* Update copyright
2020-01-22 23:46:46 +00:00
0cac758355 Add documentation how to render PlantUML in code blocks. (#9894)
* Add documentation how to render plantuml in code blocks.

* Review comments

* Apply suggestions from code review

Co-Authored-By: guillep2k <[email protected]>

Co-authored-by: guillep2k <[email protected]>
Co-authored-by: zeripath <[email protected]>
2020-01-21 00:34:23 +01:00
zeripathandLauris BH ed47bd2284 fix broken link (#9901)
Co-authored-by: Lauris BH <[email protected]>
2020-01-20 15:45:16 -05:00
zeripathandAntoine GIRARD f42be5e21b Add documentation to add Mermaid.js to Gitea (#9872)
* Add documentation to add mermaid to Gitea

* Update documentation

Co-authored-by: Antoine GIRARD <[email protected]>
2020-01-20 11:14:03 -05:00
6fc4b060bc Add support for database schema in PostgreSQL (#8819)
* Add support for database schema

* Require setting search_path for the db user

* Add schema setting to admin/config.tmpl

* Use a schema different from default for psql tests

* Update postgres scripts to use custom schema

* Update to xorm/core 0.7.3 and xorm/xorm c37aff9b3a

* Fix migration test

Co-authored-by: Antoine GIRARD <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2020-01-20 16:45:14 +01:00
zeripathandguillep2k 0c0302f9c1 Make CertFile and KeyFile relative to CustomPath (#9868)
* Make CertFile and KeyFile relative to CustomPath

The current code will absolute CertFile and KeyFile against the current working directory. This is quite unexpected for users. This code makes relative paths absolute against the CustomPath.

Fix #4196

* Improve error reporting when reading certificates

* Apply suggestions from code review

Co-Authored-By: guillep2k <[email protected]>

Co-authored-by: guillep2k <[email protected]>
2020-01-19 19:07:44 +00:00
6543 69b9040f17 [Docs] add usefull info to REQUIRE_SIGNIN_VIEW (#9848) 2020-01-17 18:34:55 -05:00
e0dcc1d390 Add Privacy Policy and Terms of Service Page (#9513)
* Add privacy policy page and link

* Add TOS page and link

* Add update date

* [Docs] Add customizing PP and TOS

* Separate h2 user-generated content with its paragraph

* Reimplement Privacy Policy

The document is inspired from GitHub.

* Refactor to contrib

* [Docs] Mention how to add legal pages

* Reimplement Terms of Service

Adapted from GitHub

* Update revision date

* Rename to mark as sample file

* Apply suggestion from @sapk

Co-Authored-By: Antoine GIRARD <[email protected]>

* Apply suggestion from @sapk

Use absolute link instead

Co-Authored-By: Antoine GIRARD <[email protected]>

* Apply suggestion from @zeripath

Change `Last Updated` element to `<h4>`

Co-Authored-By: zeripath <[email protected]>

* Apply suggestion from @zeripath

Close this `<li>` element instance

Co-Authored-By: zeripath <[email protected]>

* Apply suggestion from @zeripath

Intentionally grammar fix

Co-Authored-By: zeripath <[email protected]>

* Apply suggestion from @zeripath

Information grammar

Co-Authored-By: zeripath <[email protected]>

* Apply suggestion from @zeripath

Cannot guarantee absolute security...

Co-Authored-By: zeripath <[email protected]>

* Apply suggestion from @zeripath

Use `<h4>` element for last updated date

Co-Authored-By: zeripath <[email protected]>

* Apply suggestion from @zeripath

Remove trailing `</p>` at the end of API clause

Co-Authored-By: zeripath <[email protected]>

* Apply suggestion from @zeripath

Migrate privacy email domain to Your Gitea Instance

Co-Authored-By: zeripath <[email protected]>

* Apply suggestions from @zeripath

Remove `<p>` container for `<ol>` definitions

Co-Authored-By: zeripath <[email protected]>

* Apply suggestions from @zeripath

Remove `<p>` container that contain `<ol>` user-generated content

Co-Authored-By: zeripath <[email protected]>

* Apply suggestions from @zeripath

Remove `<p>` container for private repositories `<ol>` listing

Co-Authored-By: zeripath <[email protected]>

* Apply suggestions from @zeripath

Migrate remaining email domains to Your Gitea Instance

Co-Authored-By: zeripath <[email protected]>

* Apply suggestion from @zeripath

Offer support

Co-Authored-By: zeripath <[email protected]>

* Apply suggestion from @zeripath

Change "Your Gitea Instance" references to match your situation and Gitea project disclaimer

Co-Authored-By: zeripath <[email protected]>

* Reword transmission data to reflect hosting on third-party provider

* Reword Analytics clause to reflects that not all Gitea instances deploy analytics OOTB

* Remove `<p>` container from account terms

* Migrate support email on tos to your-gitea-instance

* Reword Tracking and Analytics clause for OOTB case

* [Docs] Append privacy.html to cp destination

* Apply suggestion from @6543

Create or append to footer template

Co-Authored-By: 6543 <[email protected]>

* Apply suggestion from myself

@6543 suggest replacing this `cp` line (which assumed that Gitea sources are available) with `wget` to GitHub raw link. At the time of writing this, this returned 404, but when this PR has been merged, this should get the actual page.

* Apply suggestions from @6543

1. Add gpg key to profile information
2. Add Git repos to list of User Personal Information
3. Comment out responsibility for sensitive information

Co-Authored-By: 6543 <[email protected]>

Co-authored-by: Antoine GIRARD <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: 6543 <[email protected]>
2020-01-14 14:34:40 +01:00
zeripathandAntoine GIRARD 8911e30db0 Make hook status printing configurable with delay (#9641)
* Delay printing hook statuses until after 1 second

* Move to a 5s delay, wrapped writer structure and add config

* Update cmd/hook.go

* Apply suggestions from code review

* Update cmd/hook.go

Co-authored-by: Antoine GIRARD <[email protected]>
2020-01-12 08:46:03 +00:00
8e5eb5162f Graceful Queues: Issue Indexing and Tasks (#9363)
* Queue: Add generic graceful queues with settings

* Queue & Setting: Add worker pool implementation

* Queue: Add worker settings

* Queue: Make resizing worker pools

* Queue: Add name variable to queues

* Queue: Add monitoring

* Queue: Improve logging

* Issues: Gracefulise the issues indexer

Remove the old now unused specific queues

* Task: Move to generic queue and gracefulise

* Issues: Standardise the issues indexer queue settings

* Fix test

* Queue: Allow Redis to connect to unix

* Prevent deadlock during early shutdown of issue indexer

* Add MaxWorker settings to queues

* Merge branch 'master' into graceful-queues

* Update modules/indexer/issues/indexer.go

Co-Authored-By: guillep2k <[email protected]>

* Update modules/indexer/issues/indexer.go

Co-Authored-By: guillep2k <[email protected]>

* Update modules/queue/queue_channel.go

Co-Authored-By: guillep2k <[email protected]>

* Update modules/queue/queue_disk.go

* Update modules/queue/queue_disk_channel.go

Co-Authored-By: guillep2k <[email protected]>

* Rename queue.Description to queue.ManagedQueue as per @guillep2k

* Cancel pool workers when removed

* Remove dependency on queue from setting

* Update modules/queue/queue_redis.go

Co-Authored-By: guillep2k <[email protected]>

* As per @guillep2k add mutex locks on shutdown/terminate

* move unlocking out of setInternal

* Add warning if number of workers < 0

* Small changes as per @guillep2k

* No redis host specified not found

* Clean up documentation for queues

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

* Update modules/indexer/issues/indexer_test.go

* Ensure that persistable channel queue is added to manager

* Rename QUEUE_NAME REDIS_QUEUE_NAME

* Revert "Rename QUEUE_NAME REDIS_QUEUE_NAME"

This reverts commit 1f83b4fc9b9dabda186257b38c265fe7012f90df.

Co-authored-by: guillep2k <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2020-01-07 12:23:09 +01:00
8ctopus 86b033c0f3 More extensive robots.txt docs (#9566) 2020-01-07 07:38:22 +00:00
Timon Engelke 664ac398ed Add a /user/login landing page option (#9622)
* Add a /user/login landing page option

* Add test case for login landing page
2020-01-06 17:50:44 +01:00
9bb303abe6 Add footer extra links template (#9576)
* Add footer extra links template

* [Docs] Update to mention extra links footer template

* Commit suggestion from @davidsvantesson

Co-Authored-By: David Svantesson <[email protected]>

* Move template placement to right side of footer

Co-authored-by: David Svantesson <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
2020-01-03 20:41:56 +02:00
zeripathandguillep2k c2e6f5d1bc Provide Default messages for merges (#9393)
Co-Authored-By: guillep2k <[email protected]>
2019-12-30 18:34:11 -05:00
zeripath c8e9ac5724 Use Req.URL.RequestURI() to cope with FCGI urls (#9473)
* Use Req.URL.RequestURI() to cope with FCGI urls

* Add debug logging statement when forbidden in internal API.
2019-12-24 00:11:12 +00:00
pseudocoder 1c717e00f0 Add warning to docs in order to avoid template mismatches (#9411)
* DOCS: add mention of swagger api reference

It's(swagger api link) mentioned vaguely in the FAQ but IMHO missing from API usage page.

* Add warning to avoid template mismatches 

Related to https://github.com/go-gitea/gitea/issues/9320
2019-12-18 16:48:33 +01:00
ZHOU Cheng 0555b1d60f 登陆 to 登录 (#9382) 2019-12-17 13:06:54 +00:00
Brad Albright 0506e8306a Add /milestones endpoint (#8733)
Create a /milestones endpoint which basically serves as a dashboard view for milestones, very similar to the /issues or /pulls page.

Closes #8232
2019-12-15 14:20:08 +00:00
zeripath 78b8950fcd Sign protected branches (#8993)
* Move SignMerge to PullRequest

* Add approved signing mode

* As per @guillep2k comment
2019-12-15 11:06:31 +00:00
John Olheiser 3593c7630c Push to create repo (#8419)
* Refactor

Signed-off-by: jolheiser <[email protected]>

* Add push-create to SSH serv

Signed-off-by: jolheiser <[email protected]>

* Cannot push for another user unless admin

Signed-off-by: jolheiser <[email protected]>

* Get owner in case admin pushes for another user

Signed-off-by: jolheiser <[email protected]>

* Set new repo ID in result

Signed-off-by: jolheiser <[email protected]>

* Update to service and use new org perms

Signed-off-by: jolheiser <[email protected]>

* Move pushCreateRepo to services

Signed-off-by: jolheiser <[email protected]>

* Fix import order

Signed-off-by: jolheiser <[email protected]>

* Changes for @guillep2k

* Check owner (not user) in SSH
* Add basic tests for created repos (private, not empty)

Signed-off-by: jolheiser <[email protected]>
2019-12-15 10:49:52 +08:00
zeripath 71bcf9015c Default NO_REPLY_ADDRESS to DOMAIN (#9325)
* Default NO_REPLY_ADDRESS to DOMAIN

The default NO_REPLY_ADDRESS was previously noreply.example.org
This PR changes this to default to the default DOMAIN for gitea.

* Change default to noreply.%(DOMAIN)s

* Change default to "noreply" + Domain
2019-12-13 23:14:43 -05:00
techknowlogick 0cba304fb2 Youtrack now supports Gitea (#9343)
* Youtrack now supports Gitea

* Update third-party-tools.en-us.md
2019-12-12 23:28:54 -05:00
zeripath deb632e6fd FCGI: Allow FCGI over unix sockets (#9298)
* FCGI: Allow FCGI over unix sockets

* fixup! FCGI: Allow FCGI over unix sockets
2019-12-10 13:23:26 +01:00
Alexander Scheel 3f34abf28d Markdown: Sanitizier Configuration (#9075)
* Support custom sanitization policy

Allowing the gitea administrator to configure sanitization policy allows
them to couple external renders and custom templates to support more
markup. In particular, the `pandoc` renderer allows generating KaTeX
annotations, wrapping them in `<span>` elements with class `math` and
either `inline` or `display` (depending on whether or not inline or
block mode was requested).

This iteration gives the administrator whitelisting powers; carefully
crafted regexes will thus let through only the desired attributes
necessary to support their custom markup.

Resolves: #9054

Signed-off-by: Alexander Scheel <[email protected]>

* Document new sanitization configuration

 - Adds basic documentation to app.ini.sample,
 - Adds an example to the Configuration Cheat Sheet, and
 - Adds extended information to External Renderers section.

Signed-off-by: Alexander Scheel <[email protected]>

* Drop extraneous length check in newMarkupSanitizer(...)

Signed-off-by: Alexander Scheel <[email protected]>

* Fix plural ELEMENT and ALLOW_ATTR in docs

These were left over from their initial names. Make them singular to
conform with the current expectations.

Signed-off-by: Alexander Scheel <[email protected]>
2019-12-07 14:49:04 -05:00
Lunny Xiao 58d9d59246 Only show part of members on orgnization dashboard and add paging for orgnization members page (#9092)
* Only show part of members on orgnization dashboard and add paging for orgnization members page

* fix test

* fix typo
2019-12-06 13:34:54 +08:00
silverwind ac91ffc0d1 Add Node.js build dep, remove built js/css files (#9114)
- Added Node.js as build dependency and removes build files from git.
- Added version checks for both Go and Node.js.
- Overhauled the js/css make target to only run when needed.
- Merged the `generate` make target into `build` as per suggestion.

Fixes: https://github.com/go-gitea/gitea/issues/6782
Fixes: https://github.com/go-gitea/gitea/issues/9216
2019-12-05 11:41:38 +08:00
6543 d0287faf66 [Feature] Custom Reactions (#8886)
* add [ui] Reactions

* move contend check from form to go functions

* use else if

* check if reaction is allowed only on react
(so previous custom reaction can be still removed)

* use $.AllowedReactions in templates

* use ctx.Flash.Error

* use it there too

* add redirection

* back to server error
because a wrong reaction is a template issue ...

* add emoji list link

* add docs entry

* small wording nit
suggestions from @jolheiser - thx

* same reactions as github

* fix PR reactions

* handle error so template JS could check

* Add Integrations Test

* add REACTIONS setting to cheat-sheet doc page
2019-12-01 17:57:24 -05:00
silverwind bb54625432 Add USE_SERVICE_WORKER setting (#9110)
* Add USE_SERVICE_WORKER setting

This will be very useful setting for anyone doing frontend work.

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

* prevent potential syntax error on old browsers
2019-11-21 15:06:23 -05:00
zeripath 3cf0754d99 Add Graceful shutdown for Windows and hooks for shutdown of goroutines (#8964)
* Graceful Shutdown for windows and others

Restructures modules/graceful, adding shutdown for windows, removing and
replacing the old minwinsvc code.

Creates a new waitGroup - terminate which allows for goroutines to
finish up after the shutdown of the servers.

Shutdown and terminate hooks are added for goroutines.

* Remove unused functions - these can be added in a different PR

* Add startup timeout functionality

* Document STARTUP_TIMEOUT
2019-11-21 13:32:02 -05:00
maicss 348eb6b9f3 [fix] typo (#9104) 2019-11-21 21:27:05 +08:00
guillep2kandLauris BH 0d2c5155a3 Fix doc example for asciidoc (#9072)
* Fix doc example for asciidoc

* Update config-cheat-sheet.en-us.md

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

Co-Authored-By: Lauris BH <[email protected]>
2019-11-20 01:17:14 -05:00
Lunny Xiao 3a92781ffd Add retry for migration http/https requests (#9019)
* Add retry for migration http/https requests

* give the more suitable name for retry configuraion items

* fix docs and lint

* Only use retryDownloader when setting > 1
2019-11-16 16:30:06 +08:00
guillep2k 6fa872154b Add review comments to mail notifications (#8996) 2019-11-15 12:59:21 +00:00
zeripathandAntoine GIRARD 78a5f7fffe Enforce Gitea environment for pushes (#8982)
* Enforce Gitea environment for pushes

* Update custom/conf/app.ini.sample

Co-Authored-By: Antoine GIRARD <[email protected]>
2019-11-14 22:39:48 +00:00
zeripath 942e517103 Add ALLOW_ONLY_EXTERNAL_REGISTRATION to config cheat sheet (#8986)
ALLOW_ONLY_EXTERNAL_REGISTRATION was missed off the cheat sheet. This PR adds it.

Fix #8180
2019-11-14 16:58:34 +00:00
zeripath 96738bbd00 Add Close() method to gogitRepository (#8901)
In investigating #7947 it has become clear that the storage component of go-git repositories needs closing.

This PR adds this Close function and adds the Close functions as necessary.

In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files.

Fixes #7947
2019-11-13 07:01:19 +00:00