krz/hutch

an ios client for sourcehut

clone: git clone https://gitbay.org/krz/hutch.git

7cc3e14f235a3c3e6719271116e49865c82c15da

verified · cmc

author: Christian Cleberg <hello@cleberg.net> · 2026-04-02T03:29:51Z

fix copy throughout repo
 Hutch/API_REFERENCE.md                            | 15 +++++++--------
 Hutch/Networking/SRHTClient.swift                 |  8 ++++----
 Hutch/Networking/SRHTError.swift                  |  2 +-
 Hutch/Networking/SRHTService.swift                |  2 +-
 Hutch/Views/More/MoreView.swift                   |  2 +-
 Hutch/Views/Repositories/RepositoryListView.swift |  2 +-
 Hutch/Views/Settings/SettingsView.swift           |  4 ++--
 7 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/Hutch/API_REFERENCE.md b/Hutch/API_REFERENCE.md
index 909316c..a2888fc 100644
--- a/Hutch/API_REFERENCE.md
+++ b/Hutch/API_REFERENCE.md
@@ -1,10 +1,10 @@
 # Sourcehut API Reference
 
-This document provides context and references for working with Sourcehut's APIs.
+This document provides context and references for working with SourceHut's APIs.
 
 ## Official Documentation
 
-The official Sourcehut API documentation can be found at:
+The official SourceHut API documentation can be found at:
 - **https://man.sr.ht** - Contains links to API reference pages for all *.sr.ht services
 
 ## Services and Their APIs
