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

2030 Commits

Author SHA1 Message Date
☙◦ 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 ◦❧
d9e9d0bf5a
fix repository renaming 2026-04-02 20:01:07 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
b7014d6542
fix transfers of repos in subgroups 2026-04-02 20:01:04 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c2fc002002
fix moving repos to a different subgroup 2026-04-02 20:01:04 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
9f48e36108
remove references to db.DefaultContext 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 ◦❧
cb1abda26b
add missing group id parameters to test function calls 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 ◦❧
e6ee1a248f
fix bug where a repo's group id and group sort order are zero in API output 2026-04-02 20:00:58 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
84799ee16d
fix moving items to the root-level (GroupID <= 0) 2026-04-02 20:00:58 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4409bf8dec
ensure that repository is moved on disk in MoveGroupItem function 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 ◦❧
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 ◦❧
ba0c7caabb
add AvatarURL field to api groups (in modules/structs package) 2026-04-02 20:00:56 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
57c38a49fb
fix more failing tests 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 ◦❧
52f6c9bc45
fix build errors 2026-04-02 20:00:54 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
8fce091a48
run formatter 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 ◦❧
57e59e6d66
move parameters of the MoveGroup function into a struct, MoveGroupOptions 2026-04-02 20:00:52 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
3bed6a4452
update repo service to check that GroupID is owned by the repo owner when creating a new repository 2026-04-02 20:00:52 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
01dace952d
apply simple linting changes 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
f627e57199
apply simple linting changes 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
47531417e9
add ownership check when moving repository to a new group 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4ebc1e3da1
reapply changes wiped out by conflict resolution 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
fc646e84cd
format files 2026-04-02 20:00:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c84d2277de
fix more build errors 2026-04-02 20:00:50 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ca07e052c1
fix build error caused by changed function name 2026-04-02 20:00:50 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2066f91862
add GroupID field to CreateRepoOptions 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
1f46d46151
add some unit tests for group service 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c934365546
fix no columns found to update error when recalculating group access 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
86d1826527
[services] update MoveGroupItem function to set newPos to the length of the new parent's subgroups/repositories 2026-04-02 20:00:48 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
e7fa8649c4
[services] ensure OwnerName field is updated in groups owned by an org when its name is updated 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
af1da2447d
add conversion functions for repository groups 2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
96feb682fe
changes
* move error-related code for groups to its own file

* update group avatar logic

remove unused/duplicate logic

* update `FindGroupsOptions.ToConds()`

allow passing `-1` as the `ParentGroupID`, meaning "find matching groups regardless of the parent group id"

* add `DedupeBy` function to container module

this removes duplicate items from a slice using a custom function

* add `SliceMap` util

works like javascripts's `Array.prototoype.map`, taking in a slice and transforming each element with the provided function

* add group service

functions included so far:
- avatar uploading/deletion
- group deletion
- group creation
- group moving (including moving item inside a group)
- group update
- team management
  - add team
  - remove team
  - update team permissions
  - recalculating team access (in event of group move)
- group searching (only used in frontend/web components for now)
2026-04-02 20:00:45 -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
silverwind
a20e182067
Update Go dependencies (#36781)
Update all non-locked Go dependencies and pin incompatible ones.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-01 11:26:52 +08: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
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
Nicolas
da51d5af1a
Add support for in_progress event in workflow_run webhook (#36979)
With Gitea 1.25.4 the workflow event for in_progress was not triggered
for Gitea Actions.

Fixes #36906

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 11:12:46 -07: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
Zettat123
8fdd6d1235
Fix missing workflow_run notifications when updating jobs from multiple runs (#36997)
This PR fixes `notifyWorkflowJobStatusUpdate` to send
`WorkflowRunStatusUpdate` for each affected workflow run instead of only
the first run in the input job list.
2026-03-26 19:48:04 +01:00