Commit Graph

20198 Commits

Author SHA1 Message Date
5d0a9f64e5 Update actions-proto-go to v0.5.1
Some checks are pending
Build and Release / Lint and Test (push) Waiting to run
Build and Release / Build Binaries (amd64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, linux) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, windows) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, linux) (push) Blocked by required conditions
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 05:01:23 -05:00
fbd5da0acb Add AI-friendly enhancements: runner capabilities, release archive, action compatibility
Some checks are pending
Build and Release / Lint and Test (push) Waiting to run
Build and Release / Build Binaries (amd64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, linux) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, windows) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, linux) (push) Blocked by required conditions
- Add runner capability discovery API (v2) for AI tools to query before writing workflows
- Add release archive feature with filter toggle UI
- Add GitHub Actions compatibility layer with action aliasing
- Store runner capabilities JSON from act_runner Declare calls
- Add migrations for release archive and runner capabilities fields

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 04:56:11 -05:00
1ad0368230 fix: replace unsupported artifact actions with direct release uploads
All checks were successful
Build and Release / Lint and Test (push) Successful in 7m57s
Build and Release / Build Binaries (amd64, windows) (push) Successful in 1m15s
Build and Release / Build Binaries (arm64, darwin) (push) Successful in 1m21s
Build and Release / Build Binaries (amd64, darwin) (push) Successful in 3m26s
Build and Release / Build Binaries (arm64, linux) (push) Successful in 1m6s
Build and Release / Build Binaries (amd64, linux) (push) Successful in 2m58s
- Remove actions/upload-artifact@v4 (not supported on Gitea Actions)
- Remove actions/download-artifact@v4 (not supported on Gitea Actions)
- Remove separate release job (no longer needed)
- Remove disabled Docker job
- Each build matrix job now uploads directly to release via Gitea API
- Adds delete-existing-asset logic before uploading

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v1.26.0
2026-01-10 04:10:17 -05:00
f23347a26e fix(ci): disable Docker job, runner doesn't have Docker
Some checks failed
Build and Release / Lint and Test (push) Successful in 7m4s
Build and Release / Build Binaries (amd64, darwin) (push) Failing after 1m47s
Build and Release / Build Binaries (amd64, windows) (push) Failing after 1m21s
Build and Release / Build Docker Image (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin) (push) Failing after 1m23s
Build and Release / Build Binaries (amd64, linux) (push) Failing after 2m47s
Build and Release / Build Binaries (arm64, linux) (push) Failing after 1m52s
Build and Release / Create Release (push) Has been skipped
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 03:26:33 -05:00
51d89a676d fix(ci): allow root for tests, set TAGS for bindata generation
- Set GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT=true for tests
- Set TAGS=bindata when running make generate

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 03:26:02 -05:00
2704d8dd10 fix(ci): add make generate step for bindata
Some checks failed
Build and Release / Lint and Test (push) Successful in 4m41s
Build and Release / Build Binaries (amd64, linux) (push) Failing after 1m17s
Build and Release / Build Binaries (arm64, darwin) (push) Failing after 1m22s
Build and Release / Build Docker Image (push) Failing after 15s
Build and Release / Build Binaries (arm64, linux) (push) Failing after 1m4s
Build and Release / Build Binaries (amd64, darwin) (push) Failing after 2m37s
Build and Release / Build Binaries (amd64, windows) (push) Failing after 2m39s
Build and Release / Create Release (push) Has been skipped
The bindata files must be generated after frontend build
before compiling with bindata tags.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 02:28:41 -05:00
3652f34234 fix(ci): replace GitHub-specific action with Gitea API
Some checks failed
Build and Release / Create Release (push) Blocked by required conditions
Build and Release / Lint and Test (push) Successful in 42m11s
Build and Release / Build Docker Image (push) Failing after 17s
Build and Release / Build Binaries (arm64, darwin) (push) Failing after 1m22s
Build and Release / Build Binaries (amd64, darwin) (push) Has been cancelled
Build and Release / Build Binaries (amd64, linux) (push) Has been cancelled
Build and Release / Build Binaries (amd64, windows) (push) Has been cancelled
Build and Release / Build Binaries (arm64, linux) (push) Has been cancelled
softprops/action-gh-release doesn't work on Gitea Actions.
Use direct Gitea API calls for creating releases and uploading assets.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 01:44:29 -05:00
aa3f249dbb chore: increase golangci-lint timeout to 30m
Some checks failed
Build and Release / Lint and Test (push) Successful in 43m55s
Build and Release / Build Binaries (amd64, darwin) (push) Failing after 3m30s
Build and Release / Build Binaries (arm64, darwin) (push) Failing after 2m18s
Build and Release / Build Docker Image (push) Failing after 16s
Build and Release / Build Binaries (arm64, linux) (push) Failing after 2m8s
Build and Release / Build Binaries (amd64, linux) (push) Failing after 15m40s
Build and Release / Build Binaries (amd64, windows) (push) Failing after 15m40s
Build and Release / Create Release (push) Has been skipped
The 10m timeout was insufficient for CI runs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 18:33:36 -05:00
778f4dff1f fix: use WaitGroup.Go() for modernize linter
Some checks failed
Build and Release / Lint and Test (push) Successful in 19m14s
Build and Release / Build Binaries (amd64, windows) (push) Has been cancelled
Build and Release / Build Binaries (arm64, darwin) (push) Has been cancelled
Build and Release / Build Binaries (arm64, linux) (push) Has been cancelled
Build and Release / Build Docker Image (push) Has been cancelled
Build and Release / Create Release (push) Has been cancelled
Build and Release / Build Binaries (amd64, linux) (push) Has been cancelled
Build and Release / Build Binaries (amd64, darwin) (push) Has been cancelled
Replace wg.Add(1)/go func()/defer wg.Done() pattern with
the simpler wg.Go() method as required by the modernize linter.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 18:11:52 -05:00
4d1d81e8b3 fix: resolve all remaining golangci-lint errors
Some checks failed
Build and Release / Build Binaries (arm64, linux) (push) Blocked by required conditions
Build and Release / Build Docker Image (push) Blocked by required conditions
Build and Release / Create Release (push) Blocked by required conditions
Build and Release / Lint and Test (push) Successful in 9m45s
Build and Release / Build Binaries (amd64, linux) (push) Has been cancelled
Build and Release / Build Binaries (arm64, darwin) (push) Has been cancelled
Build and Release / Build Binaries (amd64, windows) (push) Has been cancelled
Build and Release / Build Binaries (amd64, darwin) (push) Has been cancelled
- Replace fmt.Errorf with errors.New where no formatting needed
- Use slices.Sort instead of sort.Slice
- Use slices.Contains instead of manual loops
- Use strings.Cut/bytes.Cut instead of Index functions
- Use min() builtin instead of if statements
- Use range over int for iteration
- Replace interface{} with any
- Use strconv.FormatInt instead of fmt.Sprintf
- Fix gofumpt formatting (extra rules)
- Add SDK exclusions to .golangci.yml for standalone SDK package
- Check errors on ctx.Resp.Write calls
- Remove unused struct fields
- Remove unused function parameters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 18:00:44 -05:00
7e037935cc fix: resolve remaining golangci-lint errors (batch 3)
- modules/pages/config.go: use slices.Contains for template validation
- modules/webhook/retry.go: use slices.Contains for retryable status codes
- routers/api/v1/org/profile.go: extract helper to remove duplicate code
- cmd/gitea-cli/cmd/upload.go: apply gofumpt formatting, add nolint directive for waitgroup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:53:59 -05:00
58a3cb17e8 fix: resolve golangci-lint errors (batch 2)
- modules/operations: use modules/json, maps.Copy
- modules/circuitbreaker: use omitzero
- modules/structs: fix VerifiedAt omitzero tag
- routers/api/v1/repo: update VerifiedAt field name

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:48:40 -05:00
81bb23f0da fix: resolve golangci-lint errors (batch 1)
- cmd/gitea-cli: fix errcheck, perfsprint, use modules/json, http constants
- models/migrations: remove unused nolint directive
- models/organization: interface{} -> any
- modules/health: rename HealthResponse -> Response to avoid stutter
- modules/idempotency: use modules/json, fix errcheck, rename IdempotencyInfo -> Info
- modules/structs: fix Verified_At naming, use omitzero

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:46:44 -05:00
9d7fab06d6 ci: detect existing Go/Node.js/pnpm before setup
Some checks failed
Build and Release / Lint and Test (push) Successful in 2m35s
Build and Release / Build Binaries (arm64, darwin) (push) Failing after 2m4s
Build and Release / Build Binaries (amd64, linux) (push) Failing after 2m24s
Build and Release / Build Docker Image (push) Failing after 17s
Build and Release / Build Binaries (arm64, linux) (push) Failing after 1m14s
Build and Release / Build Binaries (amd64, darwin) (push) Failing after 6m59s
Build and Release / Build Binaries (amd64, windows) (push) Failing after 6m58s
Build and Release / Create Release (push) Has been skipped
Skip setup actions when tools are already installed on the runner.
This prevents forcing specific versions when the correct versions
are already available.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:47:54 -05:00
5bb06851b8 fix: use Go 1.25 in CI workflows
Some checks failed
Build and Release / Lint and Test (push) Successful in 23m20s
Build and Release / Build Binaries (amd64, windows) (push) Failing after 1m41s
Build and Release / Build Binaries (amd64, darwin) (push) Failing after 2m19s
Build and Release / Build Docker Image (push) Failing after 50s
Build and Release / Build Binaries (arm64, linux) (push) Failing after 2m5s
Build and Release / Build Binaries (amd64, linux) (push) Failing after 8m5s
Build and Release / Build Binaries (arm64, darwin) (push) Failing after 8m3s
Build and Release / Create Release (push) Has been skipped
Updated GO_VERSION from 1.23 to 1.25 in both build.yml and pr-checks.yml.
Reverted Makefile lint targets to use default settings since Go 1.25
supports GOEXPERIMENT=jsonv2.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:43:06 -05:00
734a15cee9 fix: unset GOEXPERIMENT for linter compatibility
Some checks failed
Build and Release / Build Binaries (amd64, darwin) (push) Has been cancelled
Build and Release / Build Binaries (amd64, linux) (push) Has been cancelled
Build and Release / Build Binaries (amd64, windows) (push) Has been cancelled
Build and Release / Build Binaries (arm64, darwin) (push) Has been cancelled
Build and Release / Build Binaries (arm64, linux) (push) Has been cancelled
Build and Release / Build Docker Image (push) Has been cancelled
Build and Release / Create Release (push) Has been cancelled
Build and Release / Lint and Test (push) Has been cancelled
The jsonv2 experiment may not be available in all Go versions.
Unset GOEXPERIMENT along with GOTOOLCHAIN=local for the linter.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:33:32 -05:00
ee6daa73b4 fix: use GOTOOLCHAIN=local for linter to use installed Go 1.25
Some checks failed
Build and Release / Build Binaries (amd64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, linux) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, windows) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, linux) (push) Blocked by required conditions
Build and Release / Build Docker Image (push) Blocked by required conditions
Build and Release / Create Release (push) Blocked by required conditions
Build and Release / Lint and Test (push) Has been cancelled
Forces golangci-lint to use the locally installed Go version instead
of downloading Go 1.24.x, which avoids GOEXPERIMENT compatibility issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:32:18 -05:00
a47076a10c fix: unset GOEXPERIMENT for golangci-lint
Some checks failed
Build and Release / Build Binaries (amd64, windows) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, linux) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, linux) (push) Blocked by required conditions
Build and Release / Build Docker Image (push) Blocked by required conditions
Build and Release / Create Release (push) Blocked by required conditions
Build and Release / Lint and Test (push) Has been cancelled
golangci-lint v2.7.2 downloads Go 1.24.x which doesn't support
GOEXPERIMENT=jsonv2 (only Go 1.25+ does). Unset GOEXPERIMENT
when running the linter to avoid this incompatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:30:45 -05:00
74c6389454 style: fix gofmt formatting across codebase
Some checks failed
Build and Release / Build Binaries (amd64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, linux) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, windows) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, linux) (push) Blocked by required conditions
Build and Release / Build Docker Image (push) Blocked by required conditions
Build and Release / Create Release (push) Blocked by required conditions
Build and Release / Lint and Test (push) Has been cancelled
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 15:51:36 -05:00
dfc94f6408 fix: resolve all golangci-lint errors in v2 API
Some checks failed
Build and Release / Build Binaries (amd64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, linux) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, windows) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, linux) (push) Blocked by required conditions
Build and Release / Build Docker Image (push) Blocked by required conditions
Build and Release / Create Release (push) Blocked by required conditions
Build and Release / Lint and Test (push) Has been cancelled
- Replace encoding/json with modules/json (depguard)
- Add error handling for json.Unmarshal and WriteItem calls (errcheck)
- Use slices.Contains instead of manual loops (modernize)
- Use any instead of interface{} (modernize)
- Use min/max built-in functions (modernize)
- Use strings.FieldsSeq and strings.SplitSeq (modernize)
- Use range over int for loops (modernize)
- Use http.MethodOptions constant (usestdlibvars)
- Use tagged switch statements (staticcheck)
- Use += and /= operators (gocritic)
- Fix gofumpt formatting issues
- Remove unused streamLargeFile function
- Remove unused primaryLang parameter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 15:49:52 -05:00
ee5cf4e4fd fix: resolve build errors in v2 API and wiki service
Some checks failed
Build and Release / Lint and Test (push) Successful in 2m57s
Build and Release / Build Binaries (amd64, darwin) (push) Failing after 54s
Build and Release / Build Binaries (amd64, linux) (push) Failing after 1m26s
Build and Release / Build Binaries (amd64, windows) (push) Failing after 1m16s
Build and Release / Build Binaries (arm64, darwin) (push) Failing after 1m20s
Build and Release / Build Docker Image (push) Failing after 16s
Build and Release / Build Binaries (arm64, linux) (push) Failing after 1m14s
Build and Release / Create Release (push) Has been skipped
- Fix wiki_index.go: use WebPathToGitPath/GitPathToWebPath instead of undefined functions
- Fix wiki_index.go: use gitrepo.OpenRepository pattern instead of repo.WikiPath()
- Fix wiki.go: use markdown.Render instead of undefined RenderWiki
- Fix wiki.go: use charset.ToUTF8WithFallbackReader instead of undefined ToUTF8Reader
- Fix wiki.go: use gitrepo.CommitsCount instead of undefined wikiRepo.CommitsCount
- Fix wiki.go: handle WebPathToUserTitle returning two values
- Fix gofmt formatting issues in v2 API files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 15:30:43 -05:00
b8b276fa05 docs: comprehensive testing guide covering all 5 phases
Some checks failed
Build and Release / Lint and Test (push) Successful in 4m46s
Build and Release / Build Binaries (amd64, linux) (push) Failing after 42s
Build and Release / Build Binaries (amd64, darwin) (push) Has been cancelled
Build and Release / Build Binaries (amd64, windows) (push) Has been cancelled
Build and Release / Build Binaries (arm64, darwin) (push) Has been cancelled
Build and Release / Create Release (push) Has been cancelled
Build and Release / Build Binaries (arm64, linux) (push) Has been cancelled
Build and Release / Build Docker Image (push) Has been cancelled
Updated testing guide now covers:

Phase 1: API Reliability
- Request ID tracing
- Rate limit headers
- Chunk checksum verification
- RFC 7807 error responses

Phase 2: V2 API
- V2 framework
- Scalar docs
- Batch operations
- NDJSON streaming
- AI context endpoints

Phase 3: Reliability Patterns
- Operation progress (SSE)
- Idempotency middleware
- Webhook retry
- Circuit breaker

Phase 4: SDK & CLI
- gitea-cli tool
- Go, Python, TypeScript, C#, Java SDKs

Phase 5: New Features
- Organization pinned repos
- Public members
- Gitea Pages (4 templates)
- Wiki V2 API

Also includes:
- Complete smoke test script
- Regression testing checklist
- Rollback plan

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 15:24:40 -05:00
076f142b7d docs: add comprehensive testing guide for v1.26.0
Some checks failed
Build and Release / Build Binaries (amd64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, linux) (push) Blocked by required conditions
Build and Release / Build Binaries (amd64, windows) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, darwin) (push) Blocked by required conditions
Build and Release / Build Binaries (arm64, linux) (push) Blocked by required conditions
Build and Release / Build Docker Image (push) Blocked by required conditions
Build and Release / Create Release (push) Blocked by required conditions
Build and Release / Lint and Test (push) Has been cancelled
Includes:
- Docker and local test environment setup
- Automated test examples
- Manual testing checklists for all new features
- Regression testing for critical paths
- Load testing guidance
- Database migration verification
- Staging deployment process
- Rollback plan
- Quick smoke test script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 15:21:04 -05:00
2af5c1990e ci: add Gitea Actions workflows for build and release
Some checks failed
Build and Release / Lint and Test (push) Successful in 7m12s
Build and Release / Build Binaries (amd64, linux) (push) Failing after 59s
Build and Release / Build Binaries (amd64, darwin) (push) Failing after 1m4s
Build and Release / Build Binaries (arm64, darwin) (push) Failing after 54s
Build and Release / Build Docker Image (push) Failing after 1m9s
Build and Release / Build Binaries (amd64, windows) (push) Failing after 18m52s
Build and Release / Build Binaries (arm64, linux) (push) Failing after 17m50s
Build and Release / Create Release (push) Has been cancelled
- build.yml: Full build pipeline with multi-platform binaries
  - Lint and test job
  - Build for Linux, macOS, Windows (amd64/arm64)
  - Docker image build
  - Automatic release creation on tags

- pr-checks.yml: Quick checks for pull requests
  - Go formatting and vet checks
  - Unit tests with coverage
  - Frontend TypeScript and ESLint checks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 15:15:21 -05:00
b816ee4eec feat: add Phases 3-5 enhancements (org profiles, pages, wiki v2 API)
Phase 3: Organization Public Profile Page
- Pinned repositories with groups
- Public members display with roles
- API endpoints for pinned repos and groups

Phase 4: Gitea Pages Foundation
- Landing page templates (simple, docs, product, portfolio)
- Custom domain support with verification
- YAML configuration parser (.gitea/landing.yaml)
- Repository settings UI for pages

Phase 5: Enhanced Wiki System with V2 API
- Full CRUD operations via v2 API
- Full-text search with WikiIndex table
- Link graph visualization
- Wiki health metrics (orphaned, dead links, outdated)
- Designed for external AI plugin integration
- Developer guide for .NET integration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 15:14:27 -05:00
e35aa8d878 sdk: add C# and Java SDK libraries with chunked upload support
Both SDKs provide:
- Full API client for users, repositories, and releases
- Chunked upload with parallel workers
- Progress tracking with speed/ETA
- SHA256 checksum verification
- Comprehensive exception handling

C# SDK (.NET 8.0):
- Modern record types for models
- Async/await pattern throughout
- System.Text.Json serialization