@@ -70,7 +70,7 @@ input Filter {
 
 ### Error Handling
 
-Sourcehut APIs return GraphQL errors in the following format:
+    SourceHut APIs return GraphQL errors in the following format:
 
 ```json
 {
@@ -107,7 +107,7 @@ Use GraphiQL interfaces available at each service's `/graphql` endpoint to:
 
 1. **Filtering**: Some services may not support all filter operations. Check the schema.
 2. **Pagination**: Always handle `cursor` properly for pagination.
-3. **Caching**: Sourcehut APIs may have aggressive caching. Use cache headers appropriately.
+3. **Caching**: SourceHut APIs may have aggressive caching. Use cache headers appropriately.
 
 ### Example Query Structure
 
@@ -141,7 +141,6 @@ query {
 
 ## Additional Resources
 
-- Sourcehut API Status: https://status.sr.ht
-- Sourcehut Meta (announcements): https://meta.sr.ht
-- Sourcehut GitHub Mirror: https://github.com/sourcehut
-- IRC: #sourcehut on Libera.Chat
\ No newline at end of file
+- SourceHut API Status: https://status.sr.ht
+- SourceHut Man Pages: https://man.sr.ht
+- IRC: #sr.ht on Libera.Chat
diff --git a/Hutch/Networking/SRHTClient.swift b/Hutch/Networking/SRHTClient.swift
index 4a6b3ca..ddbd97f 100644
--- a/Hutch/Networking/SRHTClient.swift
+++ b/Hutch/Networking/SRHTClient.swift
@@ -13,7 +13,7 @@ struct MultipartUploadFile: Sendable {
 /// Placeholder type for decoding GraphQL error responses when the data shape is unknown.
 private struct EmptyData: Decodable {}
 
-/// A lightweight GraphQL client for Sourcehut services.
+/// A lightweight GraphQL client for SourceHut services.
 /// All requests require a personal access token set via ``token``.
 final class SRHTClient: Sendable {
 
@@ -45,10 +45,10 @@ final class SRHTClient: Sendable {
         _token.withLock { $0 = token }
     }
 
-    /// Execute a GraphQL query or mutation against a Sourcehut service.
+    /// Execute a GraphQL query or mutation against a SourceHut service.
     ///
     /// - Parameters:
-    ///   - service: The target Sourcehut service (determines the endpoint URL).
+    ///   - service: The target SourceHut service (determines the endpoint URL).
     ///   - query: The GraphQL query or mutation string.
     ///   - variables: Optional dictionary of GraphQL variables.
     ///   - responseType: The expected `Decodable` type nested under `data`.
@@ -163,7 +163,7 @@ final class SRHTClient: Sendable {
     /// graphql-multipart-request-spec (multipart/form-data).
     ///
     /// - Parameters:
-    ///   - service: The target Sourcehut service.
+    ///   - service: The target SourceHut service.
     ///   - query: The GraphQL mutation string.
     ///   - variables: Variables dict; the file variable should be set to `nil`.
     ///   - fileVariablePath: The dot-separated path to the file variable (e.g. "input.avatar").
diff --git a/Hutch/Networking/SRHTError.swift b/Hutch/Networking/SRHTError.swift
index 3c3a87f..b9fc4c8 100644
--- a/Hutch/Networking/SRHTError.swift
+++ b/Hutch/Networking/SRHTError.swift
@@ -1,6 +1,6 @@
 import Foundation
 
-/// Errors produced by the Sourcehut GraphQL client.
+/// Errors produced by the SourceHut GraphQL client.
 enum SRHTError: LocalizedError, Sendable {
     /// The server returned one or more GraphQL-level errors.
     case graphQLErrors([GraphQLError])
diff --git a/Hutch/Networking/SRHTService.swift b/Hutch/Networking/SRHTService.swift
index 416b733..3aa805f 100644
--- a/Hutch/Networking/SRHTService.swift
+++ b/Hutch/Networking/SRHTService.swift
@@ -1,6 +1,6 @@
 import Foundation
 
-/// Each Sourcehut service exposes its own GraphQL endpoint.
+/// Each SourceHut service exposes its own GraphQL endpoint.
 enum SRHTService: String, Codable, Sendable, CaseIterable {
     case meta
     case hub
diff --git a/Hutch/Views/More/MoreView.swift b/Hutch/Views/More/MoreView.swift
index 3e2a019..001a9d6 100644
--- a/Hutch/Views/More/MoreView.swift
+++ b/Hutch/Views/More/MoreView.swift
@@ -36,7 +36,7 @@ struct MoreView: View {
             } header: {
                 Text("External Links")
             } footer: {
-                Text("These SourceHut services are not supported in-app and open in your browser.")
+                Text("These SourceHut services are not supported in-app, as the SourceHut API does not support them, and will open in your browser.")
             }
         }
         .navigationTitle("More")
diff --git a/Hutch/Views/Repositories/RepositoryListView.swift b/Hutch/Views/Repositories/RepositoryListView.swift
index 90876e7..aec0357 100644
--- a/Hutch/Views/Repositories/RepositoryListView.swift
+++ b/Hutch/Views/Repositories/RepositoryListView.swift
@@ -217,7 +217,7 @@ private struct CreateRepositorySheet: View {
                             ProgressView()
                                 .controlSize(.small)
                         } else {
-                            Text("Create Repository")
+                            Text("Create")
                         }
                     }
                     .disabled(name.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || viewModel.isCreatingRepository)
diff --git a/Hutch/Views/Settings/SettingsView.swift b/Hutch/Views/Settings/SettingsView.swift
index 237c076..7f4aa07 100644
--- a/Hutch/Views/Settings/SettingsView.swift
+++ b/Hutch/Views/Settings/SettingsView.swift
@@ -713,7 +713,7 @@ private struct AboutView: View {
                 VStack(alignment: .leading, spacing: 6) {
                     Text(appName)
                         .font(.title2.weight(.semibold))
-                    Text("A native SourceHut client for iPhone.")
+                    Text("A native SourceHut client for iOS.")
                         .font(.subheadline)
                         .foregroundStyle(.secondary)
                 }
@@ -752,7 +752,7 @@ private struct AboutView: View {
             }
 
             Section("Acknowledgements") {
-                Text("Built for SourceHut users who want quick access to repositories, builds, and tickets on iPhone.")
+                Text("Built for SourceHut users who want quick access to repositories, builds, and tickets on iOS.")
                     .font(.subheadline)
                     .foregroundStyle(.secondary)
             }