Merge dcs-base-v1.25 into release/dcs/v1.25#411
Merged
Conversation
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>
… 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>
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>
The background goroutines were passing the shared *Repository pointer directly. ProcessDoor43MetadataForRepo then called LoadLatestDMs() which writes to repo fields, racing with other notifiers reading the same repo concurrently. Fix: extract processInBackground() helper that captures only repo ID and name, then loads a fresh Repository inside the goroutine via GetRepositoryByID(), eliminating shared mutable state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code