Java SDK (Java 17):
- Standard Maven project
- Jackson for JSON
- HttpClient for HTTP
- ExecutorService for parallel uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 12:19:17 -05:00
ad82306b52 feat(sdk): add CLI tool and SDK libraries for developer tooling (Phase 4)
Add comprehensive developer tooling for Gitea integration:

CLI Tool (cmd/gitea-cli/):
- gitea-cli auth login/logout/status - Authentication management
- gitea-cli upload release-asset - Chunked upload with progress
- gitea-cli upload resume - Resume interrupted uploads
- gitea-cli upload list - List pending upload sessions
- Parallel chunk uploads with configurable workers
- SHA256 checksum verification
- Progress bar with speed and ETA display

Go SDK (sdk/go/):
- GiteaClient with token authentication
- User, Repository, Release, Attachment types
- ChunkedUpload with parallel workers
- Progress callbacks for upload tracking
- Functional options pattern (WithChunkSize, WithParallel, etc.)

Python SDK (sdk/python/):
- GiteaClient with requests-based HTTP
- Full type hints and dataclasses
- ThreadPoolExecutor for parallel uploads
- Resume capability for interrupted uploads
- Exception hierarchy (APIError, UploadError, etc.)

TypeScript SDK (sdk/typescript/):
- Full TypeScript types and interfaces
- Async/await API design
- Browser and Node.js compatible
- Web Crypto API for checksums
- ESM and CJS build outputs

