summaryrefslogtreecommitdiff
path: root/Hutch/Extensions/SRHTWebURL.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-12 22:06:16 -0500
committerChristian Cleberg <[email protected]>2026-04-12 22:06:16 -0500
commit86bcd9452d3107f68aca085e03e69b02667c0dbb (patch)
tree8b0adece5cb0f8ffb178eaab2cd12d025c9ebf0a /Hutch/Extensions/SRHTWebURL.swift
parent31cbca674957eea7ae2529012e20a9d95158e561 (diff)
downloadhutch-86bcd9452d3107f68aca085e03e69b02667c0dbb.tar.gz
hutch-86bcd9452d3107f68aca085e03e69b02667c0dbb.tar.bz2
hutch-86bcd9452d3107f68aca085e03e69b02667c0dbb.zip
feat: polish read-only project views and home integration
Refs: https://todo.sr.ht/~ccleberg/hutch/36 Refs: https://todo.sr.ht/~ccleberg/hutch/37 Refs: https://todo.sr.ht/~ccleberg/hutch/38
Diffstat (limited to 'Hutch/Extensions/SRHTWebURL.swift')
-rw-r--r--Hutch/Extensions/SRHTWebURL.swift16
1 files changed, 16 insertions, 0 deletions
diff --git a/Hutch/Extensions/SRHTWebURL.swift b/Hutch/Extensions/SRHTWebURL.swift
index 9bc1552..cd8e8be 100644
--- a/Hutch/Extensions/SRHTWebURL.swift
+++ b/Hutch/Extensions/SRHTWebURL.swift
@@ -63,6 +63,22 @@ enum SRHTWebURL {
)
}
+ static func projectSource(_ source: Project.SourceRepo) -> URL? {
+ userScopedURL(
+ host: "\(source.repoType.service.rawValue).sr.ht",
+ ownerUsername: source.ownerUsername,
+ pathComponents: [source.name]
+ )
+ }
+
+ static func mailingList(ownerUsername: String, listName: String) -> URL? {
+ userScopedURL(
+ host: "lists.sr.ht",
+ ownerUsername: ownerUsername,
+ pathComponents: [listName]
+ )
+ }
+
static func ticket(ownerUsername: String, trackerName: String, ticketId: Int) -> URL? {
userScopedURL(
host: "todo.sr.ht",