Skip to content

Commit 69aa110

Browse files
authored
Merge pull request #3539 from SwiftPackageIndex/gate-custom-collections
Gate custom collection links on the Package page to staging
2 parents 7fc8bec + cc519fe commit 69aa110

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Sources/App/Views/PackageController/GetRoute.Model+ext.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,10 @@ extension API.PackageController.GetRoute.Model {
399399
}
400400

401401
func customCollectionsListItem() -> Node<HTML.ListContext> {
402+
@Dependency(\.environment) var environment
403+
guard environment.current() == .development
404+
else { return .empty }
405+
402406
guard customCollections.isEmpty == false
403407
else { return .empty }
404408

Tests/AppTests/__Snapshots__/WebpageSnapshotTests/test_PackageShowView_customCollection.1.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,6 @@ <h4>When working with a Swift Package Manager manifest:</h4>
162162
<a href="https://github.com/Alamofire/Alamofire/pulls">5 open pull requests</a>. The last issue was closed 5 days ago and the last pull request was merged/closed 6 days ago.
163163
</li>
164164
<li class="dependencies">This package depends on 2 other packages.</li>
165-
<li class="custom-collections">Member of the
166-
<a href="/collections/custom-collection">Custom Collection</a> collection.
167-
</li>
168165
<li class="license"> licensed</li>
169166
<li class="stars">17 stars</li>
170167
<li class="libraries">3 libraries</li>

0 commit comments

Comments
 (0)