From a4853d05281d40832e011b6f03a558c7555b997d Mon Sep 17 00:00:00 2001 From: Eugene Blikh Date: Sat, 18 Jul 2026 21:59:45 +0300 Subject: [PATCH] rename module to sourcecraft.dev/bigbes/sr-ht-compare; depend on sourcecraft sr-ht-core --- README.md | 6 +++--- authz/authz.go | 4 ++-- authz/authz_test.go | 6 +++--- authz/identity.go | 2 +- authz/identity_test.go | 2 +- cmd/comparesrht/main.go | 8 ++++---- gitx/diff.go | 2 +- gitx/fidelity_test.go | 2 +- gitx/gitx.go | 2 +- gitx/gitx_test.go | 2 +- gitx/log.go | 2 +- go.mod | 6 ++---- go.sum | 4 ++-- web/chrome.go | 4 ++-- web/handlers.go | 6 +++--- web/server.go | 4 ++-- web/web_test.go | 10 +++++----- 17 files changed, 35 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 005e3edbcb96c2db3d3e216b924ce37161556370..115107d2ac71a9321489c5f93369974aea053dab 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ fork carries one production S3 patch on top of upstream. ## Build requirements -- **Go** 1.26+ (module `go.bigb.es/sourcehut-compare`). +- **Go** 1.26+ (module `sourcecraft.dev/bigbes/sr-ht-compare`). - **sassc** and **minify** — CSS pipeline (`make css`), building against the shared sourcehut scss partials installed at `/usr/share/sourcehut/scss` (from `core.sr.ht`'s `make install`). `dart-sass` also works for local builds; the @@ -178,8 +178,8 @@ import ( "encoding/json" "fmt" - "git.sr.ht/~sircmpwn/core-go/config" - "git.sr.ht/~sircmpwn/core-go/crypto" + "sourcecraft.dev/bigbes/sr-ht-core/config" + "sourcecraft.dev/bigbes/sr-ht-core/crypto" ) func main() { diff --git a/authz/authz.go b/authz/authz.go index 9885b098c245a2f2ca6a8eebca4c0624a1158195..260719728f5e168c792103f3cda7d09d0d287ebd 100644 --- a/authz/authz.go +++ b/authz/authz.go @@ -7,9 +7,9 @@ import ( "sync" "time" - "git.sr.ht/~sircmpwn/core-go/client" + "sourcecraft.dev/bigbes/sr-ht-core/client" - "go.bigb.es/sourcehut-compare/core" + "sourcecraft.dev/bigbes/sr-ht-compare/core" ) // RepoInfo is the subset of git.sr.ht repository metadata compare.sr.ht needs diff --git a/authz/authz_test.go b/authz/authz_test.go index 90ba9c0f3c87feaddf4641501dab90148e776dfa..b1a5eb2d5a4cd68a51c0614cfb2e7373f3316547 100644 --- a/authz/authz_test.go +++ b/authz/authz_test.go @@ -11,11 +11,11 @@ import ( "testing" "time" - "git.sr.ht/~sircmpwn/core-go/config" - "git.sr.ht/~sircmpwn/core-go/crypto" + "sourcecraft.dev/bigbes/sr-ht-core/config" + "sourcecraft.dev/bigbes/sr-ht-core/crypto" "github.com/vaughan0/go-ini" - "go.bigb.es/sourcehut-compare/core" + "sourcecraft.dev/bigbes/sr-ht-compare/core" ) // authNameFromRequest asserts the incoming request bears an "Internal " diff --git a/authz/identity.go b/authz/identity.go index 823017d1f80bcd2bd84eaa502344a694f996a232..ca6bd4781a077bea334a927a0ecd3b5153757eca 100644 --- a/authz/identity.go +++ b/authz/identity.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "git.sr.ht/~sircmpwn/core-go/crypto" + "sourcecraft.dev/bigbes/sr-ht-core/crypto" ) // CookieName is the SourceHut unified-login session cookie. Its value is a diff --git a/authz/identity_test.go b/authz/identity_test.go index 95541c7f120365eff6e63d5828c77106d385cb46..fd6a637beb1f76bf9705ca1b5a52ce971c118d6b 100644 --- a/authz/identity_test.go +++ b/authz/identity_test.go @@ -9,7 +9,7 @@ import ( "os" "testing" - "git.sr.ht/~sircmpwn/core-go/crypto" + "sourcecraft.dev/bigbes/sr-ht-core/crypto" "github.com/fernet/fernet-go" "github.com/vaughan0/go-ini" ) diff --git a/cmd/comparesrht/main.go b/cmd/comparesrht/main.go index e45cf17ea55c200a1c01df65fe13afca3c2ded2d..ad33ee4fa28866c06cd7ffea8043508d4feaa783 100644 --- a/cmd/comparesrht/main.go +++ b/cmd/comparesrht/main.go @@ -30,15 +30,15 @@ import ( "strings" "time" - "git.sr.ht/~sircmpwn/core-go/config" - coreserver "git.sr.ht/~sircmpwn/core-go/server" + "sourcecraft.dev/bigbes/sr-ht-core/config" + coreserver "sourcecraft.dev/bigbes/sr-ht-core/server" "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" "github.com/sirupsen/logrus" "github.com/vaughan0/go-ini" - "go.bigb.es/sourcehut-compare/authz" - "go.bigb.es/sourcehut-compare/web" + "sourcecraft.dev/bigbes/sr-ht-compare/authz" + "sourcecraft.dev/bigbes/sr-ht-compare/web" ) const ( diff --git a/gitx/diff.go b/gitx/diff.go index f8fac2c2219af740a0c49d2ca071870474bf3b89..ab51e189181711498399114d0872579a4cd356ca 100644 --- a/gitx/diff.go +++ b/gitx/diff.go @@ -7,7 +7,7 @@ import ( "github.com/go-git/go-git/v5/plumbing/format/diff" "github.com/go-git/go-git/v5/plumbing/object" - "go.bigb.es/sourcehut-compare/core" + "sourcecraft.dev/bigbes/sr-ht-compare/core" ) // Patch is a rendered unified diff. Truncated is set when the generated text diff --git a/gitx/fidelity_test.go b/gitx/fidelity_test.go index 7633650c6b6cfec8e7cbe7a39845b60616ef88dd..2c9da1815d75e17ed79c4b7664f81cef06b40368 100644 --- a/gitx/fidelity_test.go +++ b/gitx/fidelity_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "go.bigb.es/sourcehut-compare/core" + "sourcecraft.dev/bigbes/sr-ht-compare/core" ) // newFidelityRepo builds a two-commit bare repo whose base..head diff exercises diff --git a/gitx/gitx.go b/gitx/gitx.go index 52d5ed629a4a1518dfb73df3d9ebb15a09aa2f34..0b8eb28a8b057652d7ef1c1d26eadf7b6008ed0a 100644 --- a/gitx/gitx.go +++ b/gitx/gitx.go @@ -18,7 +18,7 @@ import ( "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing/object" - "go.bigb.es/sourcehut-compare/core" + "sourcecraft.dev/bigbes/sr-ht-compare/core" ) const ( diff --git a/gitx/gitx_test.go b/gitx/gitx_test.go index 81d86a9384822fe4b29c7176eb8a16eb71d317ad..fdcf5b9a482e6c25ca597f11e8aca08f0b7e77c1 100644 --- a/gitx/gitx_test.go +++ b/gitx/gitx_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "go.bigb.es/sourcehut-compare/core" + "sourcecraft.dev/bigbes/sr-ht-compare/core" ) func ctx() context.Context { return context.Background() } diff --git a/gitx/log.go b/gitx/log.go index b618ced51f2b49f55163fe3b9a197df214fd1dd8..aa943331b00efbd9b8b4ccbfcfc303944e60dfd9 100644 --- a/gitx/log.go +++ b/gitx/log.go @@ -9,7 +9,7 @@ import ( "github.com/go-git/go-git/v5/plumbing/object" "github.com/go-git/go-git/v5/plumbing/storer" - "go.bigb.es/sourcehut-compare/core" + "sourcecraft.dev/bigbes/sr-ht-compare/core" ) // CommitInfo is the metadata of a single commit. diff --git a/go.mod b/go.mod index 830836f4638fd0caab565ed1c0b6455f478f65b5..409817556441a64c5b2887f4356d46cde4662922 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,14 @@ -module go.bigb.es/sourcehut-compare +module sourcecraft.dev/bigbes/sr-ht-compare go 1.26.4 require ( - git.sr.ht/~sircmpwn/core-go v0.0.0-20260718172441-c2c2f3848fa9 github.com/fernet/fernet-go v0.0.0-20211208181803-9f70042a33ee github.com/go-chi/chi/v5 v5.3.1 github.com/go-git/go-git/v5 v5.19.1 github.com/sirupsen/logrus v1.9.4 github.com/vaughan0/go-ini v0.0.0-20130923145212-a98ad7ee00ec + sourcecraft.dev/bigbes/sr-ht-core v0.0.0-20260718185800-dd418a200152 ) require ( @@ -64,5 +64,3 @@ require ( google.golang.org/protobuf v1.33.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) - -replace git.sr.ht/~sircmpwn/core-go => git.srht.bigb.es/~bigbes/core-go v0.0.0-20260718172441-c2c2f3848fa9 diff --git a/go.sum b/go.sum index 6be1624f794f757abe0784e171d79c7cde5d62a5..90887800bcce98ed1ed7cb3533cde24a39bef3e8 100644 --- a/go.sum +++ b/go.sum @@ -7,8 +7,6 @@ git.sr.ht/~sircmpwn/getopt v1.0.0 h1:/pRHjO6/OCbBF4puqD98n6xtPEgE//oq5U8NXjP7ROc git.sr.ht/~sircmpwn/getopt v1.0.0/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9 h1:Ahny8Ud1LjVMMAlt8utUFKhhxJtwBAualvsbc/Sk7cE= git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= -git.srht.bigb.es/~bigbes/core-go v0.0.0-20260718172441-c2c2f3848fa9 h1:S/CncMS83NIBz+V5OlZEHlnrl1Yd5I4C7hDQ7lzQsTM= -git.srht.bigb.es/~bigbes/core-go v0.0.0-20260718172441-c2c2f3848fa9/go.mod h1:JmathMemB+hBk1IgrMn6RuBGusd+fTg1s/X6rNVKXXU= github.com/99designs/gqlgen v0.17.36 h1:u/o/rv2SZ9s5280dyUOOrkpIIkr/7kITMXYD3rkJ9go= github.com/99designs/gqlgen v0.17.36/go.mod h1:6RdyY8puhCoWAQVr2qzF2OMVfudQzc8ACxzpzluoQm4= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= @@ -322,3 +320,5 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +sourcecraft.dev/bigbes/sr-ht-core v0.0.0-20260718185800-dd418a200152 h1:9kQC+tDO2CO8avlKadb9Z0if4a6vJuEK80+4zcb6/fU= +sourcecraft.dev/bigbes/sr-ht-core v0.0.0-20260718185800-dd418a200152/go.mod h1:Mu1Vx39ws/OTKWGoVERXvkdRSPLBdhuFTYv0ftVV31c= diff --git a/web/chrome.go b/web/chrome.go index dedcf8796cc8421cb76ccfdd36e060f33acaf1ab..f1d14abc320969712e57805fc77f066b4ae6134c 100644 --- a/web/chrome.go +++ b/web/chrome.go @@ -6,10 +6,10 @@ import ( "sort" "strings" - "git.sr.ht/~sircmpwn/core-go/config" + "sourcecraft.dev/bigbes/sr-ht-core/config" "github.com/vaughan0/go-ini" - "go.bigb.es/sourcehut-compare/authz" + "sourcecraft.dev/bigbes/sr-ht-compare/authz" ) // navCanonical is the SourceHut service-switcher order. Services not listed here diff --git a/web/handlers.go b/web/handlers.go index b23cfa17db7d9168f37da12fc69e21a033bad792..1afe769a7601a9a8edf553071f17668291e24753 100644 --- a/web/handlers.go +++ b/web/handlers.go @@ -12,9 +12,9 @@ import ( "github.com/go-chi/chi/v5" "github.com/sirupsen/logrus" - "go.bigb.es/sourcehut-compare/authz" - "go.bigb.es/sourcehut-compare/core" - "go.bigb.es/sourcehut-compare/gitx" + "sourcecraft.dev/bigbes/sr-ht-compare/authz" + "sourcecraft.dev/bigbes/sr-ht-compare/core" + "sourcecraft.dev/bigbes/sr-ht-compare/gitx" ) // recentCommitLimit bounds the first-parent history shown on the repo page. diff --git a/web/server.go b/web/server.go index 16d3e29a1c686c0170ccc8d95db5dc5fb8798cb9..f0d9094c7ba93f5c3c78e5a15804c546f023689c 100644 --- a/web/server.go +++ b/web/server.go @@ -34,10 +34,10 @@ import ( "path" "regexp" - "git.sr.ht/~sircmpwn/core-go/config" + "sourcecraft.dev/bigbes/sr-ht-core/config" "github.com/vaughan0/go-ini" - "go.bigb.es/sourcehut-compare/authz" + "sourcecraft.dev/bigbes/sr-ht-compare/authz" ) // hashedCSSRe matches the content-addressed stylesheet name so it can be served diff --git a/web/web_test.go b/web/web_test.go index 3a43837872fd559fca31f31eff48a56e956f1121..4c5840b4d39940414f644fab4496d59c6ed9d748 100644 --- a/web/web_test.go +++ b/web/web_test.go @@ -14,15 +14,15 @@ import ( "strings" "testing" - "git.sr.ht/~sircmpwn/core-go/config" - "git.sr.ht/~sircmpwn/core-go/crypto" + "sourcecraft.dev/bigbes/sr-ht-core/config" + "sourcecraft.dev/bigbes/sr-ht-core/crypto" "github.com/fernet/fernet-go" "github.com/go-chi/chi/v5" "github.com/vaughan0/go-ini" - "go.bigb.es/sourcehut-compare/authz" - "go.bigb.es/sourcehut-compare/core" - "go.bigb.es/sourcehut-compare/gitx" + "sourcecraft.dev/bigbes/sr-ht-compare/authz" + "sourcecraft.dev/bigbes/sr-ht-compare/core" + "sourcecraft.dev/bigbes/sr-ht-compare/gitx" ) // testConf carries the crypto keys established in TestMain so tests can seal