2
0
Commit Graph

1921 Commits

Author SHA1 Message Date
293714ed0b fix: resolve lint errors in AI modules
Some checks failed
Build and Release / Create Release (push) Has been skipped
Build and Release / Unit Tests (push) Failing after 52s
Build and Release / Integration Tests (PostgreSQL) (push) Failing after 1m21s
Build and Release / Lint (push) Failing after 1m53s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, darwin, macos) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, macos) (push) Has been skipped
Build and Release / Build Binary (linux/arm64) (push) Has been skipped
- Replace fmt.Errorf with errors.New for static error messages
- Use modules/json instead of encoding/json (depguard)
- Add nolint:dupl for intentionally similar API handlers
- Explicitly ignore Session.Set return values (errcheck)
- Apply gofmt formatting

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 18:11:10 -05:00
d352b138d7 feat(i18n): add organization license settings and AI template helpers
Some checks failed
Build and Release / Create Release (push) Has been skipped
Build and Release / Integration Tests (PostgreSQL) (push) Failing after 1m46s
Build and Release / Unit Tests (push) Successful in 3m14s
Build and Release / Lint (push) Failing after 3m39s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, darwin, macos) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, macos) (push) Has been skipped
Build and Release / Build Binary (linux/arm64) (push) Has been skipped
Add organization-level license management with new settings page and locale strings across all languages. Add AI feature detection helpers (IsAIEnabled, IsAICodeReviewEnabled, IsAIIssueTriageEnabled) to template functions. Add license scanning functionality to repository settings.
2026-01-19 17:19:32 -05:00
61e835358c feat(actions-manager): add AI service integration for code review and issue triage
Integrate GitCaddy AI service with support for code review, issue triage, documentation generation, code explanation, and chat interface. Add AI client module with HTTP communication, configuration settings, API routes (web and REST), service layer, and UI templates for issue sidebar. Include comprehensive configuration options in app.example.ini for enabling/disabling features and service connection settings.
2026-01-19 11:06:39 -05:00
d38d20bfaf Add Move to Vault feature for file browser
All checks were successful
Build and Release / Create Release (push) Has been skipped
Build and Release / Unit Tests (push) Successful in 3m4s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 4m8s
Build and Release / Lint (push) Successful in 5m19s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, darwin, macos) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, macos) (push) Has been skipped
Build and Release / Build Binary (linux/arm64) (push) Has been skipped
Adds a "Move to Vault" button to the file view toolbar that allows
developers to move sensitive files directly into encrypted Vault storage.

Features:
- Button appears next to Edit/Delete when Vault plugin is loaded
- Confirmation page shows file details and warnings
- File is encrypted and stored in Vault as type "file"
- File is then deleted from the repository with a commit
- 50MB file size limit for vault storage

Files added:
- routers/web/repo/vault_move.go - Handler for move-to-vault action
- templates/repo/editor/move_to_vault.tmpl - Confirmation page

