Skip to content

Merge dcs-base-v1.25 into main (with API fix)#418

Merged
richmahn merged 90 commits into
mainfrom
main-and-base
Apr 19, 2026
Merged

Merge dcs-base-v1.25 into main (with API fix)#418
richmahn merged 90 commits into
mainfrom
main-and-base

Conversation

@richmahn

Copy link
Copy Markdown
Member

Summary

  • Merge dcs-base-v1.25 changes into main
  • Fix context cancellation in Door43Metadata notifier goroutines
  • Add ConvertRC2SB service to convert RC repos to Scripture Burrito format
  • Remove expand view DCS feature
  • Update CLAUDE.md
  • Fix convertrc2sb.go for upstream main refactored git command API (RunOpts removed, use .WithDir() chain instead)

Test plan

  • Verify build succeeds
  • Run DCS integration tests
  • Test catalog and metadata features

silverwind and others added 8 commits March 13, 2026 01:20
Add `SetDefaultValues()` call to ensure PageSize is bounded, preventing
potential excessive memory allocation from unbounded pagination
parameters.

Fixes CodeQL alert
[#188](https://github.com/go-gitea/gitea/security/code-scanning/188).
All other 49 open alerts were false-positives and are dismissed with
appropriate comments.

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Replace the `@github/relative-time-element` npm dependency with a
vendored, simplified implementation.

- Support 24h format rendering [PR
329](github/relative-time-element#329)
- Enable `::selection` styling in Firefox [PR
341](github/relative-time-element#341)
- Remove timezone from tooltips (It's always local timezone)
- Clean up previous `title` workaround in tippy
- Remove unused features
- Use native `Intl.DurationFormat` with fallback for older browsers,
remove dead polyfill
- Add MIT license header to vendored file
- Add unit tests
- Add dedicated devtest page for all component variants

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude claude-opus-4-6 20250630 <noreply@anthropic.com>
Adds a new service that converts Resource Container (RC) repositories to
Scripture Burrito (SB) format and pushes the result to a "main" branch.

Conversion is triggered three ways:
- Automatically via notification hooks when a release is created/updated
- Manually via the admin dashboard "Convert RC to Scripture Burrito" button
- Via CLI command: gitea convertrc2sb [--owner X --repo Y]

Qualifying repos must have: MetadataType="rc", DefaultBranch="master",
and a topic of "tc-create", "tc-ready", "pushing2sb", or "rc2sb".

New files:
- services/convertrc2sb/convertrc2sb.go (core conversion logic)
- services/convertrc2sb/convertrc2sb_notifier.go (notification hooks)
- cmd/convertrc2sb.go (CLI command)

Modified files:
- cmd/main.go, routers/init.go (wire up new service)
- services/cron/tasks_dcs.go, tasks_basic.go (cron task registration)
- templates/admin/dashboard.tmpl (admin button)
- options/locale/locale_en-US.ini (locale string)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Several notification handlers (ChangeDefaultBranch, SyncPushCommits,
MigrateRepository, TransferRepository, ForkRepository, RenameRepository)
were passing the HTTP request context directly to goroutines. When the
HTTP response completes, the request context is cancelled, which could
kill the goroutine before ProcessDoor43MetadataForRepo finishes.

Fix: use graceful.GetManager().ShutdownContext() for all goroutine-based
handlers, matching the pattern already used by PushCommits. Also fixed a
missing err argument in the ChangeDefaultBranch log.Error call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Upstream main refactored gitcmd.RunOpts away — RunStdString now only
takes ctx, and the working directory is set via the chained .WithDir()
method. Update all 8 call sites in convertrc2sb.go accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
crawfordxx and others added 3 commits March 13, 2026 09:58
Fix missing apostrophes in contractions across multiple source files.

Changes:
- `doesnt` -> `doesn't` in `routers/api/v1/repo/git_ref.go` (2
occurrences)
- `dont` -> `don't` in `models/activities/notification_list.go`,
`modules/indexer/code/bleve/token/path/path.go`,
`routers/api/v1/repo/release.go`,
`services/migrations/gitea_downloader.go`,
`services/repository/contributors_graph.go`
- `wont` -> `won't` in `routers/api/v1/repo/issue_subscription.go`,
`models/issues/label_test.go`

Ref: #35015 (good first issues - improve English)

---------

Co-authored-by: majianhan <majianhan@kylinos.cn>
Co-authored-by: silverwind <me@silverwind.io>
Frontport #36885

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
silverwind and others added 2 commits March 14, 2026 09:50
Enable swagger-ui's dark mode support added in
swagger-api/swagger-ui#10653. Background colors
match gitea, link colors match swagger-ui.

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
richmahn and others added 9 commits March 14, 2026 09:54
… and unit tests

- Fix 113 Go lint issues across ~35 DCS files (modernize, perfsprint,
  errcheck, staticcheck, revive, nilnil, usestdlibvars, govet, gofumpt,
  ineffassign, unparam, nakedret)
- Fix 3 spelling errors (hexidecimal, transfered, langauges)
- Fix template lint: HTTP→HTTPS links, javascript: hrefs, entity refs,
  orphan tags in 5 template files
- Fix swagger: /catalog/bp/{owner}/{repo} ref param changed from path
  to query parameter
- Fix markdown lint in dcs-customizations.md: table separator spacing
  and blank lines around headings/lists
- Fix unit tests: door43metadata_test.go function signature,
  blockexpensive_test.go DCS expectations, gitref.go vet error
- Regenerate go-licenses.json (add go-rc2sb) and swagger

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…pectations, markdown

- Fix copyright headers in DCS routes.go files (require "Gitea" per gitea-vet)
- Fix MSSQL duplicate ORDER BY in GetLatestReleaseByRepoID (remove
  redundant Desc() call that other DBs silently accepted)
- Replace custom contains() with slices.Contains in catalog.go
- Update TestAPICron/List expected count from 29 to 33 (DCS adds 4 cron tasks)
- Update TestRequireSignInView/BlockAnonymousAccessExpensive to use
  src/commit/ path (DCS makes broad src/ non-expensive)
- Fix CLAUDE.md markdown lint errors (blank lines, trailing punctuation,
  table separators)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts:
#	cmd/convertrc2sb.go
#	cmd/door43metadata.go
#	models/repo/release.go
#	models/repo/repo_list.go
#	modules/dcs/books.go
#	modules/markup/tsv/tsv.go
#	routers/common/blockexpensive_test.go
#	services/convertrc2sb/convertrc2sb.go
#	services/door43metadata/door43metadata.go
#	services/door43metadata/door43metadata_test.go
#	services/gitref/gitref.go
#	templates/repo/dcs_metadata_list_item.tmpl
Document the full DCS fork branching model, including:
- ASCII diagram of branch topology and merge flow
- Day-to-day development workflow (dcs-base-v#.## first)
- How to handle API differences between release and main targets
- Step-by-step procedure for creating new dcs-base for new Gitea versions
- Localization conventions (dcs. prefix, override keys, INI vs JSON)
- Tips for working with Claude Code on this fork

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document the full DCS fork branching model, including:
- ASCII diagram of branch topology and merge flow
- Day-to-day development workflow (dcs-base-v#.## first)
- How to handle API differences between release and main targets
- Step-by-step procedure for creating new dcs-base for new Gitea versions
- Localization conventions (dcs. prefix, override keys, INI vs JSON)
- Tips for working with Claude Code on this fork

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
silverwind and others added 23 commits March 23, 2026 07:49
- Enable a few more rules, fix issues. The 2 `value` issues are
false-positives.
- Add exact types for `window.pageData` and
`window.notificationSettings`.
- peerDependencyRules for eslint-plugin-github unrestricted, the plugin
works in v10, but does not declare compatibility, pending
github/eslint-plugin-github#680.
- Added
[eslint-plugin-de-morgan](https://github.com/azat-io/eslint-plugin-de-morgan),
no violations.

---------

Signed-off-by: silverwind <me@silverwind.io>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Automated changes by the
[update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock)
GitHub Action.

```
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/c06b4ae' (2026-03-13)
  → 'github:nixos/nixpkgs/b40629e' (2026-03-18)
```

### Running GitHub Actions on this PR

GitHub Actions will not run workflows on pull requests which are opened
by a GitHub Action.

**To run GitHub Actions workflows on this PR, close and re-open this
pull request.**

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Add this config option, applying to new repos:

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

Defaults to `false`, preserving current behavior.

---------

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
- Rework all checkbox styling to be consistent inside and outside
markup.
- Remove `input` border hover effect. Was too subtle and honestly
unneeded, consistent with GitHub.
- Increase `input` border contrast slightly.
- Some small spacing fixes in Markup (nested tasklist and spacing after
checkbox).

<img width="221" height="222" alt="Screenshot 2026-03-09 at 08 18 19"
src="https://github.com/user-attachments/assets/9e66abee-7102-4abe-9b00-e3f9b24ed735"
/>
<img width="226" height="217" alt="Screenshot 2026-03-09 at 08 18 10"
src="https://github.com/user-attachments/assets/33cdac26-4479-41da-9488-e60d70c5c997"
/>
<img width="79" height="218" alt="Screenshot 2026-03-09 at 08 17 32"
src="https://github.com/user-attachments/assets/ae1064a2-2bb3-44e7-a00b-2f4f5aad4241"
/>
<img width="267" height="297" alt="Screenshot 2026-03-09 at 08 17 07"
src="https://github.com/user-attachments/assets/1237fa98-0d94-4023-a87d-190d89c57421"
/>
<img width="558" height="260" alt="Screenshot 2026-03-09 at 08 21 04"
src="https://github.com/user-attachments/assets/1908a794-3394-494c-b2d5-470c00c668d1"
/>

---------

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
1. remove `TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY`
* it defaults to false and is unlikely to be useful for most users (see
#22130)
* with new git versions (>= 2.40), "merge-tree" is used,
"checkConflictsByTmpRepo" isn't called, the option does nothing.
2. fix fragile `db.Cell2Int64` (new: `CellToInt`)
3. allow more routes in maintenance mode (e.g.: captcha)
4. fix MockLocale html escaping to make it have the same behavior as
production locale
Update all Actions to their latest major versions:

- `actions/checkout`: v5 → v6
- `dorny/paths-filter`: v3 → v4
- `pnpm/action-setup`: v4 → v5
- `docker/setup-qemu-action`: v3 → v4
- `docker/setup-buildx-action`: v3 → v4
- `docker/build-push-action`: v6 → v7
- `docker/metadata-action`: v5 → v6
- `docker/login-action`: v3 → v4
- `crazy-max/ghaction-import-gpg`: v6 → v7
- `aws-actions/configure-aws-credentials`: v5 → v6

All updates are Node 24 runtime bumps with no workflow-breaking changes
for our usage.

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
…6958)

Move UserDisabledFeatures context data into a shared SettingsCtxData
middleware for the /user/settings route group, so it is set consistently
on all pages (including Notifications, Actions, etc.) instead of only on
the handlers that remembered to set it individually.

Fixes #36954
Related issues including: #36939 , #35619, #34950 , #34253 , #32554

For users who use reverse-proxy, we have documented the requirements
clearly since long time ago :
https://docs.gitea.com/administration/reverse-proxies
1. Remove header line, useless context bloat
2. Reword all "before commiting" lines because some people may not be
using the agent to commit, only to write changes.
Resolves conflicts:
- locale_en-US.ini: removed (main uses JSON); new keys added to JSON
- convertrc2sb.go: kept HEAD RepoQualifiesForConversion check
- dcs_healthcheck.tmpl: new simplified design with dcs.repo.metadata keys
- dcs_metadata.tmpl: new summary page with dcs.repo.metadata keys
- door43metadata.go: adapted NewPagination call for int64 signature on main

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolves conflicts:
- models/issues/pull.go: removed unused regexp import, kept DCS strconv
- locale_en-US.json: merged DCS keys with new upstream keys
- applications.go: removed unused user_model, kept DCS log import
- index-domready.ts: added upstream initActionsPermissionsForm alongside DCS inits
- sbarchiver/archiver.go: URL -> ServeDirectURL (upstream API change)
- door43metadata.go: URL -> ServeDirectURL (upstream API change)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
richmahn and others added 4 commits April 17, 2026 06:58
The Gitea SDK's hashicorp/go-version library cannot parse DCS version
strings like '1.25.7+dcs+2-g4f5ce5854b' because they contain multiple
'+' characters (only one '+' is allowed in build metadata).

Two-part fix:
1. version.go: Normalize the API-reported version by replacing any
   second '+' with '.' so remote clients can parse it
   (e.g., '1.25.7+dcs+2-g4f5ce5854b' -> '1.25.7+dcs.2-g4f5ce5854b').
2. gitea_downloader.go: Handle ErrUnknownVersion from NewClient as a
   warning rather than a fatal error. The SDK was designed to return
   both the client and this error so callers can choose to proceed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- dcs.go: fix alignment whitespace on Door43PreviewURL field
- topic.go (api + web): convert DCS import-block markers to end-of-line
  style (gitea-fmt rejects block comments inside import groups)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@richmahn richmahn merged commit 0cd76c5 into main Apr 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.