0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-05 12:05:18 +02:00

4584 Commits

Author SHA1 Message Date
☙◦ 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 ◦❧
3711d573e6
fix deadlock caused by differing contexts when retrieving group ancestry with ParentGroupCond/GetParentGroupChain when using a sqlite db 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
5472587c3a
add test fixtures 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
eb402b94d5
add missing nil check before IsErrGroupNotExist call 2026-04-02 20:00:49 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
f3199df895
add UpdateGroup function 2026-04-02 20:00:48 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
11b5e75b92
remove unused/redundant IsPrivate field from Group struct 2026-04-02 20:00:48 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
69a36a32e9
fix bug where all repos are returned even when opts.GroupID == 0 2026-04-02 20:00:48 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
eaee8f07b1
fix duplicate teams being returned by GetTeamsWithAccessToGroup 2026-04-02 20:00:48 -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 ◦❧
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
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
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
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
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
Ross Golder
487e357ce6
Optimize 'refreshAccesses' to perform update without removing then adding (#35702)
- Optimize refreshAccesses with cross-comparison to minimize DB operations
- Fix db.Find syntax in refreshAccesses optimization
- Add test for refreshAccesses update path and fix db.Find syntax

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-03-29 00:34:17 +08:00
ChristopherHX
bc5c554072
Feature non-zipped actions artifacts (action v7) (#36786)
- content_encoding contains a slash => v4 artifact
- updated proto files to support mime_type and no longer return errors for upload-artifact v7
- json and txt files are now previewed in browser
- normalized content-disposition header creation
- azure blob storage uploads directly in servedirect mode (no proxying data)
- normalize content-disposition headers based on go mime package
  - getting both filename and filename* encoding is done via custom code

Closes #36829

-----

Signed-off-by: ChristopherHX <christopher.homberger@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-03-26 00:37:48 +08:00
wxiaoguang
4f9f0fc4b8
Fix various trivial problems (#36953)
1. remove `TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY`
* it defaults to false and is unlikely to be useful for most users (see
#22130)
* with new git versions (>= 2.40), "merge-tree" is used,
"checkConflictsByTmpRepo" isn't called, the option does nothing.
2. fix fragile `db.Cell2Int64` (new: `CellToInt`)
3. allow more routes in maintenance mode (e.g.: captcha)
4. fix MockLocale html escaping to make it have the same behavior as
production locale
2026-03-23 18:23:42 +00:00
silverwind
ef88cdb7e7
Add DEFAULT_DELETE_BRANCH_AFTER_MERGE setting (#36917)
Add this config option, applying to new repos:

```ini
[repository.pull-request]
DEFAULT_DELETE_BRANCH_AFTER_MERGE = true
```

Defaults to `false`, preserving current behavior.

---------

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-03-23 17:34:45 +00:00
Nicolas
4ba90207cf
Add user badges (#36752)
Implemented #29798

This feature implements list badges, create new badges, view badge, edit
badge and assign badge to users.

- List all badges
![(screenshot)](https://github.com/user-attachments/assets/9dbf243e-c704-49f8-915a-73704e226da9)
- Create new badges
![(screenshot)](https://github.com/user-attachments/assets/8a3fff7e-fe6f-49b0-a7c5-bbba34478019)
- View badge
![(screenshot)](https://github.com/user-attachments/assets/dd7a882b-6e2c-47d2-93e0-05a2698a41e5)
![(screenshot)](https://private-user-images.githubusercontent.com/75789103/558982759-53536300-e189-406b-8b0e-824e1a768b92.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQxOTMyMjUsIm5iZiI6MTc3NDE5MjkyNSwicGF0aCI6Ii83NTc4OTEwMy81NTg5ODI3NTktNTM1MzYzMDAtZTE4OS00MDZiLThiMGUtODI0ZTFhNzY4YjkyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzIyVDE1MjIwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUxNjQ5ZDUyMGVlNWRmODg1OGUyN2NiOWI3YTAxODhiMjRhM2U1OGQ1NWMwNjQ0MTBmNTRjNTBjYjIzN2ExMWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4aAfpFaziiXDG7W2HaNJop0B62-NR4f0Ni9YNjTZq0M)
- Edit badge
![(screenshot)](https://github.com/user-attachments/assets/7124671a-ed97-4c98-ac7d-34863377fa62)
- Add user to badge
![(screenshot)](https://github.com/user-attachments/assets/3438b492-0197-4acb-b9f2-2f9f7c80582e)
2026-03-22 15:49:45 +00:00