Files modified:
- routers/web/repo/view_file.go - Added CanMoveToVault permission check
- templates/repo/view_file.tmpl - Added Move to Vault button
- routers/web/web.go - Registered /_move-to-vault/* route
- services/forms/repo_form_editor.go - Added MoveToVaultForm
- options/locale/locale_en-US.json - Added translation keys

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:19:05 -05:00
07738be978 feat(explore): add organization grouping on explore page
Adds optional group_header field to organizations for categorizing them on the explore page (e.g., "Enterprise", "Community", "Partners"). Includes database migration, organization settings form field, and grouped display template. Groups are sorted alphabetically with ungrouped organizations shown last. Users can toggle grouping view with show_groups parameter.
2026-01-18 13:08:30 -05:00
ad81b22fca feat(repo): add group header field for repository organization
Adds a GroupHeader field to repositories allowing them to be grouped under custom headers on organization pages. Includes database migration v333, form handling, and grouped/ungrouped view toggle in the UI.
2026-01-18 11:20:03 -05:00
12f4ea03a8 refactor: add /v3 suffix to module path for proper Go semver
Some checks failed
Build and Release / Create Release (push) Successful in 0s
Trigger Vault Plugin Rebuild / Trigger Vault Rebuild (push) Successful in 0s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 2m48s
Build and Release / Lint (push) Failing after 5m2s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, darwin, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Has been skipped
Build and Release / Unit Tests (push) Successful in 5m37s
Go's semantic import versioning requires v2+ modules to include the
major version in the module path. This enables using proper version
tags (v3.x.x) instead of pseudo-versions.

Updated module path: code.gitcaddy.com/server/v3
2026-01-17 17:53:59 -05:00
71bf7c06e7 feat(vault): Solo tier now includes limited versioning and CI/CD tokens
All checks were successful
Build and Release / Create Release (push) Successful in 0s
Build and Release / Unit Tests (push) Successful in 3m5s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 4m44s
Build and Release / Lint (push) Successful in 5m5s
Build and Release / Build Binaries (amd64, darwin, linux-latest) (push) Successful in 2m51s
Build and Release / Build Binaries (arm64, darwin, linux-latest) (push) Successful in 3m42s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 4m1s
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Successful in 4m6s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 9h4m37s
- Solo tier changes:
  - 2 versions history (limited rollback capability)
  - 1 CI/CD token (24h max TTL, read-only access)
  - SSO remains Pro+ only

- Added granular license limits:
  - MaxVersions, MaxTokens, MaxTokenTTLHours, TokensReadOnly

- Added token limit enforcement with CheckTokenLimit()

- Updated all 28 locale files with new translations

- Added templates:
  - feature_upgrade.tmpl (for SSO upgrade prompts)
  - not_installed.tmpl (when vault plugin missing)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 11:49:12 -05:00
e82aaf9a72 vault changes 2026-01-17 11:31:19 -05:00
af6d4addd4 code.caddy rename
All checks were successful
Build and Release / Create Release (push) Successful in 0s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 3m7s
Build and Release / Lint (push) Successful in 5m21s
Build and Release / Unit Tests (push) Successful in 5m46s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 3m44s
Build and Release / Build Binaries (amd64, darwin, linux-latest) (push) Successful in 4m4s
Build and Release / Build Binaries (arm64, darwin, linux-latest) (push) Successful in 3m23s
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Successful in 3m47s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 8h6m28s
2026-01-17 09:02:21 -05:00
a579977667 vault templates and translations
Some checks failed
Build and Release / Create Release (push) Successful in 0s
Build and Release / Unit Tests (push) Successful in 3m3s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 4m16s
Build and Release / Lint (push) Successful in 5m27s
Build and Release / Build Binaries (arm64, darwin, macos-latest) (push) Failing after 42s
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Successful in 2m34s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 2m48s
Build and Release / Build Binaries (amd64, darwin, macos-latest) (push) Successful in 3m20s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 8h7m8s
2026-01-17 02:54:23 -05:00
7d852159aa Server fixes
Some checks failed
Build and Release / Create Release (push) Has been skipped
Build and Release / Unit Tests (push) Successful in 3m20s
Build and Release / Lint (push) Failing after 4m55s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, darwin, macos-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, macos-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Has been skipped
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 4m59s
2026-01-17 01:59:38 -05:00
725e66e001 GitSecrets endpoints 2026-01-17 01:51:56 -05:00
674dd12372 Vault 2026-01-16 23:06:07 -05:00
04218a094b vault routes and service interface 2026-01-16 22:56:13 -05:00
GitCaddy
ee89fe4960 Fix workflow filter support, AI Learning any option, server stats types, and actions clear buttons
- Add workflow filter to clear-cancelled, clear-failed, clear-running, clear-old-success
- Add any option to AI Learning runner type filter
- Fix ServerStats int64 types for FileSize template function
- Add CPULoad field with platform-specific implementations
- Fix actions list template with conditional button visibility
- Use Gitea styled modal dialogs for all clear buttons

🤖 Generated with Claude Code
2026-01-16 00:27:03 +00:00
GitCaddy
70452a9477 v2.1.3: Add AI Learning admin UI and server status dashboard tiles
Some checks are pending
Build and Release / Lint (push) Waiting to run
Build and Release / Unit Tests (push) Waiting to run
Build and Release / Integration Tests (PostgreSQL) (push) Waiting to run
Build and Release / Create Release (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 AI Learning admin section for viewing/editing error patterns
- Add server status tiles to admin dashboard (CPU load, memory, disk)
- Auto-refresh dashboard tiles using HTMX
- Fix error template text (GitCaddy Server)
- Dark mode compatibility for all new UI elements

🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:55:06 +00:00
GitCaddy
6ca11bc207 feat(actions): add Clear Running, workflow filter for disk usage, conditional buttons
- Add Clear Running button to delete stuck running workflow runs
- Disk usage now filters by selected workflow
- Clear buttons only appear when corresponding status has runs
- Rename ActionsDiskUsage to DiskUsage (lint fix)

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-15 12:15:52 +00:00
GitCaddy
388ea5264b feat(actions): add Clear Old Success button with configurable age
Adds a button to clear successful workflow runs older than a configurable
number of days (1, 3, 5, 7, 14, or 30 days), defaulting to 5 days.

- Add ClearOldSuccess handler in view.go
- Add DeleteSuccessRunsOlderThan service function
- Add GetSuccessRunIDsOlderThan model function
- Add route /clear-old-success
- Add translations for clear_old_success and clear_old_success_confirm
- Update list.tmpl with dropdown selector and button

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 01:43:20 +00:00
GitCaddy
c02e648a3e feat(actions): add bulk delete and disk usage display for repo admins
- Add disk usage statistics endpoint (GET /actions/disk-usage)
- Add Clear Cancelled button to delete all cancelled workflow runs
- Add Clear Failed button to delete all failed workflow runs
- Show disk usage breakdown by status on Actions page sidebar
- Repo admins only feature

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 23:07:38 +00:00
GitCaddy
a9c04be5cc chore: Fix linter issues and update copyrights
Some checks are pending
Build and Release / Lint (push) Waiting to run
Build and Release / Unit Tests (push) Waiting to run
Build and Release / Integration Tests (PostgreSQL) (push) Waiting to run
Build and Release / Create Release (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
- Format Go files with gofmt
- Fix perfsprint lint issues in mail_runner_health.go
- Fix editorconfig issues in templates

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 09:41:09 +00:00
GitCaddy
8a904de418 feat: Add runner health monitoring with CPU load and disk cleanup
- Add RunnerHealthCheckSettings with CPU load threshold (MaxCPULoadPercent)
- Add CPUInfo struct to runner capabilities
- Add RunnerCleanupRequest model for tracking cleanup requests
- Add GetPendingCleanupRequest for FetchTask cleanup signaling
- Server FetchTask now sets RequestCleanup flag when cleanup is needed
- Add health monitoring background service with email alerts
- Skip unhealthy runners (low disk, high CPU, high latency) during job assignment

🤖 Generated with Claude Code
2026-01-14 08:48:36 +00:00
GitCaddy
a197cd7648 fix: Replace Gitea branding with GitCaddy throughout codebase
- Fix lint errors in AI learning MCP tools (interface{} -> any, append pattern)
- Update OAuth realm names from Gitea to GitCaddy
- Update User-Agent strings to GitCaddy
- Update default git user.name, mailer X-Mailer header
- Update API docs descriptions
- Update template comments and swagger descriptions
- Keep Gitea attribution in footer and as OAuth provider option

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 06:41:05 +00:00
GitCaddy
e1a88ef43c fix: resolve import cycle and template errors
- Remove repo_service import from services/context/repo.go (caused import cycle)
- Inline HasWiki check using gitrepo.IsRepositoryExist
- Fix type assertion for Repo in org/home.go (any -> *repo_model.Repository)
- Add missing {{end}} in org/home.tmpl template
- Update licenses.txt with MarketAlly header

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 08:03:05 +00:00
GitCaddy
e1254cdf9b feat: UI improvements and API documentation updates
- Update swagger/ui.tmpl to use Scalar instead of swagger-ui
- Add version selector bar to v1 and v2 API docs
- Update theme colors to green (#609926) in light/dark themes
- Add MarketAlly header to licenses.txt generation
- Fix Hide Explore Users functionality
- Fix org home visibility for private repos and empty states
- Fix wiki/packages visibility for non-members
- Add promotional format for pinned orgs on homepage

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 07:53:43 +00:00
GitCaddy
5c6c7dada5 feat: Landing Page Settings UI and template improvements
Some checks are pending
Build and Release / Lint (push) Waiting to run
Build and Release / Unit Tests (push) Waiting to run
Build and Release / Integration Tests (PostgreSQL) (push) Waiting to run
Build and Release / Create Release (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 full UI-based landing page configuration (Brand, Hero, Content, Social, Pricing, Footer, Theme)
- Replace old templates with new designs: open-source-hero, minimalist-docs, saas-conversion, bold-marketing
- Add pricing section support to all landing page templates
- Add social links with icons to footer across all templates
- Fix footer copyright to use configured value from settings
- Add copyright symbol button in Footer & CTA settings
- Fix ThemeStruct missing HideExploreUsers and HelpURL fields
- Replace Gitea logo with GitCaddy icon in navbar, favicon, and assets
- Add testimonials array with random selection to templates

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 04:54:42 +00:00
GitCaddy
268db4e935 feat(repo): add display title, license settings, and API header link
- Add repository display title field shown in header and explore listings
- Add license settings page with predefined license types
- Auto-create LICENSE.md when license type is selected
- Show license in repo sidebar with link to LICENSE.md
- Add API header link option in theme settings
- Default explore/organizations sort to alphabetical
- Show org DisplayName only in /explore/organizations

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 17:15:41 +00:00
GitCaddy
67505cb7c6 feat(theme): add homepage customization and pinned organizations
- Add customizable homepage title and tagline via admin theme settings
- Add ability for site admins to pin organizations to homepage
- Add pinned organization display format option (condensed/regular)
- Hide promotional text when pinned organizations are displayed
- Add database migration for is_homepage_pinned column
- Add custom site icon support for favicon and navbar

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 16:17:51 +00:00
GitCaddy
14072ba013 chore: update copyright headers to MarketAlly
- New files: Copyright 2026 MarketAlly
- Modified files: Copyright YYYY The Gitea Authors and MarketAlly

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 22:56:56 +00:00
GitCaddy
f14cde6e37 fix: run gofmt/gofumpt to fix lint formatting errors
🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-11 21:27:24 +00:00
ba8ae2a209 feat: group release downloads by OS, load primary language for pinned repos
- Add ToLower to StringUtils template helper
- Add slice and Append template functions for grouping
- Group release attachments by OS (Windows, macOS, Linux, Other)
- Load primary language for org pinned repos to show in cards

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-11 04:27:55 +00:00
2870ab50b0 fix: add IsOrganizationMember check for pin to org dropdown
The pin dropdown now correctly shows the Pin to Organization option
when viewing a repo owned by an org where the user is a member.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 02:34:34 +00:00
7d675ffe35 fix: org overview stats field names and add star count
- Rename OrgOverviewStats fields to match template expectations
- Add TotalStars field to show aggregate star count
- Add CountOrgRepoStars function to repo model
- Fix API struct and handler to use new field names

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 02:30:54 +00:00
fe90afcef9 feat: add activity heatmap on profile overview
- Add ShowHeatmapOnProfile field to user model
- Add checkbox in user settings under privacy section
- Display heatmap on profile overview page when enabled
- Users can now show their contribution activity on their profile

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 02:22:40 +00:00
4fab671be9 feat: Pin repos to user profile or organization
- Add UserPinnedRepo model for pinning repos to user profiles
- Add Pin dropdown in repo header with options for profile/org
- Add pin/unpin routes and handlers
- Update user profile to show pinned repos with nice cards
- User overview tab always visible (like org overview)
- Shows empty state with instructions when no pinned repos
- Limit of 6 pinned repos per user
- Org members can pin repos to organization

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 02:09:07 +00:00
731e40a3be feat(pages): Add subdomain routing and default config support
- Update subdomain parser to use {repo}-{owner}.{domain} format
- Add middleware to intercept Pages subdomain requests
- Generate default config when Pages enabled but no .gitea/landing.yaml
- Pages are public landing pages (accessible even for private repos)

🤖 Generated with Claude Code
2026-01-11 00:15:21 +00:00
Claude Code
1da8d543fa fix: Use repo-owner format for Pages subdomain URL
- Format: {repo}-{owner}.{domain} (e.g., gitcaddy-gitcaddy.git-test.marketally.com)
- Simpler and unique URL structure
2026-01-11 00:51:31 +01:00
Claude Code
5207756194 fix: Make Pages subdomain URL clickable and display proper domain
- Show full URL instead of just subdomain
- Make it a clickable hyperlink with target=_blank
- Use setting.Domain for proper URL construction
2026-01-11 00:45:29 +01:00
Claude Code
684e4d0dac feat: Add SSL external option for Pages custom domains
- Add checkbox to mark SSL as handled externally (e.g., Cloudflare)
- Add Activate SSL button for verified domains with pending SSL
- Add SSLExternal option to API
- Useful when using CDN/reverse proxy that handles SSL certificates
2026-01-11 00:40:44 +01:00
efb82c1763 feat(api): Add v2 API for public releases and app updates
- Add public_landing option to allow private repos to have public landing pages
- Add public_releases option to allow private repos to serve releases publicly
- Add /api/v2/repos/{owner}/{repo}/releases/update endpoint for Electron/Squirrel compatible app updates
- Add /api/v2/repos/{owner}/{repo}/pages/config and /content endpoints
- Add repoAssignmentWithPublicAccess middleware to bypass auth for public landing/releases
- Update README with documentation for new features

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 08:10:41 -05:00
fca40a808d Add AI-friendly enhancements: runner capabilities, release archive, action compatibility
- 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
f3b025bc3e fix: resolve all remaining golangci-lint errors
- 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
3ac8fa45bb fix: resolve all golangci-lint errors in v2 API
- 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
f9ad19a97e fix: resolve build errors in v2 API and wiki service
- 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
81453b7940 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
c3576c5426 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
961d5bc356 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
4eb78128b8 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
Lunny Xiao
93b55820fe 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
7b4287a324 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