Swift registry metadata: preserve submitted JSON fields (repositoryURLs/licenseURL) and accept empty metadata payloads#37254
Merged
wxiaoguang merged 10 commits intomainfrom Apr 17, 2026
Conversation
Agent-Logs-Url: https://github.com/go-gitea/gitea/sessions/69b8d55c-efe9-417d-8ee3-a2b867320e12 Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
wxiaoguang
April 17, 2026 14:33
View session
wxiaoguang
approved these changes
Apr 17, 2026
TheFox0x7
approved these changes
Apr 17, 2026
bircni
approved these changes
Apr 17, 2026
auto-merge was automatically disabled
April 17, 2026 16:41
Pull request was converted to draft
Contributor
|
Double checked, @copilot Also need to add |
Co-Authored-By: Copilot GPT-5.4 <copilot-gpt-5.4@users.noreply.github.com> Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
Contributor
Author
... Implemented in |
Copilot
AI
changed the title
Swift registry metadata: preserve submitted JSON fields and accept empty metadata payloads
Swift registry metadata: preserve submitted JSON fields (repositoryURLs/licenseURL) and accept empty metadata payloads
Apr 17, 2026
wxiaoguang
approved these changes
Apr 17, 2026
wxiaoguang
pushed a commit
to wxiaoguang/gitea
that referenced
this pull request
Apr 17, 2026
wxiaoguang
pushed a commit
to wxiaoguang/gitea
that referenced
this pull request
Apr 17, 2026
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Apr 20, 2026
* main: (25 commits) Add WebKit to e2e test matrix (go-gitea#37298) Don't add useless labels which will bother changelog generation (go-gitea#37267) Fix Repository transferring page (go-gitea#37277) Stabilize issue-project e2e test, increase timeout factor (go-gitea#37297) Fix Mermaid diagrams failing when node labels contain line breaks (go-gitea#37296) Add project column picker to issue and pull request sidebar (go-gitea#37037) Fix container auth for public instance (go-gitea#37290) Refactor frontend `tw-justify-between` layouts to `flex-left-right` (go-gitea#37291) Update Nix flake (go-gitea#37284) Workflow Artifact Info Hover (go-gitea#37100) [skip ci] Updated translations via Crowdin release notes for 1.26.0 (go-gitea#37282) Enhance GetActionWorkflow to support fallback references (go-gitea#37189) Refactor LDAP tests (go-gitea#37274) Remove `SubmitEvent` polyfill (go-gitea#37276) Upgrade go-git to v5.18.0 (go-gitea#37268) Avoid top-level await (go-gitea#37272) Frontend iframe renderer framework: 3D models, OpenAPI (go-gitea#37233) pull: Fix CODEOWNERS absolute path matching. (go-gitea#37244) Swift registry metadata: preserve more JSON fields and accept empty metadata (go-gitea#37254) ...
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.
Description
Swift package upload/metadata handling diverged from the registry schema in multiple ways: user-provided metadata fields were not fully reflected back, and empty JSON metadata needed to be accepted cleanly. This change aligns upload+read behavior with those expectations and adds regression coverage.
Metadata round-trip behavior
GET .../swift/{scope}/{name}/{version}now returnsmetadata.repositoryURLsfrom stored Swift version properties (all submitted URLs, not just one).GET .../swift/{scope}/{name}/{version}now returnsmetadata.licenseURLwhen provided in upload metadata JSON.metadata.authoris now omitted when no author data exists, instead of returning an emptyPersonobject.Empty JSON metadata handling
metadata={}(andnull) without producing invalid/empty-author artifacts.Regression coverage
repositoryURLs,licenseURL),licenseURLand empty JSON metadata.Testing
make fmtgo test ./modules/packages/swiftmake 'test-sqlite#TestPackageSwift'