2109 Commits (085f717529008c31b147f76ea7eeaf06ca8801bd)

Author SHA1 Message Date
kolaente 085f717529
feat: notify doers of a merge when automerging (#21553)
I found myself wondering whether a PR I scheduled for automerge was
actually merged. It was, but I didn't receive a mail notification for it
- that makes sense considering I am the doer and usually don't want to
receive such notifications. But ideally I want to receive a notification
when a PR was merged because I scheduled it for automerge.

This PR implements exactly that.

The implementation works, but I wonder if there's a way to avoid passing
the "This PR was automerged" state down so much. I tried solving this
via the database (checking if there's an automerge scheduled for this PR
when sending the notification) but that did not work reliably, probably
because sending the notification happens async and the entry might have
already been deleted. My implementation might be the most
straightforward but maybe not the most elegant.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
Lunny Xiao 44cc684a50 [skip ci] Updated translations via Crowdin 2 years ago
Gusted 4827f42f56 [skip ci] Updated translations via Crowdin 2 years ago
Gusted c2d2323fc8
Configure update checker on installation page (#21655)
- I recently became aware that this was enabled by-default, I don't
necessary agree with that and this should rather be configured by the
user(this patch does that on the installation page) as it connects to a
homeserver, which I'd prefer to avoid on my instance.


![image](https://user-images.githubusercontent.com/25481501/199260613-a77a1b10-347a-4542-8982-9b9b24dad28c.png)
2 years ago
KN4CK3R 9b3e2c5450 [skip ci] Updated translations via Crowdin 2 years ago
KN4CK3R d33b2d473c [skip ci] Updated licenses and gitignores 2 years ago
Jason Song 434622ab6f [skip ci] Updated translations via Crowdin 2 years ago
mpeter50 2cc7408b98 [skip ci] Updated translations via Crowdin 2 years ago
qwerty287 096aed5c1d [skip ci] Updated translations via Crowdin 2 years ago
techknowlogick 49a4e4555a [skip ci] Updated translations via Crowdin 2 years ago
Yarden Shoham 3bd05172d5 [skip ci] Updated translations via Crowdin 2 years ago
M Hickford 191a74d622
Record OAuth client type at registration (#21316)
The OAuth spec [defines two types of
client](https://datatracker.ietf.org/doc/html/rfc6749#section-2.1),
confidential and public. Previously Gitea assumed all clients to be
confidential.

> OAuth defines two client types, based on their ability to authenticate
securely with the authorization server (i.e., ability to
>   maintain the confidentiality of their client credentials):
>
>   confidential
> Clients capable of maintaining the confidentiality of their
credentials (e.g., client implemented on a secure server with
> restricted access to the client credentials), or capable of secure
client authentication using other means.
>
>   **public
> Clients incapable of maintaining the confidentiality of their
credentials (e.g., clients executing on the device used by the resource
owner, such as an installed native application or a web browser-based
application), and incapable of secure client authentication via any
other means.**
>
> The client type designation is based on the authorization server's
definition of secure authentication and its acceptable exposure levels
of client credentials. The authorization server SHOULD NOT make
assumptions about the client type.

 https://datatracker.ietf.org/doc/html/rfc8252#section-8.4

> Authorization servers MUST record the client type in the client
registration details in order to identify and process requests
accordingly.

Require PKCE for public clients:
https://datatracker.ietf.org/doc/html/rfc8252#section-8.1

> Authorization servers SHOULD reject authorization requests from native
apps that don't use PKCE by returning an error message

Fixes #21299

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
KN4CK3R 876ee8c3cd
Allow package version sorting (#21453) 2 years ago
Vladimir Yakovlev da3b657c45 [skip ci] Updated translations via Crowdin 2 years ago
KN4CK3R 99597dd76a [skip ci] Updated translations via Crowdin 2 years ago
KN4CK3R c3b2e44392
Add team member invite by email (#20307)
Allows to add (not registered) team members by email.

related #5353

Invite by mail:

![grafik](https://user-images.githubusercontent.com/1666336/178154779-adcc547f-c0b7-4a2a-a131-4e41a3d9d3ad.png)

Pending invitations:

![grafik](https://user-images.githubusercontent.com/1666336/178154882-9d739bb8-2b04-46c1-a025-c1f4be26af98.png)

Email:

![grafik](https://user-images.githubusercontent.com/1666336/178164716-f2f90893-7ba6-4a5e-a3db-42538a660258.png)

Join form:

![grafik](https://user-images.githubusercontent.com/1666336/178154840-aaab983a-d922-4414-b01a-9b1a19c5cef7.png)

Co-authored-by: Jack Hay <jjphay@gmail.com>
2 years ago
wxiaoguang 522dfd5425 [skip ci] Updated translations via Crowdin 2 years ago
KN4CK3R ea08559045 [skip ci] Updated translations via Crowdin 2 years ago
Lunny Xiao 683c9af89f [skip ci] Updated translations via Crowdin 2 years ago
Lunny Xiao f860a6d2e4
Add system setting table with cache and also add cache supports for user setting (#18058) 2 years ago
silverwind e2727b73a3 [skip ci] Updated translations via Crowdin 2 years ago
Yarden Shoham 7917123209 [skip ci] Updated translations via Crowdin 2 years ago
Yarden Shoham cda2c38f4a [skip ci] Updated translations via Crowdin 2 years ago
kolaente e026459a2d [skip ci] Updated translations via Crowdin 2 years ago
Lauris BH b59b0cad0a
Add user/organization code search (#19977)
Fixes #19925 

Screenshots:

![attels](https://user-images.githubusercontent.com/165205/173864718-fe789429-55bc-4cad-808c-9f02f335cddf.png)
2 years ago
Yarden Shoham 083ac164dc
Fix missing left and right carets in TRANSLATORS (#21397) 2 years ago
Jason Song 274523baf4 [skip ci] Updated translations via Crowdin 2 years ago
techknowlogick af849ac009 [skip ci] Updated translations via Crowdin 2 years ago
qwerty287 edfba99f11 [skip ci] Updated translations via Crowdin 2 years ago
qwerty287 08609d439d
Add pages to view watched repos and subscribed issues/PRs (#17156)
Adds GitHub-like pages to view watched repos and subscribed issues/PRs
This is my second try to fix this, but it is better than the first since
it doesn't uses a filter option which could be slow when accessing
`/issues` or `/pulls` and it shows both pulls and issues (the first try
is #17053).

Closes #16111 
Replaces and closes #17053


![Screenshot](https://user-images.githubusercontent.com/80460567/134782937-3112f7da-425a-45b6-9511-5c9695aee896.png)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years ago
M Hickford 78c15dabf3 [skip ci] Updated translations via Crowdin 2 years ago
Wim 889a41c6a8
Do not allow organisation owners add themselves as collaborator (#20043)
We're already checking for repo owners, but we also need to check for
organisation owners that try to add themselves as collaborator

Closes #17966
2 years ago
Tyrone Yeh 525751243e [skip ci] Updated translations via Crowdin 2 years ago
Julien Palard 2649e7ffbd [skip ci] Updated translations via Crowdin 2 years ago
wxiaoguang c4742fbea3 [skip ci] Updated licenses and gitignores 2 years ago
Tyrone Yeh da0a9ec811 [skip ci] Updated translations via Crowdin 2 years ago
KN4CK3R 301d84e83a [skip ci] Updated translations via Crowdin 2 years ago
silverwind bdc4c4c379 [skip ci] Updated translations via Crowdin 2 years ago
KN4CK3R ef40324c43
Display image digest for container packages (#21170)
fixes #21160
2 years ago
JakobDev fe73246cf9 [skip ci] Updated translations via Crowdin 2 years ago
silverwind 77c916f6d9 [skip ci] Updated licenses and gitignores 2 years ago
silverwind 754861a020 [skip ci] Updated translations via Crowdin 2 years ago
Tyrone Yeh 619eed913c [skip ci] Updated translations via Crowdin 2 years ago
luzpaz cb3b3e519f
Fix various typos (#21103)
Found via `codespell -q 3 -S
./options/locale,./options/license,./public/vendor,./web_src/fomantic -L
actived,allways,attachements,ba,befores,commiter,pullrequest,pullrequests,readby,splitted,te,unknwon`

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2 years ago
Kyle D 7006d8297d [skip ci] Updated translations via Crowdin 2 years ago
silverwind 795bd946e2 [skip ci] Updated translations via Crowdin 2 years ago
Aaron F 0232601734 [skip ci] Updated translations via Crowdin 2 years ago
Aaron F 3963625b6e
Webhook for Wiki changes (#20219)
Add support for triggering webhook notifications on wiki changes.

This PR contains frontend and backend for webhook notifications on wiki actions (create a new page, rename a page, edit a page and delete a page). The frontend got a new checkbox under the Custom Event -> Repository Events section. There is only one checkbox for create/edit/rename/delete actions, because it makes no sense to separate it and others like releases or packages follow the same schema.

![image](https://user-images.githubusercontent.com/121972/177018803-26851196-831f-4fde-9a4c-9e639b0e0d6b.png)

The actions itself are separated, so that different notifications will be executed (with the "action" field). All the webhook receivers implement the new interface method (Wiki) and the corresponding tests.

When implementing this, I encounter a little bug on editing a wiki page. Creating and editing a wiki page is technically the same action and will be handled by the ```updateWikiPage``` function. But the function need to know if it is a new wiki page or just a change. This distinction is done by the ```action``` parameter, but this will not be sent by the frontend (on form submit). This PR will fix this by adding the ```action``` parameter with the values ```_new``` or ```_edit```, which will be used by the ```updateWikiPage``` function.

I've done integration tests with matrix and gitea (http).

![image](https://user-images.githubusercontent.com/121972/177018795-eb5cdc01-9ba3-483e-a6b7-ed0e313a71fb.png)

Fix #16457

Signed-off-by: Aaron Fischer <mail@aaron-fischer.net>
2 years ago
silverwind 0887459ac6 [skip ci] Updated licenses and gitignores 2 years ago
JakobDev 18046eb91e [skip ci] Updated translations via Crowdin 2 years ago