All SDKs support:
- Chunked uploads for large files
- Parallel upload workers
- Progress tracking with callbacks
- Checksum verification
- Resume interrupted uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 12:07:07 -05:00
a703bcc60f feat(api): add Phase 3 reliability and UX enhancements
Add comprehensive reliability patterns and user experience improvements:

- Operation progress tracking via SSE (modules/operations/progress.go)
  - Real-time progress updates for long-running operations
  - Phase-based progress with completion percentages
  - Byte/item progress tracking with ETA calculations
  - Automatic cleanup of completed operations

- Idempotency key middleware (modules/idempotency/idempotency.go)
  - POST/PUT/PATCH request deduplication
  - 24-hour response caching
  - Concurrent request protection with locking
  - Idempotency-Replayed header for cache hits

- Webhook retry with exponential backoff (modules/webhook/retry.go)
  - Configurable max retries and delays
  - Jitter for thundering herd prevention
  - Retryable status code configuration
  - Delivery attempt tracking

- Circuit breaker pattern (modules/circuitbreaker/circuitbreaker.go)
  - Closed/Open/Half-Open state machine
  - Configurable failure thresholds
  - Global registry for service management
  - State change callbacks

- Enhanced health checks (modules/health/health.go)
  - Kubernetes-compatible liveness/readiness probes
  - Per-component health status
  - System metrics (goroutines, memory, CPU)
  - Circuit breaker status integration

