1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-01-09 15:28:22 -05:00
Commit graph

8707 commits

Author SHA1 Message Date
Lauris BH
ec83b83c74
Merge branch 'master' into graceful-queues 2020-01-05 01:20:52 +02:00
Antoine GIRARD
8b24073713 Only serve attachments when linked to issue/release and if accessible by user (#9340)
* test: add current attachement responses

* refactor: check if attachement is linked and accessible by user

* chore: clean TODO

* fix: typo attachement -> attachment

* revert un-needed go.sum change

* refactor: move models logic to models

* fix TestCreateIssueAttachment which was wrongly successful

* fix unit tests with unittype added

* fix unit tests with changes

* use a valid uuid format for pgsql int. test

* test: add unit test TestLinkedRepository

* refactor: allow uploader to access unlinked attachement

* add missing blank line

* refactor: move to a separate function repo.GetAttachment

* typo

* test: remove err test return

* refactor: use repo perm for access checking generally + 404 for all reject
2020-01-05 01:20:08 +02:00
GiteaBot
6a5a2f493a [skip ci] Updated translations via Crowdin 2020-01-04 22:21:24 +00:00
John Olheiser
fb3a6aba7d Only show sender if it makes sense (#9601)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-01-04 22:20:15 +00:00
GiteaBot
07439d8059 [skip ci] Updated translations via Crowdin 2020-01-04 20:29:45 +00:00
Lauris BH
2b8b0f66ed Add translatable Powered by Gitea text in footer (#9600) 2020-01-04 20:27:19 +00:00
zeripath
8649dfa65e
Update docs/content/doc/advanced/config-cheat-sheet.en-us.md 2020-01-04 18:27:04 +00:00
Andrew Thornton
90eeb1415a
Clean up documentation for queues 2020-01-04 17:23:24 +00:00
Andrew Thornton
c7550a4bdd
No redis host specified not found 2020-01-04 15:47:37 +00:00
Andrew Thornton
e4ddaab70b
Small changes as per @guillep2k 2020-01-04 15:44:28 +00:00
Andrew Thornton
1cb7a86e37
Add warning if number of workers < 0 2020-01-04 15:26:18 +00:00
Andrew Thornton
21b9778119
move unlocking out of setInternal 2020-01-04 15:12:43 +00:00
Andrew Thornton
e852cb620f
As per @guillep2k add mutex locks on shutdown/terminate 2020-01-04 14:59:39 +00:00
6543
ee9b9365be [Docs] Add guide on howto develop API (#9587)
* draft 1

* add suggestions
thanks to @bagasme @techknowlogick @davidsvantesson

* http methods

* use permalinks

* Apply suggestions from code review

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Apply suggestions from code review

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* code format + add to INDEX

Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-04 10:23:40 +08:00
guillep2k
bedd7b2833 Fix error logged when repos qs is empty (#9591)
* Fix error logged when repos qs is empty

* Update routers/user/home.go

Co-Authored-By: Lauris BH <lauris@nix.lv>

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-03 23:39:12 +02:00
GiteaBot
4a768e1c3e [skip ci] Updated translations via Crowdin 2020-01-03 18:44:08 +00:00
Bagas Sanjaya
34c5eee703 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 <davidsvantesson@gmail.com>

* Move template placement to right side of footer

Co-authored-by: David Svantesson <davidsvantesson@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-03 20:41:56 +02:00
David Svantesson
ea707f5a77 Add branch protection option to block merge on requested changes. (#9592)
* Add branch protection option to block merge on requested changes.

* Add migration step

* Fix check to correct negation

* Apply suggestions from code review

Language improvement.

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>

* Copyright year.

Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-03 19:47:09 +02:00
mrsdizzie
b39fab41c8 Some more e-mail notification fixes (#9596)
* Some more e-mail notification fixes

A few more small e-mail notification fixes/changes

* Style footer of notification email to be smaller
* Include text for when pull request is merged
* Don't include original body of issue or PR when merging/closing by
setting issue.Content to "" in these cases

* Set Re: prefix and meessage-ID headers based on actName instead of checking for a
comment. This fixes a bug where certain actions that didn't have a
comment were setting Message-ID instead of In-Reply-To which caused some
mail programs not to show those messages as they would have had the same
Message-ID as a previous message. Also fixes the case where a final
comment and closing message would have been displayed out of order if
you didn't have a copy of the original issue/pr cretion message.

* Update other template footers for consistency
2020-01-03 19:13:22 +02:00
6543
134e3fdf3d [API] dont reqToken on GetReactions (fix #9543) (#9548)
* dont reqToken on GetReactions

* ctx.Repo.CanWrite has ctx.User.IsAdmin in It

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-02 23:27:31 +02:00
John Olheiser
b3c5b4b0d1 Update version in docs (#9588) 2020-01-02 17:53:08 +02:00
GiteaBot
09bf77bc4f [skip ci] Updated translations via Crowdin 2020-01-02 12:18:28 +00:00
6543
4ab072d9c2 Changelog for 1.10.2 (#9586) 2020-01-02 14:15:30 +02:00
6543
5b9283ddfe make sure Poster is loaded (#9583) 2020-01-02 07:54:22 +00:00
John Olheiser
b2b10858c6 Don't auto-init SimpleMDE for review textarea (#9574)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-02 04:02:11 +01:00
6543
9cf7048a6a Dont trigger notification twice on issue assignee change (#9582) 2020-01-02 04:07:15 +02:00
6543
c620eb5b2d Fix #9189 - API Allow only specific Colums to be updated on Issue (#9539)
* dont insert "-1" in any case to issue.poster_id

* Make sure API cant override importand fields

* code format

* fix lint

* WIP test

* add missing poster_id

* fix test

* user.IsGhost handle nil

* CI.restart()

* make sure no -1 is realy added

* CI.restart()

* @lunny suggestion remove some not allowed fields

* seperate issue.LoadMilestone

* load milestone and return it on IssueEdit via API

* extend Test for TestAPIEditIssue

* fix fixtures

* declare allowedColumnsUpdateIssueByAPI only once

* Update Year

* no var just write id drecty into func cal

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-01 17:51:10 -05:00
6543
d1798f77f6 swagger UI: hide iretating search field (#9554) 2020-01-01 18:08:13 +02:00
John Olheiser
a864d61ee6 Add box-shadow to blue buttons in normal theme (#9573)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: techknowlogick <matti@mdranta.net>
2020-01-01 00:06:15 -05:00
John Olheiser
7bdf17ec29 Use limited commits (#9572)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-01-01 11:54:56 +08:00
Flutterlice
8941f7fc01 Fix for a wrong URL in activity page of repository. (Using config url instead of an actual one) (#9571) 2020-01-01 08:54:21 +08:00
mrsdizzie
0989404d2f Update default issue template (#9568)
Some small changes:

* Include text if approve/comment/request changes on PR
* List filename for review comments
* Bold username when mentioned

This will stop empty body messages when approving PR on gitea.com
2019-12-31 21:30:46 +02:00
zeripath
9941ae2966
Update modules/queue/queue_redis.go
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-12-31 18:18:55 +00:00
Andrew Thornton
030b6d91c8
Remove dependency on queue from setting 2019-12-31 18:18:03 +00:00
Andrew Thornton
8798a61ba4
Cancel pool workers when removed 2019-12-31 17:48:26 +00:00
Andrew Thornton
6306cd42bc
Rename queue.Description to queue.ManagedQueue as per @guillep2k 2019-12-31 17:17:07 +00:00
zeripath
a10129f74c
Update modules/queue/queue_disk_channel.go
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-12-31 12:33:33 +00:00
zeripath
402e4dfe96
Update modules/queue/queue_disk.go 2019-12-31 12:27:04 +00:00
zeripath
6c6d3eae76
Update modules/queue/queue_channel.go
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-12-31 12:17:18 +00:00
zeripath
632757bfa7
Update modules/indexer/issues/indexer.go
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-12-31 12:16:39 +00:00
zeripath
a763ccada1
Update modules/indexer/issues/indexer.go
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-12-31 11:39:58 +00:00
6543
9600c27085 [API] Fix 9544 | return 200 when reaction already exist (#9550)
* add ErrReactionAlreadyExist

* extend CreateReaction

* reaction already exist = 200

* extend FindReactionsOptions

* refactor swagger options/definitions

* fix swagger-validate

* Update models/error.go

Co-Authored-By: zeripath <art27@cantab.net>

* fix test PART1

* extend FindReactionsOptions with UserID option

* catch error on test

* fix test PART2

* format ...

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
2019-12-31 03:21:21 -05:00
6543
655aea13a5 update swagger info (#9558) 2019-12-31 12:11:15 +08:00
zeripath
27757714d0 Change markdown rendering from blackfriday to goldmark (#9533)
* Move to goldmark

Markdown rendering moved from blackfriday to the goldmark.

Multiple subtle changes required to the goldmark extensions to keep
current rendering and defaults.

Can go further with goldmark linkify and have this work within markdown
rendering making the link processor unnecessary.

Need to think about how to go about allowing extensions - at present it
seems that these would be hard to do without recompilation.

* linter fixes

Co-authored-by: Lauris BH <lauris@nix.lv>
2019-12-31 03:53:28 +02:00
zeripath
0c07f1de5b Provide Default messages for merges (#9393)
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-12-30 18:34:11 -05:00
Andrew Thornton
4d8b8ed02e
Merge branch 'master' into graceful-queues 2019-12-30 18:39:25 +00:00
Andrew Thornton
b1c9fa7f1a
Add MaxWorker settings to queues 2019-12-30 18:38:59 +00:00
Andrew Thornton
a492b3071c
Prevent deadlock during early shutdown of issue indexer 2019-12-30 18:38:58 +00:00
Andrew Thornton
1fb9104009
Queue: Allow Redis to connect to unix 2019-12-30 18:38:57 +00:00
Andrew Thornton
1013ced326
Fix test 2019-12-30 18:38:57 +00:00