Commit Graph

20178 Commits

Author SHA1 Message Date
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
GiteaBot
fbbed8c4c4 [skip ci] Updated translations via Crowdin 2025-12-25 21:37:43 +00:00
Lunny Xiao
324dcf6f64 Use flatten translation keys (#36225)
Crowdin does not remove empty lines in nested JSON translation files.
Therefore, we use flattened translation keys instead. We have also
updated the key-loading logic to ensure that empty values are not
applied during translation.

---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2025-12-25 12:51:33 -08:00
silverwind
42d294941c Replace CSRF cookie with CrossOriginProtection (#36183)
Removes the CSRF cookie in favor of
[`CrossOriginProtection`](https://pkg.go.dev/net/http#CrossOriginProtection)
which relies purely on HTTP headers.

Fixes: https://github.com/go-gitea/gitea/issues/11188
Fixes: https://github.com/go-gitea/gitea/issues/30333
Helps: https://github.com/go-gitea/gitea/issues/35107

TODOs:

- [x] Fix tests
- [ ] Ideally add tests to validates the protection

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-25 12:33:34 +02:00
silverwind
eddf875992 Remove fomantic form module (#36222)
- Replace fomantic form CSS with custom module
- Moved code in `form.css` to `modules/form.css`, removed around 70% of
the previous module.
- Moved captcha styles previously in `form.css` to its own file.

There is probably more unused CSS, like form error state colors which to
my knowledge is not used anywhere, but I'm not sure about that one so I
kept it.

One notable change is the removal of `type` combinator here, which
lowers the selector specificity and I noticed one issue where selector
`.ui.search > .prompt` was winning, so I added a workaround for that
until the `search` module can be removed as well.

```css
.ui.form .fields.error .field input:not([type])
.ui.form .fields.error .field input[type="date"]
```

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-12-23 18:21:47 +01:00
Max P.
957151937f Fix panic in blame view when a file has only a single commit (#36230)
This PR fixes a panic in the repository blame view that occurs when
rendering files whose blame history consists of only a single commit.
2025-12-23 14:26:29 +08:00
DaanSelen
04607f7d4a fix: spelling error in migrate-storage cmd utility (#36226)
Added closing quote which looks to be forgotten

Signed-off-by: DaanSelen <80752476+DaanSelen@users.noreply.github.com>
2025-12-22 10:55:41 +00:00
silverwind
60de6cefed Fix WebAuthn error checking (#36219)
Fixes: https://github.com/go-gitea/gitea/issues/36216

Now `detectWebAuthnSupport` returns the error type and lets the caller
decide whether they call `webAuthnError` and show the error. It no
longer shows the error during page load when the user has not even
interacted with the feature.

The bug affects all users on HTTP, so I think a quick fix release for
this might be good.
2025-12-21 18:24:41 +00:00
GiteaBot
5151e30fb7 [skip ci] Updated translations via Crowdin 2025-12-21 17:09:57 +00:00
Gregorius Bima Kharisma Wicaksana
b6ffe0e4e9 refactor: extract helper functions from SearchIssues (#36158)
## Summary

This PR refactors the `SearchIssues` function in
`routers/api/v1/repo/issue.go` by extracting common logic into reusable
helper functions:

- `parseIssueIsClosed()`: Parses the "state" query parameter and returns
the corresponding `isClosed` option
- `parseIssueIsPull()`: Parses the "type" query parameter and returns
the corresponding `isPull` option
- `buildSearchIssuesRepoIDs()`: Builds the list of repository IDs for
issue search based on query parameters

### Benefits:
- Improved code readability
- Smaller, more focused functions
- Easier to test individual components
- Potential for reuse in other handlers

### Changes:
- Extracted 3 helper functions from the ~292 line `SearchIssues`
function
- No functional changes - behavior remains the same
- Proper error handling preserved

## Test plan
- [ ] Verify existing API tests pass
- [ ] Manual testing of `/repos/issues/search` endpoint

Ref: #35015

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-20 17:57:41 -08:00
GiteaBot
bf0b377879 [skip ci] Updated translations via Crowdin 2025-12-21 00:42:41 +00:00
Lunny Xiao
0a3a9fb068 Revert "[skip ci] Updated translations via Crowdin"
This reverts commit d3656ebd95.
2025-12-20 09:15:26 -08:00
Scion
495fee4555 Closed milestones with no issues now show as 100% completed (#36220)
Closed milestones with 0 issues currently display as having 0%
completion. This makes sense if the milestone is still open, but if the
milestone is closed it seems like that it should show 100% completeness
instead.

Before:
<img width="1708" height="252" alt="image"
src="https://github.com/user-attachments/assets/0b58c78f-0609-44ee-8d58-bd67534c6164"
/>
After:
<img width="1716" height="263" alt="image"
src="https://github.com/user-attachments/assets/3fb0044f-d76c-4888-9d60-640f2ca5fec6"
/>
2025-12-20 16:16:20 +00:00
bytedream
05c3b84f84 Show edit page confirmation dialog on tree view file change (#36130)
Currently, when editing or deleting a file and the edit/commit form has
changes, navigating the file tree will discard all changes without any
warning. This PR prevents partial reloading when the edit form has
unsaved changes, which will trigger a browser native warning dialog.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-20 02:29:39 +01:00
Peter Verraedt
b4c9057f92 Fix regression in writing authorized principals (#36213)
Add additional logic with tests to restore the
previous behaviour when writing the principals file.

Fixes: #36212

---------

Signed-off-by: Peter Verraedt <peter.verraedt@kuleuven.be>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-20 01:24:59 +00:00
GiteaBot
d3656ebd95 [skip ci] Updated translations via Crowdin 2025-12-20 00:37:17 +00:00
Lunny Xiao
ffea9a27c3 Convert locale files from ini to json format (#35489)
Migrate from the current INI format to JSON for translations. JSON is
widely supported, including by platforms such as Crowdin and Weblate.
2025-12-19 09:50:48 -08:00
dependabot[bot]
9764ae87d2 Bump crowdin/github-action from 1 to 2 (#36204)
Bumps [crowdin/github-action](https://github.com/crowdin/github-action)
from 1 to 2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crowdin/github-action/releases">crowdin/github-action's
releases</a>.</em></p>
<blockquote>
<h2>v2.0.0</h2>
<h2>What's Changed</h2>
<h3>Features</h3>
<ul>
<li>Now the Action uses the new <a
href="https://crowdin.github.io/crowdin-cli/blog/2024/05/28/cli-v4">CLI
v4</a></li>
</ul>
<h3>Deprecations</h3>
<p>Removed deprecated options:</p>
<ul>
<li><code>add_crowdin_branch</code></li>
<li><code>new_branch_title</code></li>
<li><code>new_branch_export_pattern</code></li>
<li><code>new_branch_priority</code></li>
<li><code>delete_crowdin_branch</code></li>
</ul>
<p>Instead, use the <code>command: branch add &lt;name&gt;</code> to
create a new branch.</p>
<ul>
<li><code>identity</code> - this option doesn't make much sense in the
context of the GitHub action, where environment variables are a de facto
standard for credentials loading.</li>
</ul>
<hr />
<p><strong>Full Changelog</strong>: <a
href="https://github.com/crowdin/github-action/compare/v1.20.4...v2.0.0">https://github.com/crowdin/github-action/compare/v1.20.4...v2.0.0</a></p>
<h2>v1.20.4</h2>
<h2>What's Changed</h2>
<ul>
<li>CLI <a
href="https://github.com/crowdin/crowdin-cli/releases/tag/3.19.4">3.19.4</a>
by <a
href="https://github.com/andrii-bodnar"><code>@​andrii-bodnar</code></a></li>
<li>ci: upgrade actions by <a
href="https://github.com/andrii-bodnar"><code>@​andrii-bodnar</code></a>
in <a
href="https://redirect.github.com/crowdin/github-action/pull/226">crowdin/github-action#226</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/crowdin/github-action/compare/v1.20.3...v1.20.4">https://github.com/crowdin/github-action/compare/v1.20.3...v1.20.4</a></p>
<h2>v1.20.3</h2>
<h2>What's Changed</h2>
<ul>
<li>CLI <a
href="https://github.com/crowdin/crowdin-cli/releases/tag/3.19.3">3.19.3</a>
by <a
href="https://github.com/andrii-bodnar"><code>@​andrii-bodnar</code></a></li>
<li>chore: deprecate the 'identity' option by <a
href="https://github.com/andrii-bodnar"><code>@​andrii-bodnar</code></a>
in <a
href="https://redirect.github.com/crowdin/github-action/pull/224">crowdin/github-action#224</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/crowdin/github-action/compare/v1.20.2...v1.20.3">https://github.com/crowdin/github-action/compare/v1.20.2...v1.20.3</a></p>
<h2>v1.20.2</h2>
<h2>What's Changed</h2>
<ul>
<li>CLI <a
href="https://github.com/crowdin/crowdin-cli/releases/tag/3.19.2">3.19.2</a>
by <a
href="https://github.com/andrii-bodnar"><code>@​andrii-bodnar</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/crowdin/github-action/compare/v1.20.1...v1.20.2">https://github.com/crowdin/github-action/compare/v1.20.1...v1.20.2</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="60debf382e"><code>60debf3</code></a>
docs: add example for source files caching between workflow runs (<a
href="https://redirect.github.com/crowdin/github-action/issues/298">#298</a>)</li>
<li><a
href="96b44e6697"><code>96b44e6</code></a>
chore: CLI 4.12.0</li>
<li><a
href="08713f00a5"><code>08713f0</code></a>
feat: add pull_request_created output to track PR status (<a
href="https://redirect.github.com/crowdin/github-action/issues/294">#294</a>)</li>
<li><a
href="fb221ac1c8"><code>fb221ac</code></a>
fix: bundle download with branch param conflict (<a
href="https://redirect.github.com/crowdin/github-action/issues/291">#291</a>)</li>
<li><a
href="0749939f63"><code>0749939</code></a>
chore: CLI 4.11.0</li>
<li><a
href="9787f4fcb6"><code>9787f4f</code></a>
chore: CLI 4.10.0</li>
<li><a
href="590c05e09a"><code>590c05e</code></a>
chore: CLI 4.9.1</li>
<li><a
href="9fd07c1c5b"><code>9fd07c1</code></a>
chore: CLI 4.9.0</li>
<li><a
href="297234bae0"><code>297234b</code></a>
chore: CLI 4.8.0</li>
<li><a
href="37201e27ee"><code>37201e2</code></a>
docs: AI Localization improvements (<a
href="https://redirect.github.com/crowdin/github-action/issues/283">#283</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/crowdin/github-action/compare/v1...v2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crowdin/github-action&package-manager=github_actions&previous-version=1&new-version=2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: silverwind <me@silverwind.io>
2025-12-19 13:49:30 +00:00
dependabot[bot]
684a541799 Bump appleboy/git-push-action from 0.0.3 to 1.0.0 (#36194)
Bumps
[appleboy/git-push-action](https://github.com/appleboy/git-push-action)
from 0.0.3 to 1.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/appleboy/git-push-action/releases">appleboy/git-push-action's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.0</h2>
<h2>Changelog</h2>
<h3>Enhancements</h3>
<ul>
<li>50ae8aaf06c6fc08b3d13da3aa03deb50d970125: chore(docker): improve
overall system performance and API integration (<a
href="https://github.com/appleboy"><code>@​appleboy</code></a>)</li>
</ul>
<h3>Build process updates</h3>
<ul>
<li>feea2e25baaa5ea24a9689a8af03f229ec1dd1a2: ci: improve testing
workflow and API usage (<a
href="https://github.com/appleboy"><code>@​appleboy</code></a>)</li>
<li>5d65d1094eb0415898554ba83c4f3196778f9a85: ci: improve testing
workflow and API usage (<a
href="https://github.com/appleboy"><code>@​appleboy</code></a>)</li>
<li>b31dd8d6e7ba1e80a96a4772d8c4290fe7bac0ce: build: update base image
in Dockerfile (<a
href="https://github.com/appleboy"><code>@​appleboy</code></a>)</li>
<li>fc585cfea49d10c08f8009f674c05961a0934647: ci(goreleaser): implement
automated release process with GoReleaser (<a
href="https://github.com/appleboy"><code>@​appleboy</code></a>)</li>
<li>b1e5e3d76ccb4afd43bc0859672a6f9113fa0458: ci(test): optimize CI
workflow and test configurations (<a
href="https://github.com/appleboy"><code>@​appleboy</code></a>)</li>
</ul>
<h3>Documentation updates</h3>
<ul>
<li>8f1f45876617e5d74085a38164c421be39f099b3: docs(readme): refactor
codebase and improve test coverage (<a
href="https://github.com/appleboy"><code>@​appleboy</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b1e5e3d76c"><code>b1e5e3d</code></a>
ci(test): optimize CI workflow and test configurations</li>
<li><a
href="8f1f458766"><code>8f1f458</code></a>
docs(readme): refactor codebase and improve test coverage</li>
<li><a
href="fc585cfea4"><code>fc585cf</code></a>
ci(goreleaser): implement automated release process with GoReleaser</li>
<li><a
href="50ae8aaf06"><code>50ae8aa</code></a>
chore(docker): improve overall system performance and API
integration</li>
<li><a
href="b31dd8d6e7"><code>b31dd8d</code></a>
build: update base image in Dockerfile</li>
<li><a
href="5d65d1094e"><code>5d65d10</code></a>
ci: improve testing workflow and API usage</li>
<li><a
href="feea2e25ba"><code>feea2e2</code></a>
ci: improve testing workflow and API usage</li>
<li>See full diff in <a
href="https://github.com/appleboy/git-push-action/compare/v0.0.3...v1.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=appleboy/git-push-action&package-manager=github_actions&previous-version=0.0.3&new-version=1.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-19 11:28:11 +00:00
silverwind
8f672cea4a Fix labeler config for stylelint (#36199)
Followup to rename in
b8f1c9f048 (diff-cb3b3f608024ee0bd45ea10b08ca6d3fcf40523a3d40182a438937231d8b8072).
2025-12-19 09:47:03 +00:00
silverwind
e06040efd8 Add modifies/dependencies label to dependabot (#36206)
`actions/labeler` can not detect dependency updates in actions because
it works on file level, so we need to let dependabot set this label.
2025-12-19 08:49:26 +00:00