New v2 API endpoints:
- GET /api/v2/health - comprehensive health check
- GET /api/v2/health/live - liveness probe
- GET /api/v2/health/ready - readiness probe
- GET /api/v2/health/component/{name} - component status
- GET /api/v2/operations/{id} - operation status
- GET /api/v2/operations/{id}/progress - SSE progress stream
- DELETE /api/v2/operations/{id} - cancel operation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 11:54:00 -05:00
9094d8b503 feat(api): add v2 API with AI-friendly features (Phase 2)
This introduces a new v2 API at /api/v2/ with features designed for
AI agents and automation tools while maintaining full backward
compatibility with the existing v1 API.

New features:
- Structured error codes (70+ machine-readable codes) for precise
  error handling by automated tools
- Scalar API documentation at /api/v2/docs (modern replacement for
  Swagger UI)
- Batch operations for bulk file and repository fetching
- NDJSON streaming endpoints for files, commits, and issues
- AI context endpoints providing rich repository summaries,
  navigation hints, and issue context

Files added:
- modules/errors/codes.go - Error code definitions and catalog
- modules/errors/api_error.go - Rich API error response builder
- routers/api/v2/api.go - v2 router with auth middleware
- routers/api/v2/docs.go - Scalar docs and OpenAPI spec
- routers/api/v2/batch.go - Batch file/repo operations
- routers/api/v2/streaming.go - NDJSON streaming endpoints
- routers/api/v2/ai_context.go - AI context endpoints
- routers/api/v2/misc.go - Version and user endpoints

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 11:41:10 -05:00
4d1424df80 feat(api): add Phase 1 API enhancements for reliability and tracing
- Add X-Request-ID header middleware for request tracing
  - Extracts from incoming headers or generates short UUID
  - Included in all error responses for debugging

- Add rate limit headers (X-RateLimit-Limit/Remaining/Reset)
  - Currently informational, configurable via API.RateLimitPerHour
  - Prepared for future enforcement

- Add chunk checksum verification for uploads
  - Optional X-Chunk-Checksum header with SHA-256 hash
  - Verifies data integrity during chunked uploads

