0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-04 23:10:38 +02:00

5361 Commits

Author SHA1 Message Date
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
f32e445b27
fix broken hooks 2026-04-02 20:15:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
22170232bb
update repository storage layout as per https://github.com/go-gitea/gitea/issues/1872#issuecomment-3194681583 2026-04-02 20:15:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
a338bfb8b4
sync with main 2026-04-02 20:14:16 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
0c54a0f0d2
update repository storage layout as per https://github.com/go-gitea/gitea/issues/1872#issuecomment-3194681583 2026-04-02 20:13:25 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4625a990ef
refactor: refactor head repo parsing to take into account repo groups 2026-04-02 20:01:15 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
7c18a45f86
fix compilation errors after rebase 2026-04-02 20:01:15 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ea0340933d
fix build errors 2026-04-02 20:01:15 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
8d47d6cdb9
feat: add endpoint to retrieve root-level groups in org 2026-04-02 20:01:14 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2443ea0fd9
add group id to file comparison urls 2026-04-02 20:01:11 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
d2153d4cf1
fix permissions on web issue routes 2026-04-02 20:01:10 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
fb6d5ba817
reorder serv routes 2026-04-02 20:01:08 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
59667c4c6e
add missing serv route 2026-04-02 20:01:08 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
968818bd70
fix go-get import paths 2026-04-02 20:01:07 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
6ba2fc00e8
add team-related routes for repos in subgroups 2026-04-02 20:01:06 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
22081f78a0
fix issue dependency tests 2026-04-02 20:01:06 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c63f7096c2
fix artifact download endpoint urls 2026-04-02 20:01:05 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
79bc3997fe
appease the linter 2026-04-02 20:01:01 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
9e901e50e2
run formatter 2026-04-02 20:01:01 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
d2b13f7749
fix swagger comments in repo adoption routes 2026-04-02 20:01:00 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
61b9442d2e
update calls to GetRepositoryByName to use new signature 2026-04-02 20:01:00 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
d37bbd29d5
ensure visited repo's group owner is the same as the repo's owner, otherwise return 404 2026-04-02 20:00:59 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
f73a9f1086
make it more apparent in URLs that a repo is part of a group 2026-04-02 20:00:58 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
37768f16aa
fix broken hooks 2026-04-02 20:00:58 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
7a8db72e63
update FullName method to show group id if it's non-zero 2026-04-02 20:00:57 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
11ab4445a0
fix optional path segments not working out as planned 2026-04-02 20:00:57 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
211e824ae9
update API routes as well 2026-04-02 20:00:56 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
d1af473553
update repository storage layout as per https://github.com/go-gitea/gitea/issues/1872#issuecomment-3194681583 2026-04-02 20:00:56 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
271b6c7cae
fix build and lint errors 2026-04-02 20:00:54 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ab817e4251
add api routes and functions to get a repository group's subgroups and repos 2026-04-02 20:00:54 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
243ff36900
fix swagger definition references to nonexistent CreateGroupOption 2026-04-02 20:00:54 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
60dc00a165
refactor group creation such that we know the owner ID ahead of time, bailing out if both ownerID and parentGroupID are < 1 2026-04-02 20:00:53 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
52d17c410a
add appropriate swagger definitions 2026-04-02 20:00:53 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4bf17e9b21
move group routes that don't depend on the org path parameter out of the /orgs/{org} route group 2026-04-02 20:00:53 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
923e84d4e5
update AccessibleGroupCondition function to take a minimum perm.AccessMode as a parameter 2026-04-02 20:00:53 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
fd394b6d2c
add doer parameter to MoveGroupItem describing the user trying to move a group 2026-04-02 20:00:52 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
314be8ad26
add api routes and functions for repository groups 2026-04-02 20:00:52 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4ebc1e3da1
reapply changes wiped out by conflict resolution 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
7c2dad2b4c
fix a few more build errors 2026-04-02 20:00:50 -04:00
Lunny Xiao
686d10b7f0
Fix a bug when forking a repository in an organization (#36950)
`CanCreateOrgRepo` should be checked before forking a repository into this organization.

---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-02 15:04:43 -07:00
Navneet
3ffccb8fe5
Redirect to the only OAuth2 provider when no other login methods and fix various problems (#36901)
Fixes: #36846 

1. When there is only on OAuth2 login method, automatically direct to it
2. Fix legacy problems in code, including:
   * Rename template filename and fix TODO comments
   * Fix legacy variable names
   * Add missing SSPI variable for template
   * Fix unnecessary layout, remove garbage styles
* Only do AppUrl(ROOT_URL) check when it is needed (avoid unnecessary
warnings to end users)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-01 12:50:57 +00:00
Nicolas
35b654c9d6
Add webhook name field to improve webhook identification (#37025) (#37040)
Add an optional Name field to webhooks so users can give them
human-readable labels instead of relying only on URLs. The webhook
overview page now displays names when available, or falls back to the
URL for unnamed webhooks.

Fixes #37025

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-01 09:56:20 +08:00
silverwind
e2e8509239
Replace Monaco with CodeMirror (#36764)
- Replace monaco-editor with CodeMirror 6
- Add `--color-syntax-*` CSS variables for all syntax token types,
shared by CodeMirror, Chroma and EasyMDE
- Consolidate chroma CSS into a single theme-independent file
(`modules/chroma.css`)
- Syntax colors in the code editor now match the code view and
light/dark themes
- Code editor is now 12px instead of 14px font size to match code view
and GitHub
- Use a global style for kbd elements
- When editing existing files, focus will be on codemirror instead of
filename input.
- Keyboard shortcuts are roughtly the same as VSCode
- Add a "Find" button, useful for mobile
- Add context menu similar to Monaco
- Add a command palette (Ctrl/Cmd+Shift+P or F1) or via button
- Add clickable URLs via Ctrl/Cmd+click
- Add e2e test for the code editor
- Remove `window.codeEditors` global
- The main missing Monaco features are hover types and semantic rename
but these were not fully working because monaco operated only on single
files and only for JS/TS/HTML/CSS/JSON.

| | Monaco (main) | CodeMirror (cm) | Delta |
|---|---|---|---|
| **Build time** | 7.8s | 5.3s | **-32%** |
| **JS output** | 25 MB | 14 MB | **-44%** |
| **CSS output** | 1.2 MB | 1012 KB | **-17%** |
| **Total (no maps)** | 23.3 MB | 12.1 MB | **-48%** |

Fixes: #36311
Fixes: #14776
Fixes: #12171

<img width="1333" height="555" alt="image"
src="https://github.com/user-attachments/assets/f0fe3a28-1ed9-4f22-bf25-2b161501d7ce"
/>

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2026-03-31 21:50:45 +00:00
wxiaoguang
d288b4529b
Refactor "org teams" page and help new users to "add member" to an org (#37051)
* Fix #22054
* Replace #34593, #27800
* And refactor legacy code, fix various problems

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
2026-03-31 21:30:25 +08:00
wxiaoguang
6ca5573718
Refactor issue sidebar and fix various problems (#37045)
Fix various legacy problems, including:

* Don't create default column when viewing an empty project
* Fix layouts for Windows
* Fix (partially) #15509
* Fix (partially) #17705

The sidebar refactoring: it is a clear partial-reloading approach,
brings better user experiences, and it makes "Multiple projects" /
"Project column on issue sidebar" feature easy to be added.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
2026-03-31 10:03:52 +08:00
silverwind
612ce46cda
Fix theme discovery and Vite dev server in dev mode (#37033)
1. In dev mode, discover themes from source files in
`web_src/css/themes/` instead of AssetFS. In prod, use AssetFS only.
Extract shared `collectThemeFiles` helper to deduplicate theme file
handling.
2. Implement `fs.ReadDirFS` on `LayeredFS` to support theme file
discovery.
3. `IsViteDevMode` now performs an HTTP health check against the vite
dev server instead of only checking the port file exists. Result is
cached with a 1-second TTL.
4. Refactor theme caching from mutex to atomic pointer with time-based
invalidation, allowing themes to refresh when vite dev mode state
changes.
5. Move `ViteDevMiddleware` into `ProtocolMiddlewares` so it applies to
both install and web routes.
6. Show a `ViteDevMode` label in the page footer when vite dev server is
active.
7. Add `/__vite_dev_server_check` endpoint to vite dev server for the
health check.
8. Ensure `.vite` directory exists before writing the dev-port file.
9. Minor CSS fixes: footer gap, navbar mobile alignment.

---
This PR was written with the help of Claude Opus 4.6

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-03-30 14:59:10 +00:00
Myers Carpenter
c31e0cfc1c
Expose content_version for optimistic locking on issue and PR edits (#37035)
- Add `content_version` field to Issue and PullRequest API responses
- Accept optional `content_version` in `PATCH
/repos/{owner}/{repo}/issues/{index}` and `PATCH
/repos/{owner}/{repo}/pulls/{index}` — returns 409 Conflict when stale,
succeeds silently when omitted (backward compatible)
- Pre-check `content_version` before any mutations to prevent partial
writes (e.g. title updated but body rejected)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-03-30 13:44:32 +00:00
Myers Carpenter
2633f9677d
Correct swagger annotations for enums, status codes, and notification state (#37030)
## ⚠️ BREAKING ⚠️

- delete reaction endpoints is changed to return 204 No Content rather
than 200 with no content.

## Summary

Add swagger:enum annotations and migrate all enum comments from the
deprecated comma-separated format to JSON arrays. Introduce
NotifySubjectStateType with open/closed/merged values. Fix delete
reaction endpoints to return 204 instead of 200.
2026-03-30 08:28:48 +08:00
silverwind
0ec66b5380
Migrate from webpack to vite (#37002)
Replace webpack with Vite 8 as the frontend bundler. Frontend build is
around 3-4 times faster than before. Will work on all platforms
including riscv64 (via wasm).

`iife.js` is a classic render-blocking script in `<head>` (handles web
components/early DOM setup). `index.js` is loaded as a `type="module"`
script in the footer. All other JS chunks are also module scripts
(supported in all browsers since 2018).

Entry filenames are content-hashed (e.g. `index.C6Z2MRVQ.js`) and
resolved at runtime via the Vite manifest, eliminating the `?v=` cache
busting (which was unreliable in some scenarios like vscode dev build).

Replaces: https://github.com/go-gitea/gitea/pull/36896
Fixes: https://github.com/go-gitea/gitea/issues/17793
Signed-off-by: silverwind <me@silverwind.io>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-03-29 10:24:30 +00:00
Nicolas
db7eb4d51b
Fix issue label deletion with Actions tokens (#37013)
Use shared repo permission resolution for Actions task users in issue
label remove and clear paths, and add a regression test for deleting
issue labels with a Gitea Actions token.

This fixes issue label deletion when the request is authenticated with a
Gitea Actions token.
Fixes #37011 

The bug was that the delete path re-resolved repository permissions
using the normal user permission helper, which does not handle Actions
task users. As a result, `DELETE
/api/v1/repos/{owner}/{repo}/issues/{index}/labels/{id}` could return
`500` for Actions tokens even though label listing and label addition
worked.

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-03-29 09:21:14 +00:00
silverwind
7492251e7e
Fix relative-time RangeError (#37021)
`navigator.language` can be `undefined` in headless browsers (e.g.
Playwright Firefox), causing `RangeError: invalid language tag:
"undefined"` in `Intl.DateTimeFormat` within the `relative-time` web
component.

Also adds an e2e test that verifies `relative-time` renders correctly
and a shared `assertNoJsError` helper.

Bug is als present in https://github.com/github/relative-time-element
but (incorrectly) masked there.

Fixes: https://github.com/go-gitea/gitea/issues/25324

---------

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-03-28 13:10:51 +00:00