Commit Graph

1868 Commits

Author SHA1 Message Date
zeripath eb748f5f3c
Add apply-patch, basic revert and cherry-pick functionality (#17902)
This code adds a simple endpoint to apply patches to repositories and
branches on gitea. This is then used along with the conflicting checking
code in #18004 to provide a basic implementation of cherry-pick revert.

Now because the buttons necessary for cherry-pick and revert have 
required us to create a dropdown next to the Browse Source button
I've also implemented Create Branch and Create Tag operations.

Fix #3880 
Fix #17986 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-09 20:28:55 +00:00
GiteaBot 4160aff86e [skip ci] Updated translations via Crowdin 2022-02-09 00:16:04 +00:00
GiteaBot 8422b1c55c [skip ci] Updated translations via Crowdin 2022-02-08 00:15:59 +00:00
wxiaoguang c2a3e38194
Fix the missing i18n key for update checker (#18646) 2022-02-07 15:43:53 +08:00
GiteaBot 3b33507c73 [skip ci] Updated licenses and gitignores 2022-02-06 00:16:02 +00:00
GiteaBot 319d191afc [skip ci] Updated translations via Crowdin 2022-02-04 00:16:04 +00:00
GiteaBot 5469e61a8e [skip ci] Updated translations via Crowdin 2022-02-02 00:16:04 +00:00
GiteaBot 1de5028394 [skip ci] Updated translations via Crowdin 2022-02-01 00:16:43 +00:00
GiteaBot db7c3ecc1f [skip ci] Updated translations via Crowdin 2022-01-31 00:05:29 +00:00
GiteaBot 74dcdadf08 [skip ci] Updated licenses and gitignores 2022-01-30 00:28:19 +00:00
GiteaBot 726715fcfb [skip ci] Updated translations via Crowdin 2022-01-29 00:28:21 +00:00
Gusted 7b04c97b7b
Fix typo (#18436)
As title

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2022-01-28 21:56:31 +08:00
GiteaBot 668718c67e [skip ci] Updated translations via Crowdin 2022-01-28 00:28:20 +00:00
Lauris BH 8038610a42
Automatically pause queue if index service is unavailable (#15066)
* Handle keyword search error when issue indexer service is not available

* Implement automatic disabling and resume of code indexer queue
2022-01-27 10:30:51 +02:00
GiteaBot 2649eddcf0 [skip ci] Updated translations via Crowdin 2022-01-27 00:28:24 +00:00
GiteaBot 4889ab52de [skip ci] Updated translations via Crowdin 2022-01-26 00:28:46 +00:00
GiteaBot 8053b60b4f [skip ci] Updated translations via Crowdin 2022-01-25 00:28:50 +00:00
wxiaoguang 5506cb92da
Refactor webhooks i18n (#18380) 2022-01-24 19:36:54 +08:00
GiteaBot 4bfd749fc5 [skip ci] Updated translations via Crowdin 2022-01-24 00:28:24 +00:00
Dr. Tobias Quathamer 3349fd8f79
Add packagist webhook (#18224)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-23 21:46:30 +08:00
GiteaBot e040eca727 [skip ci] Updated translations via Crowdin 2022-01-23 00:28:40 +00:00
zeripath a82fd98d53
Pause queues (#15928)
* Start adding mechanism to return unhandled data

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

* Create pushback interface

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

* Add Pausable interface to WorkerPool and Manager

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

* Implement Pausable and PushBack for the bytefifos

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

* Implement Pausable and Pushback for ChannelQueues and ChannelUniqueQueues

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

* Wire in UI for pausing

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

* add testcases and fix a few issues

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

* fix build

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

* prevent "race" in the test

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

* fix jsoniter mismerge

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

* fix conflicts

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

* fix format

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

* Add warnings for no worker configurations and prevent data-loss with redis/levelqueue

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

* Use StopTimer

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

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-22 21:22:14 +00:00
GiteaBot f91092453e [skip ci] Updated translations via Crowdin 2022-01-22 00:28:20 +00:00
qwerty287 1f40933d38
Add config options to hide issue events (#17414)
* Add config option to hide issue events
Adds a config option `HIDE_ISSUE_EVENTS` to hide most issue events (changed labels, milestones, projects...) on the issue detail page.
If this is true, only the following events (comment types) are shown:
* plain comments
* closed/reopned/merged
* reviews

* Make configurable using a list

* Add docs

* Add missing newline

* Fix merge issues

* Allow changes per user settings

* Fix lint

* Rm old docs

* Apply suggestions from code review

* Use bitsets

* Rm comment

* fmt

* Fix lint

* Use variable/constant to provide key

* fmt

* fix lint

* refactor

* Add a prefix for user setting key

* Add license comment

* Add license comment

* Update services/forms/user_form_hidden_comments.go

Co-authored-by: Gusted <williamzijl7@hotmail.com>

* check len == 0

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2022-01-21 18:59:26 +01:00
GiteaBot 6c7084cbee [skip ci] Updated translations via Crowdin 2022-01-21 00:30:19 +00:00
GiteaBot b7c6457648 [skip ci] Updated translations via Crowdin 2022-01-19 21:28:43 +00:00
GiteaBot c68f1281f6 [skip ci] Updated translations via Crowdin 2022-01-19 20:29:22 +00:00
GiteaBot 531b6d60e1 [skip ci] Updated translations via Crowdin 2022-01-19 18:28:18 +00:00
GiteaBot eed8633fb0 [skip ci] Updated translations via Crowdin 2022-01-18 00:31:56 +00:00
GiteaBot bd7680f450 [skip ci] Updated translations via Crowdin 2022-01-17 00:28:33 +00:00
GiteaBot a15353dc00 [skip ci] Updated translations via Crowdin 2022-01-16 00:28:39 +00:00
zeripath d7c2a2951c
Webauthn nits (#18284)
This contains some additional fixes and small nits related to #17957 

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-15 17:52:56 +01:00
Lunny Xiao 35c3553870
Support webauthn (#17957)
Migrate from U2F to Webauthn

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-14 16:03:31 +01:00
GiteaBot 8808293247 [skip ci] Updated translations via Crowdin 2022-01-14 00:29:34 +00:00
GiteaBot ed6757ecdc [skip ci] Updated translations via Crowdin 2022-01-11 00:28:42 +00:00
luzpaz 8c647bf0f6
Fix various typos (#18219)
Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby,te,unknwon`

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-01-10 17:32:37 +08:00
GiteaBot 60b945565d [skip ci] Updated translations via Crowdin 2022-01-10 00:28:05 +00:00
GiteaBot de578bff8c [skip ci] Updated licenses and gitignores 2022-01-09 00:28:45 +00:00
GiteaBot 69a4bd02f0 [skip ci] Updated translations via Crowdin 2022-01-08 00:28:35 +00:00
KN4CK3R e30b20dc68
Show OAuth callback error message (#18185)
* Show callback error message.

* lint

* Use error code to display a message.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-01-07 21:02:09 +00:00
zeripath 21ed4fd8da
Add warning for BIDI characters in page renders and in diffs (#17562)
Fix #17514

Given the comments I've adjusted this somewhat. The numbers of characters detected are increased and include things like the use of U+300 to make à instead of à and non-breaking spaces.

There is a button which can be used to escape the content to show it.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Gwyneth Morgan <gwymor@tilde.club>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-07 02:18:52 +01:00
GiteaBot ee60f27aec [skip ci] Updated translations via Crowdin 2022-01-07 00:28:31 +00:00
KN4CK3R bf7b083cfe
Add replay of webhooks. (#18191) 2022-01-05 15:00:20 -06:00
Lunny Xiao 8760af752a
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 <loic@dachary.org>

* 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 <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Aravinth Manivannan <realaravinth@batsense.net>
2022-01-05 11:37:00 +08:00
GiteaBot 0848c716bf [skip ci] Updated translations via Crowdin 2022-01-04 00:28:34 +00:00
GiteaBot f499f23039 [skip ci] Updated translations via Crowdin 2022-01-03 00:28:34 +00:00
GiteaBot 6a3611cc3d [skip ci] Updated licenses and gitignores 2022-01-02 00:28:42 +00:00
GiteaBot a3d685077f [skip ci] Updated translations via Crowdin 2021-12-31 00:28:31 +00:00
GiteaBot ccb7978538 [skip ci] Updated translations via Crowdin 2021-12-30 00:28:34 +00:00
Gusted e4e3df6c66
Handle invalid issues (#18111)
* Handle invalid issues

- When you hover over a issue reference, and the issue doesn't exist, it
will just hang on the loading animation.
- This patch fixes that by showing them the pop-up with a "Error
occured" message.

* Add I18N

* refactor

* fix comment for lint

* fix unit test for i18n

* fix unit test for i18n

* add comments

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2021-12-28 21:28:27 +08:00