Skip to content
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

Add author and signer to package collection models #6415

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

yim-lee
Copy link
Contributor

@yim-lee yim-lee commented Apr 12, 2023

Motivation:
Package collection should have information about how a version was created. This includes the creator and signer.

#6408 added author populated using GitHub data, but we can allow package collection author to specify version creator as well.

rdar://106674475

Modifications:

  • Add author and signer to package collection models
  • Update PackageSearchClient to use more information from collection/index results

Motivation:
Package collection should have information about how a version was created. This includes the creator and signer.

swiftlang#6408 added `author` populated using GitHub data, but we can allow package collection author to specify version creator as well.

rdar://106674475

Modifications:
- Add `author` and `signer` to package collection models
- Update `PackageSearchClient` to use more information from collection/index results
@yim-lee
Copy link
Contributor Author

yim-lee commented Apr 12, 2023

@swift-ci please smoke test

@@ -657,7 +657,8 @@ public struct PackageCollections: PackageCollectionsProtocol, Closable {
defaultToolsVersion: packageVersion.defaultToolsVersion,
verifiedCompatibility: packageVersion.verifiedCompatibility,
license: packageVersion.license,
author: versionMetadata?.author,
author: versionMetadata?.author ?? packageVersion.author,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Author info can come from GitHub or package collection

description: latestVersion?.summary,
publishedAt: latestVersion?.createdAt,
signingEntity: latestVersion?.signer.map { SigningEntity(signer: $0) },
latestVersion: latestVersion?.version,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can set some of these using the package's latest version listed in the collection/index result.

@yim-lee
Copy link
Contributor Author

yim-lee commented Apr 12, 2023

@swift-ci please test Windows platform

@yim-lee yim-lee merged commit 4b2c7ba into swiftlang:main Apr 12, 2023
@yim-lee yim-lee deleted the collection-signer branch April 12, 2023 20:30
yim-lee added a commit to yim-lee/swift-package-collection-generator that referenced this pull request Apr 12, 2023
Motivation:
A package version in a package collection can have `signer`, which was added swiftlang/swift-package-manager#6415

Modification:
Add `signer` to package level input. If set, all versions of the package will have that `signer`.
yim-lee added a commit to yim-lee/swift-package-collection-generator that referenced this pull request Apr 12, 2023
Motivation:
A package version in a package collection can have `signer`, which was added swiftlang/swift-package-manager#6415

Modification:
Add `signer` to package level input. If set, all versions of the package will have that `signer`.
yim-lee added a commit to swiftlang/swift-package-collection-generator that referenced this pull request Apr 13, 2023
Motivation:
A package version in a package collection can have `signer`, which was added swiftlang/swift-package-manager#6415

Modification:
Add `signer` to package level input. If set, all versions of the package will have that `signer`.
yim-lee added a commit to swiftlang/swift-package-collection-generator that referenced this pull request Apr 13, 2023
Motivation:
A package version in a package collection can have `signer`, which was added swiftlang/swift-package-manager#6415

Modification:
Add `signer` to package level input. If set, all versions of the package will have that `signer`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants