Commit Graph
100 Commits
Author SHA1 Message Date
58e18e19e8 Rename project board -> column to make the UI less confusing (#30170)
This PR split the `Board` into two parts. One is the struct has been
renamed to `Column` and the second we have a `Template Type`.

But to make it easier to review, this PR will not change the database
schemas, they are just renames. The database schema changes could be in
future PRs.

---------

Co-authored-by: silverwind <[email protected]>
Co-authored-by: yp05327 <[email protected]>
2024-05-27 08:59:54 +00:00
d97f027099 Update Actions documentation missing feature (#31034)
Fix
https://github.com/go-gitea/gitea/issues/25897#issuecomment-2117145391

---------

Co-authored-by: silverwind <[email protected]>
Co-authored-by: yp05327 <[email protected]>
2024-05-22 22:06:22 +08:00
Lunny Xiao 7067dc682b Fix documentation build problems because of MDX syntax conflicts (#30744)
Documentation building has encountered a problem like below. This is
because MDX syntax doesn't allow `{customPath}`, we have to use
\`{customPath}\`

```
Error: Can't render static file for pathname "/next/administration/config-cheat-sheet"
            at generateStaticFile (/workspace/gitea/gitea-docusaurus/node_modules/@docusaurus/core/lib/ssg.js:119:15)
            at runNextTicks (node:internal/process/task_queues:60:5)
            at process.processImmediate (node:internal/timers:449:9)
            at async /workspace/gitea/gitea-docusaurus/node_modules/p-map/index.js:57:22 {
          [cause]: ReferenceError: CustomPath is not defined
              at _createMdxContent (server.bundle.js:4406:106)
              at MDXContent (server.bundle.js:10745:8)
              at Uc (server.bundle.js:264171:44)
              at Xc (server.bundle.js:264173:253)
              at Z (server.bundle.js:264179:89)
              at Yc (server.bundle.js:264182:98)
              at $c (server.bundle.js:264181:140)
              at Z (server.bundle.js:264179:345)
              at Xc (server.bundle.js:264177:231)
              at Z (server.bundle.js:264179:89)
```
2024-04-28 20:36:14 +08:00
ec4b0ef88b Update actions variables documents (#30394)
Fix #30393

---------

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
2024-04-11 11:57:03 +08:00
Lunny Xiao 287e279b33 Fix actions design about default actions download url (#30360)
Fix #30359
2024-04-09 16:39:38 +00:00
Lunny Xiao 2c3fb672d6 Fix the wrong default value of ENABLE_OPENID_SIGNIN on docs (#29925)
Fix #29923
2024-03-20 12:26:19 +08:00
Lunny Xiaoanddelvh f11d44d231 Allow options to disable user ssh keys configuration from the interface on app.ini (#29447)
Follow #29275
Extract from #20549
Fix #24716

---------

Co-authored-by: delvh <[email protected]>
2024-03-04 07:50:21 +00:00
Lunny Xiao 21cb4d9cce Allow options to disable user gpg keys configuration from the interface on app.ini (#29486)
Follow #29447
Fix #29454 
Extract from #20549
2024-03-02 01:21:01 +00:00
Lunny Xiaoandwxiaoguang 77d1a6e905 Allow options to disable user deletion from the interface on app.ini (#29275)
Extract from #20549

This PR added a new option on app.ini `[admin]USER_DISABLED_FEATURES` to
allow the site administrator to disable users visiting deletion user
interface or allow.
This options are also potentially allowed to define more features in
future PRs.

---------

Co-authored-by: wxiaoguang <[email protected]>
2024-02-23 07:24:04 +00:00
Lunny Xiao 831a1c2276 Make offline mode as default to no connect external avatar service by default (#28548)
To keep user's privacy, make offline mode as true by default.

Users can still change it from installation ui and app.ini
2023-12-21 07:42:16 +00:00
Lunny Xiao 54f64c130b Update actions document about comparsion as Github Actions (#28560) 2023-12-20 20:12:25 +00:00
Lunny Xiao 272f1b805c Always enable caches (#28527)
Nowadays, cache will be used on almost everywhere of Gitea and it cannot
be disabled, otherwise some features will become unaviable.

Then I think we can just remove the option for cache enable. That means
cache cannot be disabled.
But of course, we can still use cache configuration to set how should
Gitea use the cache.
2023-12-19 09:29:05 +00:00
Lunny Xiao 494d46b23f Fix wrong relative path on obtain token from command line (#27850)
Caused by #27845
2023-10-30 23:31:09 -04:00
Lunny Xiao 827d00652a Fix the robots.txt path 2023-10-11 18:01:52 +08:00
Lunny Xiao 9ddbf4eb06 Make actions default enabled for newly created repository if global configuraion enabled (#27482) 2023-10-10 14:45:31 +00:00
Lunny Xiao 959517743d Remove upgrade from Gogs doc because the diverse has been 7 years and the code base changed totally (#27387)
The documentation becomes no help since that but make people confusing.
2023-10-02 14:53:55 +08:00
Lunny Xiao ff0905f564 Fix chinese translation (#27296)
Fix translation from #27291 
Source Map will be kept as English in Chinese usage habit.
2023-09-27 08:15:12 +00:00
Lunny Xiao b2f7f608fc Actions are no longer experimental, so enable them by default (#27054)
This PR makes the actions enabled by default, so people will find it
easier to enable actions in repository setting.
2023-09-15 06:43:39 +00:00
Lunny Xiao 0763fe2661 Update brew installation documentation since gitea moved to brew core package (#27070)
ref: https://gitea.com/gitea/homebrew-gitea/pulls/178
2023-09-15 06:14:24 +00:00
Lunny XiaoandGiteabot 7222b53d01 Add reverseproxy auth for API back with default disabled (#26703)
This feature was removed by #22219 to avoid possible CSRF attack.

This PR takes reverseproxy auth for API back but with default disabled.

To prevent possbile CSRF attack, the responsibility will be the
reverseproxy but not Gitea itself.

For those want to enable this `ENABLE_REVERSE_PROXY_AUTHENTICATION_API`,
they should know what they are doing.

---------

Co-authored-by: Giteabot <[email protected]>
2023-09-07 08:31:46 +00:00
Lunny Xiao be1a89c930 Update documents to fix some links (#26885) 2023-09-03 18:45:20 +00:00
Lunny Xiao 28eadd1651 Use docs.gitea.com instead of docs.gitea.io (#26739) 2023-08-27 11:59:12 +00:00
2662f83d96 add mfa doc (#26654)
copy and modified from #14572 

> Whilst debating enforcing MFA within our team, I realised there isn't
a lot of context to the side effects of enabling it. Most of us use Git
over HTTP and would need to add a token.

I plan to add another PR that adds a sentence to the UI about needing to
generate a token when enabling MFA if HTTP is to be used.

---------

Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: silverwind <[email protected]>
2023-08-22 21:56:11 -04:00
Lunny Xiaoandsilverwind 37669ca1fe Update upgrade documentation to add a check for deprecated configurations (#26451)
fix
https://github.com/go-gitea/gitea/issues/25995#issuecomment-1674096710

---------

Co-authored-by: silverwind <[email protected]>
2023-08-11 13:53:23 +08:00
Lunny Xiao 300d33f7fe Remove backslashed newlines on markdown (#26344)
Fix https://gitea.com/gitea/gitea-docusaurus/issues/56
2023-08-05 12:48:46 +00:00
Lunny Xiao 499d30d79c Fix default value for LocalURL (#25426)
Fix #23769
2023-06-24 11:56:29 +08:00
Lunny Xiao 760964b93b Use the new download domain replace the old (#25405)
As title.
2023-06-21 03:11:17 +00:00
Lunny Xiaoandwxiaoguang 2fbd38937d Fix all possible setting error related storages and added some tests (#23911)
Follow up #22405

Fix #20703 

This PR rewrites storage configuration read sequences with some breaks
and tests. It becomes more strict than before and also fixed some
inherit problems.

- Move storage's MinioConfig struct into setting, so after the
configuration loading, the values will be stored into the struct but not
still on some section.
- All storages configurations should be stored on one section,
configuration items cannot be overrided by multiple sections. The
prioioty of configuration is `[attachment]` > `[storage.attachments]` |
`[storage.customized]` > `[storage]` > `default`
- For extra override configuration items, currently are `SERVE_DIRECT`,
`MINIO_BASE_PATH`, `MINIO_BUCKET`, which could be configured in another
section. The prioioty of the override configuration is `[attachment]` >
`[storage.attachments]` > `default`.
- Add more tests for storages configurations.
- Update the storage documentations.

---------

Co-authored-by: wxiaoguang <[email protected]>
2023-06-14 11:42:38 +08:00
Lunny Xiao 362815f933 improve permission documentation (#23942) 2023-06-05 15:43:17 +08:00
Lunny Xiao 6d87667f5a Remove unnecessary content on docs (#24976) 2023-05-30 09:30:56 +08:00
Lunny Xiao dc64de5f3d Fix documentation ref (#24934)
Fix documentation ref
2023-05-26 00:19:13 +08:00
Lunny Xiaoanddelvh bb686dfded Merge two translation contributing documents (#23939)
This PR also adjusts the weights.

---------

Co-authored-by: delvh <[email protected]>
2023-05-25 15:49:54 +00:00
Lunny Xiao 28cb77e086 Rename docs packages title from xxx Packages Repository -> xxx Package Registry (#24895)
As title.
2023-05-24 06:21:39 +00:00
Lunny Xiao 04fb723db2 Remove unnecessary usage prefix from doc titles (#24869)
As title.
2023-05-23 18:14:57 +08:00
Lunny XiaoandGiteabot f92f524214 Move actions as usage's subdirectory and update comparsion zh-cn version (#24719)
As title.

Co-authored-by: Giteabot <[email protected]>
2023-05-15 15:36:20 +08:00
Lunny Xiao 9c0ac05ebb Fix https setup doc zh-cn (#24015) 2023-04-09 19:53:08 +02:00
Lunny Xiaoanddelvh 9823546bf2 Merge push to create, open PR from push, and push options docs articles into one (#23744)
Add documentation for this feature.

<img width="734" alt="gitea-push-hint"
src="https://user-images.githubusercontent.com/81045/227921177-af08ab76-7556-4a69-8da9-bb59cec1388b.png">

---------

Co-authored-by: delvh <[email protected]>
2023-04-07 07:36:19 +08:00
Lunny Xiao f8a6e1a34e Adjust some documentations titles (#23941)
As title.
2023-04-06 11:06:32 +02:00
Lunny Xiao 931770f7f4 Update docs markdown file weight to make it clear (#23909)
For Docusaurus, it needs a meta data named `sidebar_position`, so we
copy all `weight` under `menu/sidebar` as top meta key.
2023-04-04 21:47:31 +08:00
780b893517 Describe Gitea's purpose more accurately (#23698)
As title.

---------

Co-authored-by: wxiaoguang <[email protected]>
Co-authored-by: Yarden Shoham <[email protected]>
2023-03-25 18:19:34 +02:00
Lunny XiaoandJohn Olheiser bee3c9dfa9 Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629)
- **Installation**: includes how to install Gitea and related other
tools, also includes upgrade Gitea
- **Administration**: includes how to configure Gitea, customize Gitea
and manage Gitea instance out of Gitea admin UI
- **Usage**: includes how to use Gitea's functionalities. A sub
documentation is about packages, in future we could also include CI/CD
and others.
- **Development**: includes how to integrate with Gitea's API, how to
develop new features within Gitea
- **Contributing**: includes how to contribute code to Gitea
repositories.

After this is merged, I think we can have a sub-documentation of `Usage`
part named `Actions` to describe how to use Gitea actions

---------

Co-authored-by: John Olheiser <[email protected]>
2023-03-23 23:18:24 +08:00
Lunny XiaoandKN4CK3R b0dfc70268 Move pidfile creation from setting to web cmd package (#23285)
Creating pid file should not belong to setting package and only web
command needs that. So this PR moves pidfile creation from setting
package to web command package to keep setting package more readable.

I marked this as `break` because the PIDFile path moved. For those who
have used the pid build argument, it has to be changed.

---------

Co-authored-by: KN4CK3R <[email protected]>
2023-03-16 15:22:54 +08:00
Lunny XiaoandJason Song ec5cbdacc7 Update hacking-on-gitea-zh_cn documentation (#23315)
This PR fix outdated hacking-on-gitea-zh_cn documentation.

---------

Co-authored-by: Jason Song <[email protected]>
2023-03-06 15:14:00 +08:00
Lunny Xiao 85a25a3203 Re-add accidentally removed hacking-on-gitea.zh-cn.md (#23297)
#21627 accidentally removed the docs file `hacking-on-gitea.zh-cn.md`.
This re-adds it and merges some changes from #23289
2023-03-04 22:34:02 +01:00
7e88d7b787 Add missed reverse proxy authentication documentation (#22250)
Co-authored-by: KN4CK3R <[email protected]>
Co-authored-by: Jason Song <[email protected]>
2023-02-03 18:37:25 +08:00
Lunny Xiao ebceb6bada Fix wrong default value for update checker on app.example.ini (#22084) 2022-12-11 16:08:01 -06:00
Lunny Xiaoandzeripath 3a9ef1f88c Add disable download source configuration (#20548)
Add configuration to enable/disable download source from UI.

Co-authored-by: zeripath <[email protected]>
2022-07-31 18:57:02 +02:00
1b3de2bc42 Allow render HTML with css/js external links (#19017)
* Allow render HTML with css/js external links

* Fix bug because of filename escape chars

* Fix lint

* Update docs about new configuration item

* Fix bug of render HTML in sub directory

* Add CSP head for displaying iframe in rendering file

* Fix test

* Apply suggestions from code review

Co-authored-by: delvh <[email protected]>

* Some improvements

* some improvement

* revert change in SanitizerDisabled of external renderer

* Add sandbox for iframe and support allow-scripts and allow-same-origin

* refactor

* fix

* fix lint

* fine tune

* use single option RENDER_CONTENT_MODE, use sandbox=allow-scripts

* fine tune CSP

* Apply suggestions from code review

Co-authored-by: wxiaoguang <[email protected]>

Co-authored-by: delvh <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
2022-06-16 11:33:23 +08:00
Lunny Xiaoandzeripath f19859cbcf Allow custom default merge message with .gitea/default_merge_message/<merge_style>_TEMPLATE.md (#18177)
* Allow custom default merge message with .gitea/MERGE_MESSAGE_<merge_style>_TEMPLATE.md

* Some improvements

* Follow some advices

* Fix bug

* Fix bug

* Fix lint

* Fix close comment

* Fix test

* Fix and docs

* Improve codes

* Update docs and remove unnecessary variables

* return error for GetDefaultMergeMessage

* Fix test

* improve code

* ignore unknow unit type

* return error for GetDefaultMergeMessage

* Update services/pull/merge.go

* Some improvements

* Follow some advices

* Fix bug

* Fix lint

* Improve codes

* Update docs and remove unnecessary variables

* return error for GetDefaultMergeMessage

* improve code

* Handle deleted HeadRepo in GetDefaultMergeMessage

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

* Fix test

* Fix test

Co-authored-by: zeripath <[email protected]>
2022-05-08 20:32:45 +08:00
Lunny Xiao c93373f03d Fix two typos (#19504) 2022-04-26 18:01:42 +02:00
aeeb34d059 Support ignore all santize for external renderer (#18984)
* Support ignore all santize for external renderer

* Update docs

* Apply suggestions from code review

Co-authored-by: silverwind <[email protected]>

* Fix doc

Co-authored-by: silverwind <[email protected]>
Co-authored-by: 6543 <[email protected]>
2022-03-06 16:41:54 +08:00
Lunny Xiaoandzeripath a3724f4c62 Add example to render html files (#18736)
* Add example to render html files

* Use class in example

Co-authored-by: zeripath <[email protected]>
2022-02-14 21:56:17 +08:00
Lunny Xiao 5772e38a30 update the comparison documents (#18669)
* update the comparison documents

* Remove U2f
2022-02-08 11:00:13 -05:00
Lunny Xiaoandwxiaoguang 9d0d13e5af Add deprecated for LFS_CONTENT_PATH on zh-cn docs (#18362)
Co-authored-by: wxiaoguang <[email protected]>
2022-01-23 13:03:26 +08:00
16d5d9ad6d Support webauthn (#17957)
Migrate from U2F to Webauthn

Co-authored-by: Andrew Thornton <[email protected]>
Co-authored-by: 6543 <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
2022-01-14 16:03:31 +01:00
7bc5bfe284 Team permission allow different unit has different permission (#17811)
* Team permission allow different unit has different permission

* Finish the interface and the logic

* Fix lint

* Fix translation

* align center for table cell content

* Fix fixture

* merge

* Fix test

* Add deprecated

* Improve code

* Add tooltip

* Fix swagger

* Fix newline

* Fix tests

* Fix tests

* Fix test

* Fix test

* Max permission of external wiki and issues should be read

* Move team units with limited max level below units table

* Update label and column names

* Some improvements

* Fix lint

* Some improvements

* Fix template variables

* Add permission docs

* improve doc

* Fix fixture

* Fix bug

* Fix some bug

* fix

* gofumpt

* Integration test for migration (#18124)

integrations: basic test for Gitea {dump,restore}-repo
This is a first step for integration testing of DumpRepository and
RestoreRepository. It:

runs a Gitea server,
dumps a repo via DumpRepository to the filesystem,
restores the repo via RestoreRepository from the filesystem,
dumps the restored repository to the filesystem,
compares the first and second dump and expects them to be identical

The verification is trivial and the goal is to add more tests for each
topic of the dump.

Signed-off-by: Loïc Dachary <[email protected]>

* Team permission allow different unit has different permission

* Finish the interface and the logic

* Fix lint

* Fix translation

* align center for table cell content

* Fix fixture

* merge

* Fix test

* Add deprecated

* Improve code

* Add tooltip

* Fix swagger

* Fix newline

* Fix tests

* Fix tests

* Fix test

* Fix test

* Max permission of external wiki and issues should be read

* Move team units with limited max level below units table

* Update label and column names

* Some improvements

* Fix lint

* Some improvements

* Fix template variables

* Add permission docs

* improve doc

* Fix fixture

* Fix bug

* Fix some bug

* Fix bug

Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: 6543 <[email protected]>
Co-authored-by: Aravinth Manivannan <[email protected]>
2022-01-05 11:37:00 +08:00
Lunny Xiao 1a82c4d38b Move keys to models/asymkey (#17917)
* Move keys to models/keys

* Rename models/keys -> models/asymkey

* change the missed package name

* Fix package alias

* Fix test

* Fix docs

* Fix test

* Fix test

* merge
2021-12-10 16:14:24 +08:00
Lunny Xiao 6e649f2bcd Add documentation for backend development (#17512)
* Add documentation for backend development

* Update backend guidline

* More sections

* Add modules/setting and modules/git

* Uniform gitea as Gitea

* some improvements

* some improvements
2021-11-23 10:10:18 +08:00
Lunny Xiaoandtechknowlogick 5c026fea7e fix migrations documents (#17679)
Co-authored-by: techknowlogick <[email protected]>
2021-11-17 15:17:37 +08:00
Lunny Xiaoand6543 37a3509e3e Paginate releases page & set default page size to 10 (#16857)
* Add release default page and set it to 10

* use limit

Co-authored-by: 6543 <[email protected]>
2021-08-29 18:25:16 +02:00
f6c3c97ed1 Add proxy settings and support for migration and webhook (#16704)
* Add proxy settings and support for migration and webhook

* Fix default value

* Add newline for example ini

* Add lfs proxy support

* Fix lint

* Follow @zeripath's review

* Fix git clone

* Fix test

* missgin http requests for proxy

* use empty

Co-authored-by: zeripath <[email protected]>

Co-authored-by: 6543 <[email protected]>
Co-authored-by: zeripath <[email protected]>
2021-08-18 21:10:39 +08:00
Lunny Xiao e8b47f5247 Fix docs assets link (#16337) 2021-07-04 15:56:40 +02:00
ab21475b78 Rework repository archive (#14723)
* Use storage to store archive files

* Fix backend lint

* Add archiver table on database

* Finish archive download

* Fix test

* Add database migrations

* Add status for archiver

* Fix lint

* Add queue

* Add doctor to check and delete old archives

* Improve archive queue

* Fix tests

* improve archive storage

* Delete repo archives

* Add missing fixture

* fix fixture

* Fix fixture

* Fix test

* Fix archiver cleaning

* Fix bug

* Add docs for repository archive storage

* remove repo-archive configuration

* Fix test

* Fix test

* Fix lint

Co-authored-by: 6543 <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2021-06-23 17:12:38 -04:00
Lunny Xiao c8d9804bfd Change the chinese discuss link to discourse (#15533) 2021-04-18 19:12:16 +08:00
Lunny Xiao 336e5d41a1 Add NeedPostProcess for Parser interface to improve performance of csv render (#15153) 2021-04-13 15:06:31 +08:00
Lunny Xiao a17dc29cf2 Turn default hash password algorightm back to pbkdf2 from argon2 until we found a better one (#14673)
* Turn default hash password algorightm back to pbkdf2 from argon2 until we found a better one

* Add a warning on document
2021-02-13 18:03:29 +01:00
Lunny Xiao 981e91b6bc Update docs and comments to remove macaron (#14491) 2021-01-29 16:35:30 +01:00
Lunny Xiaoand6543 3e3d33244e Move macaron to chi (#14293)
Use [chi](https://github.com/go-chi/chi) instead of the forked [macaron](https://gitea.com/macaron/macaron). Since macaron and chi have conflicts with session share, this big PR becomes a have-to thing. According my previous idea, we can replace macaron step by step but I'm wrong. :( Below is a list of big changes on this PR.

- [x] Define `context.ResponseWriter` interface with an implementation `context.Response`.
- [x] Use chi instead of macaron, and also a customize `Route` to wrap chi so that the router usage is similar as before.
- [x] Create different routers for `web`, `api`, `internal` and `install` so that the codes will be more clear and no magic .
- [x] Use https://github.com/unrolled/render instead of macaron's internal render
- [x] Use https://github.com/NYTimes/gziphandler instead of https://gitea.com/macaron/gzip
- [x] Use https://gitea.com/go-chi/session which is a modified version of https://gitea.com/macaron/session and removed `nodb` support since it will not be maintained. **BREAK**
- [x] Use https://gitea.com/go-chi/captcha which is a modified version of https://gitea.com/macaron/captcha
- [x] Use https://gitea.com/go-chi/cache which is a modified version of https://gitea.com/macaron/cache
- [x] Use https://gitea.com/go-chi/binding which is a modified version of https://gitea.com/macaron/binding
- [x] Use https://github.com/go-chi/cors instead of https://gitea.com/macaron/cors
- [x] Dropped https://gitea.com/macaron/i18n and make a new one in `code.gitea.io/gitea/modules/translation`
- [x] Move validation form structs from `code.gitea.io/gitea/modules/auth` to `code.gitea.io/gitea/modules/forms` to avoid dependency cycle.
- [x] Removed macaron log service because it's not need any more. **BREAK**
- [x] All form structs have to be get by `web.GetForm(ctx)` in the route function but not as a function parameter on routes definition.
- [x] Move Git HTTP protocol implementation to use routers directly.
- [x] Fix the problem that chi routes don't support trailing slash but macaron did.
- [x] `/api/v1/swagger` now will be redirect to `/api/swagger` but not render directly so that `APIContext` will not create a html render. 

Notices:
- Chi router don't support request with trailing slash
- Integration test `TestUserHeatmap` maybe mysql version related. It's failed on my macOS(mysql 5.7.29 installed via brew) but succeed on CI.

Co-authored-by: 6543 <[email protected]>
2021-01-26 16:36:53 +01:00
Lunny Xiao a42089354f Dump github/gitlab/gitea repository data to a local directory and restore to gitea (#12244)
* Dump github/gitlab repository data to a local directory

* Fix lint

* Adjust directory structure

* Allow migration special units

* Allow migration ignore release assets

* Fix lint

* Add restore repository

* stage the changes

* Merge

* Fix lint

* Update the interface

* Add some restore methods

* Finish restore

* Add comments

* Fix restore

* Add a token flag

* Fix bug

* Fix test

* Fix test

* Fix bug

* Fix bug

* Fix lint

* Fix restore

* refactor downloader

* fmt

* Fix bug isEnd detection on getIssues

* Refactor maxPerPage

* Remove unused codes

* Remove unused codes

* Fix bug

* Fix restore

* Fix dump

* Uploader should not depend downloader

* use release attachment name but not id

* Fix restore bug

* Fix lint

* Fix restore bug

* Add a method of DownloadFunc for base.Release to make uploader not depend on downloader

* fix Release yml marshal

* Fix trace information

* Fix bug when dump & restore

* Save relative path on yml file

* Fix bug

* Use relative path

* Update docs

* Use git service string but not int

* Recognize clone addr to service type
2020-12-27 11:34:19 +08:00
Lunny Xiaoandzeripath a6b0cf5218 Improve vfsgen to not unzip bindata files but send to browser directly (#7109)
* Don't unzip files from bindata but send to browser directly

* remove dependent for httpgzip

* Add tests for parseAcceptEncoding

* Update docs for ENABLE_GZIP

* Fix bug

* Fix bug

Co-authored-by: zeripath <[email protected]>
2020-12-24 12:25:17 +08:00
Lunny Xiaoandtechknowlogick e64c7c2d65 Remove duplicated repository.upload on cheat-sheet docs (#13290)
Co-authored-by: techknowlogick <[email protected]>
2020-10-24 13:49:52 -04:00
Lunny Xiao e1e06ee9fb Avatars and Repo avatars support storing in minio (#12516)
* Avatar support minio

* Support repo avatar minio storage

* Add missing migration

* Fix bug

* Fix test

* Add test for minio store type on avatars and repo avatars; Add documents

* Fix bug

* Fix bug

* Add back missed avatar link method

* refactor codes

* Simplify the codes

* Code improvements

* Fix lint

* Fix test mysql

* Fix test mysql

* Fix test mysql

* Fix settings

* Fix test

* fix test

* Fix bug
2020-10-14 21:07:51 +08:00
Lunny Xiao c306725943 Fix typo on Chinese documents (#12982) 2020-09-30 20:27:41 +08:00
Lunny Xiaoandzeripath 49b5bd0a01 Add default storage configurations (#12813)
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: zeripath <[email protected]>
2020-09-29 12:05:13 +03:00
Lunny Xiao 7fc10143fb LFS support to be stored on minio (#12518)
* LFS support to be stored on minio

* Fix test

* Fix lint

* Fix lint

* Fix check

* Fix test

* Update documents and add migration for LFS

* Fix some bugs
2020-09-08 23:45:10 +08:00
Lunny Xiao c931b53a9e Remove GOPATH set up on hacking (#12698) 2020-09-03 11:11:23 +01:00
Lunny Xiaoandzeripath ca717c1d06 Support elastic search for code search (#10273)
* Support elastic search for code search

* Finished elastic search implementation and add some tests

* Enable test on drone and added docs

* Add new fields to elastic search

* Fix bug

* remove unused changes

* Use indexer alias to keep the gitea indexer version

* Improve codes

* Some code improvements

* The real indexer name changed to xxx.v1

Co-authored-by: zeripath <[email protected]>
2020-08-30 19:08:01 +03:00
baef659394 Add a storage layer for attachments (#11387)
* Add a storage layer for attachments

* Fix some bug

* fix test

* Fix copyright head and lint

* Fix bug

* Add setting for minio and flags for migrate-storage

* Add documents

* fix lint

* Add test for minio store type on attachments

* fix test

* fix test

* Apply suggestions from code review

Co-authored-by: guillep2k <[email protected]>

* Add warning when storage migrated successfully

* Fix drone

* fix test

* rebase

* Fix test

* display the error on console

* Move minio test to amd64 since minio docker don't support arm64

* refactor the codes

* add trace

* Fix test

* remove log on xorm

* Fi download bug

* Add a storage layer for attachments

* Add setting for minio and flags for migrate-storage

* fix lint

* Add test for minio store type on attachments

* Apply suggestions from code review

Co-authored-by: guillep2k <[email protected]>

* Fix drone

* fix test

* Fix test

* display the error on console

* Move minio test to amd64 since minio docker don't support arm64

* refactor the codes

* add trace

* Fix test

* Add URL function to serve attachments directly from S3/Minio

* Add ability to enable/disable redirection in attachment configuration

* Fix typo

* Add a storage layer for attachments

* Add setting for minio and flags for migrate-storage

* fix lint

* Add test for minio store type on attachments

* Apply suggestions from code review

Co-authored-by: guillep2k <[email protected]>

* Fix drone

* fix test

* Fix test

* display the error on console

* Move minio test to amd64 since minio docker don't support arm64

* don't change unrelated files

* Fix lint

* Fix build

* update go.mod and go.sum

* Use github.com/minio/minio-go/v6

* Remove unused function

* Upgrade minio to v7 and some other improvements

* fix lint

* Fix go mod

Co-authored-by: guillep2k <[email protected]>
Co-authored-by: Tyler <[email protected]>
2020-08-18 12:23:45 +08:00
Lunny Xiaoandtechknowlogick ca45925604 Rename custom/conf/app.ini.sample to custom/conf/app.example.ini for better syntax light on editor (#11926)
* Rename custom/conf/app.ini.sample to custom/conf/app.sample.ini for better syntax light on editor

* rename to app.example.ini

* per @6543 's comment, update all references on docs

Co-authored-by: techknowlogick <[email protected]>
2020-06-17 23:16:59 -04: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
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
Lunny Xiao 2914eb2781 Add a new command doctor to check if some wrong configurations on gitea instance (#9095)
* add doctor

* Add a new command doctor to check if some wrong configurations on gitea instance

* fix import

* use regex match authorized_keys on doctor

* Add documentation
2020-01-11 15:24:57 +01: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
Lunny Xiao 51df1558d2 Fix latest docker image haven't include static files. (#9252)
* add warnging on docs

* fix docs
2019-12-05 12:18:28 -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
Lunny Xiao 123a37c0dd Webhook support custom proxy (#8760)
* Webhook support custom proxy

* Add glob support on webhook proxy host rules

* fix app.ini.sample

* improve code and app.ini.sample

* update cheetsheet about added webhook options
2019-11-08 16:25:53 -05:00
f479a6cee4 Make static resouces web browser cache time customized on app.ini (#8442)
* make static resouces web browser cache time customized on app.ini

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

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

* Update custom/conf/app.ini.sample

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

* fix docs
2019-10-14 23:05:57 +01:00
Lunny Xiao 0f53a62312 Update migrated repositories' issues/comments/prs poster id if user has a github external user saved (#7751)
* update migrated issues/comments when login as github

* add get userid when migrating or login with github oauth2

* fix lint

* add migrations for repository service type

* fix build

* remove unnecessary dependencies on migrations

* add cron task to update migrations poster ids and fix posterid when migrating

* fix lint

* fix lint

* improve code

* fix lint

* improve code

* replace releases publish id to actual author id

* fix import

* fix bug

* fix lint

* fix rawdata definition

* fix some bugs

* fix error message
2019-10-14 09:10:42 +03:00
Lunny Xiaoandguillep2k 87a3bd427c Move migrating repository from frontend to backend (#6200)
* move migrating to backend

* add loading image when migrating and fix tests

* fix format

* fix lint

* add redis task queue support and improve docs

* add redis vendor

* fix vet

* add database migrations and fix app.ini sample

* add comments for task section on app.ini.sample

* Update models/migrations/v84.go

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

* Update models/repo.go

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

* move migrating to backend

* add loading image when migrating and fix tests

* fix fmt

* add redis task queue support and improve docs

* fix fixtures

* fix fixtures

* fix duplicate function on index.js

* fix tests

* rename repository statuses

* check if repository is being create when SSH request

* fix lint

* fix template

* some improvements

* fix template

* unified migrate options

* fix lint

* fix loading page

* refactor

* When gitea restart, don't restart the running tasks because we may have servel gitea instances, that may break the migration

* fix js

* Update models/repo.go

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

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

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

* fix tests

* rename ErrTaskIsNotExist to ErrTaskDoesNotExist

* delete release after add one on tests to make it run happy

* fix tests

* fix tests

* improve codes

* fix lint

* fix lint

* fix migrations
2019-10-13 21:23:14 +08:00
Lunny Xiao 53a9602c32 update cache item_ttl docs (#8222) 2019-09-18 10:50:45 +03:00
Lunny Xiao 45a3009bc7 Move database settings from models to setting (#7806)
* move database settings from models to setting

* update docs

* fix checkout pr

* fix tests

* fix lint

* remove unsupported tidb options

* correct wrong variable name

* remove tidb totally
2019-08-24 11:24:45 +02:00
Lunny Xiao 5bb5b714e2 Display ui time with customize time location (#7792)
* display ui time with customize time location

* fix lint

* rename UILocation to DefaultUILocation

* move time related functions to modules/timeutil

* fix tests

* fix tests

* fix build

* fix swagger
2019-08-15 22:46:21 +08:00
Lunny Xiao 51dc2b2ddb Use vendors when go generate (#7340)
* use vendors when go generate

* update docs about golang minimal requirement from 1.9 to 1.11

* fix build
2019-07-06 23:00:41 -04:00
Lunny Xiao 2eb27160b9 when git version >= 2.18, git command could run with git wire protocol version 2 param if enabled (#7047) 2019-05-26 17:50:06 +08:00
Lunny Xiao 14df04550c Add support of utf8mb4 for mysql (#6992) 2019-05-24 00:15:26 -04:00
Lunny Xiao 20d5b987e1 Improve migrations to support migrating milestones/labels/issues/comments/pullrequests (#6290)
* add migrations

* fix package dependency

* fix lints

* implements migrations except pull requests

* add releases

* migrating releases

* fix bug

* fix lint

* fix migrate releases

* fix tests

* add rollback

* pull request migtations

* fix import

* fix go module vendor

* add tests for upload to gitea

* more migrate options

* fix swagger-check

* fix misspell

* add options on migration UI

* fix log error

* improve UI options on migrating

* add support for username password when migrating from github

* fix tests

* remove comments and fix migrate limitation

* improve error handles

* migrate API will also support migrate milestones/labels/issues/pulls/releases

* fix tests and remove unused codes

* add DownloaderFactory and docs about how to create a new Downloader

* fix misspell

* fix migration docs

* Add hints about migrate options on migration page

* fix tests
2019-05-07 09:12:51 +08:00
Lunny Xiao 88860b9e1e 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 <[email protected]>

* switch to go mod

* Update required changes for new logging func signatures
2019-04-08 12:05:15 +03:00
Lunny Xiao c1b1654d7f improve zh-cn comparison docs (#6336) 2019-03-21 22:38:23 -04:00
Lunny Xiao 19efa3bb7d Add more tests and docs for issue indexer, add db indexer type for searching from database (#6144)
* add more tests and docs for issue indexer, add db indexer type for searching from database

* fix typo

* fix typo

* fix lint

* improve docs
2019-02-21 13:01:28 +08:00
Lunny Xiao f7eef3e8c0 add default time out for git operations (#6015) 2019-02-09 22:44:24 +00:00