diff options
Diffstat (limited to 'Hutch/Extensions')
| -rw-r--r-- | Hutch/Extensions/SRHTWebURL.swift | 16 |
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", |
