Commit Graph

18673 Commits

Author SHA1 Message Date
5005a2bc18 upd 2025-08-25 09:26:26 +03:00
6960e518b2 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Has been cancelled
2025-08-24 21:39:27 +03:00
c1bbf14517 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 4m22s
2025-08-24 21:34:09 +03:00
5e184cb75a upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 3m54s
2025-08-24 21:26:53 +03:00
e2a4ee3630 upd
All checks were successful
Deploy Gitea Custom / build-and-deploy (push) Successful in 9m14s
2025-08-24 21:06:42 +03:00
9a63355711 upd
All checks were successful
Deploy Gitea Custom / build-and-deploy (push) Successful in 6m10s
2025-08-24 20:48:17 +03:00
c3d33aaf3f upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 9m57s
2025-08-24 20:27:41 +03:00
23f4493af5 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 23s
2025-08-24 20:25:18 +03:00
df1d5a280e upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 7m0s
2025-08-24 20:08:45 +03:00
1277612876 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 47s
2025-08-24 18:59:56 +03:00
0d5b6dd7eb upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 46s
2025-08-24 18:54:50 +03:00
3515722e61 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 48s
2025-08-24 18:46:40 +03:00
61095ea985 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 32s
2025-08-24 18:40:58 +03:00
c277b7adc5 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 34s
2025-08-24 18:37:05 +03:00
08905c9e9b upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 36s
2025-08-24 18:34:26 +03:00
2a53dff66f upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 8m24s
2025-08-24 18:10:17 +03:00
2ab5e8b19e upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 1m37s
2025-08-24 18:01:03 +03:00
fea9472e70 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 2s
2025-08-24 17:53:51 +03:00
f4781244b2 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 2s
2025-08-24 17:52:49 +03:00
50d1d24d04 upd
Some checks are pending
Deploy Gitea Custom / build-and-deploy (push) Waiting to run
2025-08-24 17:50:50 +03:00
1581efebd6 upd
Some checks are pending
Deploy Gitea Custom / build-and-deploy (push) Waiting to run
2025-08-24 17:47:15 +03:00
45edaba7cd upd 2025-08-24 17:36:24 +03:00
9d958d9004 upd 2025-08-24 17:29:12 +03:00
3ff3a33cc3 upd 2025-08-24 17:25:35 +03:00
b59b83bc6a upd 2025-08-24 17:17:20 +03:00
2ec83e03aa upd 2025-08-24 17:14:52 +03:00
9d008a9bff upd 2025-08-24 17:13:15 +03:00
f85a1ef210 try 2025-08-05 12:39:18 +03:00
9a30f5875f try 2025-08-05 12:36:27 +03:00
e32f799066 added deploy gitea need tests and resolve todo 2025-08-04 15:35:38 +03:00
dda8fb0609 some lil updates 2024-11-22 16:28:57 +03:00
Kerwin Bryant
bc7d599030
Fix issues with inconsistent spacing in areas (#32607)
Fix issues with inconsistent spacing in areas where the branch_dropdown
component is used.
before:

![1732238359257](https://github.com/user-attachments/assets/38edda1f-ec4e-419e-9264-68009375d177)

![1732238334410](https://github.com/user-attachments/assets/c4770aea-bc83-477c-9b6a-632f984c0d7d)

after:

![1732238273317](https://github.com/user-attachments/assets/4d05068e-db97-45af-86c4-29442dff1bdf)

![1732238723881](https://github.com/user-attachments/assets/69acd286-f79b-44fe-ad73-2d5fc6dfc98c)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-22 06:12:50 +00:00
wxiaoguang
c4e27cb27b
Refactor markup render system (#32589)
This PR mainly moves some code and introduces `RenderContext.WithXxx`
functions
2024-11-22 05:48:09 +00:00
Kerwin Bryant
81ac8d914c
Style unification for the issue_management area (#32605)
Style unification for the issue_management area (consistent across the
layout

before:

![1732237277916](https://github.com/user-attachments/assets/52a20b2d-d6a4-4118-9cdf-9b377115b7f7)

![1732237288802](https://github.com/user-attachments/assets/05592fe8-cab2-412b-99bc-f0a201c08413)

![1732237299849](https://github.com/user-attachments/assets/8be4a891-c514-4983-bad4-fcc5a7a9d838)

after:

![1732237471086](https://github.com/user-attachments/assets/0bd19ef6-79c1-490a-8ffa-6a42208befd9)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-22 04:33:31 +00:00
Marcell Mars
a3881ffa3d
Enhancing Gitea OAuth2 Provider with Granular Scopes for Resource Access (#32573)
Resolve #31609

This PR was initiated following my personal research to find the
lightest possible Single Sign-On solution for self-hosted setups. The
existing solutions often seemed too enterprise-oriented, involving many
moving parts and services, demanding significant resources while
promising planetary-scale capabilities. Others were adequate in
supporting basic OAuth2 flows but lacked proper user management
features, such as a change password UI.

Gitea hits the sweet spot for me, provided it supports more granular
access permissions for resources under users who accept the OAuth2
application.

This PR aims to introduce granularity in handling user resources as
nonintrusively and simply as possible. It allows third parties to inform
users about their intent to not ask for the full access and instead
request a specific, reduced scope. If the provided scopes are **only**
the typical ones for OIDC/OAuth2—`openid`, `profile`, `email`, and
`groups`—everything remains unchanged (currently full access to user's
resources). Additionally, this PR supports processing scopes already
introduced with [personal
tokens](https://docs.gitea.com/development/oauth2-provider#scopes) (e.g.
`read:user`, `write:issue`, `read:group`, `write:repository`...)

Personal tokens define scopes around specific resources: user info,
repositories, issues, packages, organizations, notifications,
miscellaneous, admin, and activitypub, with access delineated by read
and/or write permissions.

The initial case I wanted to address was to have Gitea act as an OAuth2
Identity Provider. To achieve that, with this PR, I would only add
`openid public-only` to provide access token to the third party to
authenticate the Gitea's user but no further access to the API and users
resources.

Another example: if a third party wanted to interact solely with Issues,
it would need to add `read:user` (for authorization) and
`read:issue`/`write:issue` to manage Issues.

My approach is based on my understanding of how scopes can be utilized,
supported by examples like [Sample Use Cases: Scopes and
Claims](https://auth0.com/docs/get-started/apis/scopes/sample-use-cases-scopes-and-claims)
on auth0.com.

I renamed `CheckOAuthAccessToken` to `GetOAuthAccessTokenScopeAndUserID`
so now it returns AccessTokenScope and user's ID. In the case of
additional scopes in `userIDFromToken` the default `all` would be
reduced to whatever was asked via those scopes. The main difference is
the opportunity to reduce the permissions from `all`, as is currently
the case, to what is provided by the additional scopes described above.

Screenshots:

![Screenshot_20241121_121405](https://github.com/user-attachments/assets/29deaed7-4333-4b02-8898-b822e6f2463e)

![Screenshot_20241121_120211](https://github.com/user-attachments/assets/7a4a4ef7-409c-4116-9d5f-2fe00eb37167)

![Screenshot_20241121_120119](https://github.com/user-attachments/assets/aa52c1a2-212d-4e64-bcdf-7122cee49eb6)

![Screenshot_20241121_120018](https://github.com/user-attachments/assets/9eac318c-e381-4ea9-9e2c-3a3f60319e47)
---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-22 12:06:41 +08:00
Lunny Xiao
a175f9805c
Add line-through for deleted branch on pull request view page (#32500)
Base branch deleted

![图片](https://github.com/user-attachments/assets/bc45aa33-d514-47c8-885a-de9732f2f3d5)

branch deleted comment

![图片](https://github.com/user-attachments/assets/83729bbb-2ee8-4bd3-b6f1-780d2daad3d4)

Head branch deleted

![图片](https://github.com/user-attachments/assets/90120b22-34a9-4387-aae9-5c882e8d421a)
2024-11-21 17:04:18 +00:00
wxiaoguang
a32cfb2a8d
Fix issue sidebar regression (#32598) 2024-11-22 00:38:34 +08:00
wxiaoguang
e90753a712
Fix PR diff review form submit (#32596)
Fix #31622, there is a longstanding bug in #19612, 
it doesn't handle submit event, correctly.
2024-11-21 14:09:16 +00:00
silverwind
675c288811
Fix some typescript issues (#32586)
Fixes around 30 or so typescript errors. No runtime changes.
2024-11-21 13:57:42 +00:00
Lunny Xiao
9bf821ae6c
Fix GetInactiveUsers (#32540)
Fix #31480
2024-11-21 04:55:32 +00:00
Rowan Bohde
9ac74a1a40
disable gravatar in test (#32529)
When running e2e tests on flaky networks, gravatar can cause a timeout
and test failures. Turn off, and populate avatars on e2e test suite run
to make them reliable.
2024-11-21 04:30:48 +00:00
silverwind
d11f8d24b0
Add 'Copy path' button to file view (#32584)
Also adds a tooltip which is replicated to the same button in the diff
box. Fixes: https://github.com/go-gitea/gitea/issues/32583
2024-11-21 04:03:17 +00:00
wxiaoguang
07373f1d5d
Improve issue sidebar UI (#32587)
1. remove duplicate dividers
2. align reviewer items
3. merge & remove unused CSS styles


Before:

<details>


![image](https://github.com/user-attachments/assets/1b3121ee-b5fa-4fe9-b0f2-344d96dc5fbc)


![image](https://github.com/user-attachments/assets/ba8b97e6-114d-488c-adee-48f6c7a3b580)

</details>

After:

<details>


![image](https://github.com/user-attachments/assets/978eab3e-a5d7-4b68-90ce-079b61994d25)


![image](https://github.com/user-attachments/assets/a8b58a27-dd05-4c8d-be60-816439ce77c6)


![image](https://github.com/user-attachments/assets/b7e6a16c-bf98-4465-a805-9f4a642d366e)

</details>
2024-11-21 03:31:54 +00:00
Kerwin Bryant
efb55cd8ef
Supplement and Improvement for #32558 (#32585)
Thank you for @wxiaoguang's reminders and suggestions:
https://github.com/go-gitea/gitea/pull/32558#discussion_r1849972913
2024-11-21 02:42:37 +00:00
a1012112796
23d0f9083e
make search box in issue sidebar dropdown list always show when scrolling (#32576)
as title, replace #31597 after #32460 

---------

Signed-off-by: a1012112796 <1012112796@qq.com>
2024-11-21 09:23:50 +08:00
Lunny Xiao
33850a83fe
Fix submodule parsing (#32571)
Fix #32568, parse `.gitmodules` correctly

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-20 19:26:12 +00:00
Rowan Bohde
407b6e6dfc
allow the actions user to login via the jwt token (#32527)
We have some actions that leverage the Gitea API that began receiving
401 errors, with a message that the user was not found. These actions
use the `ACTIONS_RUNTIME_TOKEN` env var in the actions job to
authenticate with the Gitea API. The format of this env var in actions
jobs changed with go-gitea/gitea/pull/28885 to be a JWT (with a
corresponding update to `act_runner`) Since it was a JWT, the OAuth
parsing logic attempted to parse it as an OAuth token, and would return
user not found, instead of falling back to look up the running task and
assigning it to the actions user.

Make ACTIONS_RUNTIME_TOKEN in action runners could be used,
attempting to parse Oauth JWTs. The code to parse potential old
`ACTION_RUNTIME_TOKEN` was kept in case someone is running an older
version of act_runner that doesn't support the Actions JWT.
2024-11-20 15:24:09 +00:00
Marcell Mars
56bff7ae23
Support HTTP POST requests to /userinfo, aligning to OpenID Core specification (#32578)
This PR adds support for the HTTP POST requests to `/userinfo` endpoint.
While the OpenID Core specification says both are supported and
recommends using HTTP GET.

ref: https://openid.net/specs/openid-connect-core-1_0.html#UserInfo
2024-11-20 14:22:48 +00:00
Kemal Zebari
355889dbc2
Remove duplicate empty repo check in delete branch API (#32569)
Found while working on #32433.

This branch will never be executed because we have would have already
made the same check a couple lines above.
2024-11-20 01:05:06 +00:00
Kerwin Bryant
69268ee19f
Optimize installation-page experience (#32558)
![3000-gogitea-gitea-kiagpwhqbx1 ws-us116 gitpod io_
(1)](https://github.com/user-attachments/assets/7f9ff835-7122-420e-83a9-218a1b9c7030)
Highlight the path of the configuration file with a label-style emphasis
and provide a quick copy button.
2024-11-20 00:39:57 +00:00