-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add publication time to registry package release metadata #6407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Motivation: Registry should have information about how a package was published. This includes who published it, who signed it, and when it was published. - "Who published the package release?": this is `metadata.author`, which is already defined in the metadata JSON schema. - "Who signed the package release?": this can be extracted from the signing certificate if signed (requires rdar://107483043 and will be done in separate PR) - "When was the release published?": added in this PR rdar://106674475 Modifications: - Add `originalPublicationTime` to user-provided metadata during publication - Add `publishedAt` to registry's package release metadata response - Update registry API spec
| `author` | [Author](#author-type) | Author of the package release. | | | ||
| `description` | String | A description of the package release. | | | ||
| `licenseURL` | String | URL of the package release's license document. | | | ||
| `originalPublicationTime` | String | Original publication time of the package release in [ISO 8601] format. This can be set if the package release was previously published elsewhere.<br>A registry should record the publication time independently and include it as `publishedAt` in the [package release metadata response](#42-fetch-information-about-a-package-release). <br>In case both `originalPublicationTime` and `publishedAt` are set, `originalPublicationTime` should be used. | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is new
| `version` | String | The package release version number. | ✓ | | ||
| `resources` | Array | The resources available for the release. | ✓ | | ||
| `metadata` | Object | Additional information about the release. | ✓ | | ||
| `publishedAt` | String | The [ISO 8601]-formatted datetime string of when the package release was published, as recorded by the registry. See related [`originalPublicationTime`](#appendix-b---package-release-metadata-json-schema) in `metadata`. | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is new
@swift-ci please smoke test |
@swift-ci please smoke test Linux |
1 similar comment
@swift-ci please smoke test Linux |
Can we also add this to |
@swift-ci please test Windows platform |
} | ||
|
||
// FIXME: This matches the current implementation, but we may want be smarter about it? | ||
private func guessReadMeURL(baseURL: URL, defaultBranch: String) -> URL { | ||
return baseURL.appendingPathComponent("raw").appendingPathComponent(defaultBranch).appendingPathComponent("README.md") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😿
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should remove readmeURL from the API and let the clients figure it out using their own logic.
…6407) * Add publication time to registry package release metadata Motivation: Registry should have information about how a package was published. This includes who published it, who signed it, and when it was published. - "Who published the package release?": this is `metadata.author`, which is already defined in the metadata JSON schema. - "Who signed the package release?": this can be extracted from the signing certificate if signed (requires rdar://107483043 and will be done in separate PR) - "When was the release published?": added in this PR rdar://106674475 Modifications: - Add `originalPublicationTime` to user-provided metadata during publication - Add `publishedAt` to registry's package release metadata response - Update registry API spec * Add publishedAt to PackageSearchClient
) * Add publication time to registry package release metadata Motivation: Registry should have information about how a package was published. This includes who published it, who signed it, and when it was published. - "Who published the package release?": this is `metadata.author`, which is already defined in the metadata JSON schema. - "Who signed the package release?": this can be extracted from the signing certificate if signed (requires rdar://107483043 and will be done in separate PR) - "When was the release published?": added in this PR rdar://106674475 Modifications: - Add `originalPublicationTime` to user-provided metadata during publication - Add `publishedAt` to registry's package release metadata response - Update registry API spec * Add publishedAt to PackageSearchClient
Motivation:
Registry should have information about how a package was published. This includes who published it, who signed it, and when it was published.
metadata.author
, which is already defined in the metadata JSON schema.rdar://106674475
Modifications:
originalPublicationTime
to user-provided metadata during publicationpublishedAt
to registry's package release metadata response