Commit Graph
840 Commits
Author SHA1 Message Date
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ e07ebf71c3 refactor: update tests
use the correct number of arguments when calling certain functions which take a group ID like `RepoPath`
2026-04-02 20:15:25 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2cbb62c302 revert: fixture and test changes
give all existing fixture repos a group id of 0
2026-04-02 20:15:17 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 5014e8f424 revert changes to cases in org_test.go 2026-04-02 20:15:08 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 60df346d4b fix org repo test 2026-04-02 20:15:08 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 0b42d362ea fix more test urls 2026-04-02 20:15:07 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 1e2c410674 fix remaining tests 2026-04-02 20:15:01 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ c2559e033c fix maybeGroupSegment func, run formatter 2026-04-02 20:14:56 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 774e521467 fix integration test api urls 2026-04-02 20:14:51 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 3f4345abf6 update integration test utilities to tage group id as argument 2026-04-02 20:14:23 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 6c08c3d17c fix broken hooks 2026-04-02 20:14:10 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 96de1004e6 update FullName method to show group id if it's non-zero 2026-04-02 20:14:03 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 5abe0c24fa fix optional path segments not working out as planned 2026-04-02 20:13:58 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2a56bfbd64 run formatter 2026-04-02 20:01:15 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 3cb61517a3 feat: add some integration tests 2026-04-02 20:01:14 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 802ca748c8 refactor: update tests
use the correct number of arguments when calling certain functions which take a group ID like `RepoPath`
2026-04-02 20:01:13 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 07d8bd7885 revert: fixture and test changes
give all existing fixture repos a group id of 0
2026-04-02 20:01:13 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 55ca263b89 fix failing tests 2026-04-02 20:01:12 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 09f0464384 revert changes to cases in org_test.go 2026-04-02 20:01:11 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 284b5a4fb5 fix org repo test 2026-04-02 20:01:11 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 209cfd3de6 fix more test urls 2026-04-02 20:01:11 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 139a681f0e fix org test 2026-04-02 20:01:10 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 60fd4472fd more test fixes 2026-04-02 20:01:10 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 8ca136bb80 fix a couple more tests 2026-04-02 20:01:10 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 5966278c9e fix remaining tests 2026-04-02 20:01:09 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 87c0c10a5d fix remaining tests 2026-04-02 20:01:09 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 6e2f41b5b9 fix more tests 2026-04-02 20:01:08 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 41c1e208b9 fix more tests 2026-04-02 20:01:07 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 22081f78a0 fix issue dependency tests 2026-04-02 20:01:06 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 8e799366c6 fix helm package test 2026-04-02 20:01:06 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 32e8a6dfd4 fix maybeGroupSegment func, run formatter 2026-04-02 20:01:05 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ d36d700ee8 add missing copyright 2026-04-02 20:01:05 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ ca46f0ebb2 fix integration test api urls 2026-04-02 20:01:05 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 9e901e50e2 run formatter 2026-04-02 20:01:01 -04:00
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 6f885a149e update integration test utilities to tage group id as argument 2026-04-02 20:01:00 -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 ◦❧ 3bbefda427 fix failing tests ?
i think they're caused by group permissions causing more repos to be returned than before
2026-04-02 20:00:54 -04:00
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
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
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
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
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
daf581fa89 Add tests for pull request's content_version in API (#37044)
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-03-30 17:28:45 +00:00
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 CarpenterandGitHub 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
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
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
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