- Standardize error responses with RFC 7807 Problem Details
  - Added type, title, status, detail, instance fields
  - Maintains backward compatibility with legacy fields

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 11:14:18 -05:00
7eba24ea27 docs: add feature enhancement specifications
Add two specification documents for planned Gitea enhancements:

- enhancements.md: Organization public profile pages and Gitea Pages
  (repository landing pages with custom domains)

- ai_enhancements.md: AI and developer experience improvements
  including structured API errors, Scalar API docs, batch operations,
  AI-powered wiki generation, and SDK tooling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 10:16:33 -05:00
66f3d55782 docs: add architectural review and suggestions
Comprehensive review covering:
- Chunked upload implementation critique with fixes
- API design improvements (batch ops, pagination, error format)
- Error handling & observability (tracing, structured logging)
- Reliability patterns (retry, circuit breaker, health checks)
- AI & automation friendliness (idempotency, error codes)
- Security considerations (audit logging, token scopes)
- Performance optimizations (caching, compression)
- Phased implementation roadmap
2026-01-08 09:09:08 -05:00
63acb5c81d docs: add chunked uploads API documentation
Comprehensive documentation for the new chunked upload feature including:
- API endpoint reference with parameters and responses
- Usage examples in bash/curl and Python
- Resumable upload examples
- Parallel upload example
- Configuration options and best practices
2026-01-08 09:00:58 -05:00
7e36d7d55c feat(api): add chunked upload support for large release attachments
Implement resumable chunked uploads to improve reliability for large file
uploads that may fail due to network issues or timeouts.

New API endpoints:
- POST /repos/{owner}/{repo}/releases/{id}/assets/upload-session
- PUT /repos/{owner}/{repo}/uploads/{session_id}/chunks/{chunk_number}
- GET /repos/{owner}/{repo}/uploads/{session_id}
- POST /repos/{owner}/{repo}/uploads/{session_id}/complete
- DELETE /repos/{owner}/{repo}/uploads/{session_id}

Features:
- Resumable uploads with session status tracking
- Out-of-order chunk uploads supported
- Configurable chunk size (default 10MB, max 100MB)
- Automatic cleanup of expired sessions (24h expiry, hourly cleanup)
- Progress tracking with bytes/chunks received counts

