0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-04 21:06:20 +02:00

20565 Commits

Author SHA1 Message Date
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
7f3e776867
[misc] update avatar utils to handle group avatars 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 ◦❧
4ef0a905de
[models] update GetTeamRepositories to also return repositories accessible via group permissions 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
e2f5ca92ac
[models/conds] update some repo conditions to check for access provided via groups 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
401561784e
[models/conds] add functions returning builders to help find repos matching various group-related conditions 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
e998ea34e4
[models/search-options] add GroupID to SearchRepoOptions 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
987cf89cd3
add group-related url segments to list of reserved usernames 2026-04-02 20:00:47 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
a8da652180
update team_list.go
add `GetUserGroupTeams` function
2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4690164a3f
add file with functions relating to organization teams and repo groups 2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
af1da2447d
add conversion functions for repository groups 2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
55e745a147
update repo_permission.go
change `GetUserRepoPermission` to check for permissions granted/denied by groups
2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
cf712d465c
[models] update repo model
add `GroupID` and `GroupSortOrder` fields
2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
b2f13f5fb1
remove unused parameter from Group.relAvatarLink method 2026-04-02 20:00:46 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
ae4c13529c
update group_unit.go
- export `GetUnitsByGroupID`
- add `GetGroupUnit` function to retrieve a specific unit in a group
- add `GetMaxGroupUnit` function that returns a specific type of group unit with the highest permissions granted
2026-04-02 20:00:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4fc767c815
add new fields and methods to GroupTeam model
- add `CanCreateIn` field, which determines whether a team can create new subgroups or repositories within a group
- add `AccessMode` field that determines a team's general access level to a group (as opposed to a specific unit)
- add `UpdateTeamGroup` function that either updates or adds a `GroupTeam` to the database
- update `HasTeamGroup` to also check that a team's access level is >= `AccessModeRead`
2026-04-02 20:00:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
a35d412491
add UserOrgTeamPermCond function
this returns group ids where a user has permissions greater than or equal to `level`
2026-04-02 20:00:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
608fb4326d
update group model
- add `SortOrder` field to `Group` struct (to allow drag-and-drop reordering to persist across refreshes)
- add method to return `/org/` prefixed url to group
- refactor `FindGroupsByCond` to take `FindGroupOptions` as an argument to be chained to the provided condition
- ensure that found groups are sorted by their `SortOrder` field
- modify `LoadParentGroup` method to immediately return nil if `ParentGroupID` is 0
- add permission-checking utility methods `CanAccess`, `IsOwnedBy`,`CanCreateIn` and `IsAdminOf`
- add `ShortName` method that returns an abbreviated group name
- add `GetGroupByRepoID`
- create `CountGroups` function
- create `UpdateGroupOwnerName` helper function to be called when a user changes their username
- refactor `MoveGroup` to allow moving a group to the "root" level (`ParentGroupID` = 0)
2026-04-02 20:00:45 -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
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
1246721523
add condition and builder functions to be used when searching for groups 2026-04-02 20:00:45 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
c1266b6a6b
register GroupTeam and GroupUnit models 2026-04-02 20:00:44 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
5b1e66c712
refactor subgroup loading, add method to load only groups accessible by a user 2026-04-02 20:00:44 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
5bc2e43f96
add helper functions for dealing with group hierarchies 2026-04-02 20:00:44 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2760a0e29f
add GroupLink method to Group struct 2026-04-02 20:00:44 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2ffbc4d2c0
fix nonexistent variable reference in GetGroupByID function 2026-04-02 20:00:44 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
0ed90f83f9
add FindGroupsByCond helper function 2026-04-02 20:00:43 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
b598db7608
add IsPrivate and Visibility fields to Group struct 2026-04-02 20:00:43 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
22118316ec
rename DisplayName -> FullName for consistency 2026-04-02 20:00:43 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
a575f9390e
add OwnerName field to Group struct 2026-04-02 20:00:43 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
de1ef4df59
add condition and builder functions to be used when searching for groups 2026-04-02 20:00:43 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
5bb8e6e766
add GroupTeam and GroupUnit structs and helpers 2026-04-02 20:00:43 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4328885e9b
add ParentGroup field and related LoadParentGroup method to Group struct 2026-04-02 20:00:42 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
807028a194
add avatar to group 2026-04-02 20:00:42 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
1483e507ad
add Group methods and helper functions 2026-04-02 20:00:42 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
f5db8e64b3
create GroupList type and methods 2026-04-02 20:00:42 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
4655483fb6
add group model 2026-04-02 20:00:42 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
b7dfefe7b3
begin work on base subfeatures 2026-04-02 20:00:42 -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
silverwind
2158cf6e12
Fix NuGet package upload error handling (#37074)
Wrap `zip.NewReader` errors in NuGet `ParsePackageMetaData` and
`ExtractPortablePdb` as `ErrInvalidArgument` so invalid packages return
HTTP 400 (Bad Request) instead of 500 (Internal Server Error).

Add integration test for multipart/form-data NuGet upload path (used by
`dotnet nuget push`) which was previously untested.

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-01 23:54:14 +00:00
silverwind
b53f25a30c
Desaturate dark theme background colors (#37056)
Desaturate all structural grey colors in the dark theme from blue-grey
(H≈210°, S≈12-15%) to near-monochrome (H=220°, S=6%), using `#1e1f20` as
the page background color.

All colors preserve their original HSL lightness values. Semantic colors
(primary accent, named colors, diff, alerts, badges, brand) are
unchanged.

Motivation: The previous blue tint looked bad (kind of green-ish) on
certain screens and I think a near-monochrome color is more neutral
because its closer to being an inversion of the light theme.

Before and after:

<img width="280" alt="Screenshot 2026-04-02 at 00 18 38"
src="https://github.com/user-attachments/assets/544c71b9-fdaf-4222-822c-c5b87bc5b76d"
/>
<img width="280" alt="image"
src="https://github.com/user-attachments/assets/5d6de5d0-05c6-4a49-a649-063da4d136ce"
/>

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-04-02 01:24:52 +02:00
silverwind
3a9cab034b
Update JS dependencies and misc tweaks (#37064)
- Update all JS deps
- Regenerate SVGs
- Add new eslint rules from unicorn
- Update typescript config for 6.0, remove deprecated options in favor
of `strict` with disablements, remove implicit dom libs.
- Set vite log level during `watch-frontend` to `warn` to avoid
confusing URLs or HMR spam from the dev server to keep the log concise.
Overridable via `FRONTEND_DEV_LOG_LEVEL`.

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-04-01 20:15:02 +02: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
ca8c71359c
Show workflow link (#37070)
Add the workflow link to the left list.

Superseeds #31906

---------

Signed-off-by: Nicolas <bircni@icloud.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-01 11:42:41 +00:00
silverwind
47a0d88056
Remove leftover webpackChunkName comments from codeeditor (#37062)
Followup to https://github.com/go-gitea/gitea/pull/36764, forgot to
remove this from the vite migration.

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

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-03-31 21:31:11 -07: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
silverwind
0df3213766
Upgrade go-git to v5.17.2 (#37060)
Upgrades `github.com/go-git/go-git/v5` from v5.16.5 to v5.17.2.

Fixes https://github.com/go-gitea/gitea/security/dependabot/188
Fixes https://github.com/go-gitea/gitea/security/dependabot/187

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

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-03-31 22:21:24 +00: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
Nicolas
4747dd68bd
Update Combine method to treat warnings as failures and adjust tests (#37048)
Treat Commit Status Warnings as errors

> The root problem is that the definition of "warning" are different
across systems.
> 
> * Sometimes, "warning" is treated as "acceptable" (Gitea 1.25)
> * Sometimes, "warning" is mapped from "Result.UNSTABLE", which means
"there are test failures" and it is "failure" in Gitea
> 
> **To avoid breaking existing users, the best choice is to revert the
behavior on Gitea side: treat "warning" as "error".**


https://github.com/go-gitea/gitea/issues/37042#issuecomment-4158231611

fixes https://github.com/go-gitea/gitea/issues/37042

---------

Signed-off-by: Nicolas <bircni@icloud.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-03-31 17:22:18 +00:00
silverwind
e15219d810
Raise minimum Node.js version to 22.18.0 (#37058)
Remove the experimental strip types check and `NODE_VARS` mechanism from
the Makefile, as Node.js 22.18.0+ has native TypeScript type stripping
support.

https://nodejs.org/en/blog/release/v22.18.0 was released 8 months ago
and has now trickled into all major Linux distros like Alpine 3.23+.

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

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-03-31 16:50:51 +00:00
silverwind
d8da91a7f2
Update golangci-lint to v2.11.4 (#37059)
Update golangci-lint from v2.11.2 to v2.11.4 and fix new `modernize`
lint warnings:

- Use `strings.Builder` instead of string concatenation in loop
(`evaluator.go`)
- Use `atomic.Int64` instead of `int64` with atomic free functions
(`logchecker.go`, `timer_test.go`, `integration_test.go`)

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

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-03-31 16:22:23 +00:00