Files added:
- models/repo/upload_session.go - Session model and DB operations
- services/attachment/chunked.go - Chunk storage and assembly logic
- routers/api/v1/repo/upload.go - API endpoint handlers
- models/migrations/v1_26/v325.go - Database migration
2026-01-08 08:58:56 -05:00
luo jiyin
d2baa8103f refactor(pprof): use explicit mux instead of DefaultServeMux (#36276)
- Replace blank import of `net/http/pprof` with explicit import
- Create dedicated `http.ServeMux` for pprof server
- Register pprof handlers explicitly

---------

Signed-off-by: luojiyin <luojiyin@hotmail.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-02 08:06:06 +00:00
Lunny Xiao
8373f7deb3 improve the compare page (#36261)
- The compare page head title should be `compare` but not `new pull
request`.
- Use `UnstableGuessRefByShortName` instead of duplicated functions
calls.
- Direct-compare, tags, commits compare will not display `New Pull
Request` button any more.

The new screenshot
<img width="1459" height="391" alt="image"
src="https://github.com/user-attachments/assets/64e9b070-9c0b-41d1-b4b8-233b96270e1b"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-01 10:32:19 -08:00
luo jiyin
98981eb749 mailer: pass request context to generateAdditionalHeadersForIssue (#36274)
Fixes #36273

Use the caller-provided context when building X-Gitea-Issue-Link,
instead of `context.TODO()`.
2026-01-01 04:28:25 +00:00
Max P.
91d871611e feat(debian): use explicit, stronger defaults for newly generated repo signing keys (#36236)
Make Debian repository signing key generation use explicit stronger defaults
and embed the creation time in the OpenPGP comment for newly created keys.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-01 02:36:14 +00:00
wxiaoguang
094104bc91 Make "commit statuses" API accept slashes in "ref" (#36264)
Fix #36253

Support slashes in `{ref}` (follow GitHub's behavior)
2026-01-01 09:56:07 +08:00
Lunny Xiao
1771569300 Some refactor for repo path (#36251)
- Use `gitrepo.IsRepositoryExist` instead of `util.IsExit` or
`util.IsDir`
- Use `gitrepo.OpenRepository` instead of `git.OpenRepository`
- Use `gitrepo.DeleteRepository` instead of `util.RemoveAll`
- Use `gitrepo.RenameRepository` instead of `util.Rename`
2025-12-29 18:49:54 +00:00
Lunny Xiao
0ad94dfc70 Move catfile batch to a sub package of git module (#36232) 2025-12-29 10:19:42 -08:00
alphazeba
d0cb198c89 fix: prevent 100% width radio buttons (#36262)
as part of [Remove fomantic form
module](eddf875992 (diff-c34b74004deb63fb4f8a8549ef9d822b9839db0b69ae2c0cdacc05ce3d5d5682))
radio buttons get caught in crossfire and recieve `width: 100%` this is
particularly noticeable on the `user/settings/applications` page which
has many radio buttons.

This continues using an opt out `input:not([type="checkbox"],
[type="radio"])` to prevent this.

Signed-off-by: alphazeba <33792307+alphazeba@users.noreply.github.com>
2025-12-29 09:51:10 +02:00
GiteaBot
85dd16b3fc [skip ci] Updated translations via Crowdin 2025-12-29 00:43:22 +00:00
Lunny Xiao
c7b3cdf7b1 Use gitrepo's push function (#36245)
extract from #36186
2025-12-28 13:24:28 +02:00
Gregorius Bima Kharisma Wicaksana
83527d3f8a Support closing keywords with URL references (#36221)
## Summary

This PR adds support for closing keywords (`closes`, `fixes`, `reopens`,
etc.) with full URL references in markdown links.

**Before:**
- `closes #123`  works
- `closes org/repo#123`  works  
- `Closes [this issue](https://gitea.io/user/repo/issues/123)`  didn't
work
- `Fixes [#456](https://gitea.io/org/project/issues/456)`  didn't work

**After:**
All of the above now work correctly.

## Problem

When users reference issues using full URLs in markdown links (e.g.,
`Closes [this issue](https://gitea.io/user/repo/issues/123)`), the
closing keywords were not detected. This was because the URL processing
code explicitly stated:

```go
// Note: closing/reopening keywords not supported with URLs
```

Both methods of writing the reference render the same in the UI, so
users expected the closing keywords to behave the same.

## Solution

The fix works by:
1. Passing the original (unstripped) content to
`findAllIssueReferencesBytes`
2. When processing URL links from markdown, finding the URL position in
the original content
3. For markdown links `[text](url)`, finding the opening bracket `[`
position
4. Using that position to detect closing keywords before the link

## Testing

Added test cases for:
- `Closes [this issue](url)` - single URL with closing keyword
- `This fixes [#456](url)` - keyword in middle of text
- `Reopens [PR](url)` - reopen keyword with pull request URL
- Multiple URLs where only one has a closing keyword

All existing tests continue to pass.

Fixes #27549
2025-12-27 09:05:24 -08:00
Ivan Tkatchev
19e1997ee2 Add an option to automatically verify SSH keys from LDAP (#35927)
This pull request adds an option to automatically verify SSH keys from
LDAP authentication sources.

This allows a correct authentication and verification workflow for
LDAP-enabled organizations; under normal circumstances SSH keys in LDAP
are not managed by users manually.
2025-12-27 12:33:08 +00:00
Lunny Xiao
00cc84e37c remove nolint (#36252) 2025-12-26 22:55:30 -08:00
sollyu
64fcf847ce Use the requested host for LFS links (#36242)
Use the dynamically parsed host in the request for LFS links, but not
use the hard-coded AppURL.

Make LFS server support multi-domain or run Gitea behind a reverse-proxy
with different ROOT_URL.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-26 04:48:20 +00:00
Lunny Xiao
ff3d68b98a Fix panic when get editor config file (#36241)
Fix #36239
2025-12-25 19:26:23 -08:00
Lunny Xiao
776e406363 Refactor compare router param parse (#36105)
---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-25 17:51:30 -08:00