chore: update module path to gitea.dockr.co/kev/go-jdenticon
Some checks failed
CI / Test (Go 1.24.x, ubuntu-latest) (push) Successful in 1m53s
CI / Code Quality (push) Failing after 26s
CI / Security Scan (push) Failing after 11s
CI / Test Coverage (push) Successful in 1m13s
CI / Benchmarks (push) Failing after 10m22s
CI / Build CLI (push) Failing after 8s
Benchmarks / Run Benchmarks (push) Failing after 10m13s
Release / Test (push) Successful in 55s
Release / Build (amd64, darwin, ) (push) Failing after 12s
Release / Build (amd64, linux, ) (push) Failing after 6s
Release / Build (amd64, windows, .exe) (push) Failing after 12s
Release / Build (arm64, darwin, ) (push) Failing after 12s
Release / Build (arm64, linux, ) (push) Failing after 12s
Release / Release (push) Has been skipped
CI / Test (Go 1.24.x, macos-latest) (push) Has been cancelled
CI / Test (Go 1.24.x, windows-latest) (push) Has been cancelled

Move hosting from GitHub to private Gitea instance.
This commit is contained in:
Kevin McIntyre
2026-02-10 10:07:57 -05:00
parent d9e84812ff
commit f1544ef49c
37 changed files with 117 additions and 42 deletions

View File

@@ -52,9 +52,9 @@ COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
BUILD_DATE ?= $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
# Build flags for version injection
LDFLAGS=-ldflags "-X github.com/ungluedlabs/go-jdenticon/cmd/jdenticon.Version=$(VERSION) \
-X github.com/ungluedlabs/go-jdenticon/cmd/jdenticon.Commit=$(COMMIT) \
-X github.com/ungluedlabs/go-jdenticon/cmd/jdenticon.BuildDate=$(BUILD_DATE)"
LDFLAGS=-ldflags "-X gitea.dockr.co/kev/go-jdenticon/cmd/jdenticon.Version=$(VERSION) \
-X gitea.dockr.co/kev/go-jdenticon/cmd/jdenticon.Commit=$(COMMIT) \
-X gitea.dockr.co/kev/go-jdenticon/cmd/jdenticon.BuildDate=$(BUILD_DATE)"
# Build targets
CLI_BINARY=jdenticon-cli

75
PRIVATE_GO_REPO.md Normal file
View File

@@ -0,0 +1,75 @@
# Making This Go Repository Private
Notes on what changes when converting this public GitHub repo to private.
## CI/CD - No Changes Required
GitHub Actions workflows continue to work because:
- `actions/checkout@v4` uses the built-in `GITHUB_TOKEN` which has access to its own repo
- No external private dependencies are required
## Local Development
### Configure Go for Private Repos
Tell Go to bypass the public module proxy:
```bash
go env -w GOPRIVATE=github.com/yourusername/go-jdenticon
```
### Git Authentication
Ensure one of these is configured:
- SSH key linked to your GitHub account
- Personal Access Token (PAT) in git credential helper
- `~/.netrc` file with GitHub credentials
## Using as a Dependency in Other Projects
Any project that imports this module needs:
1. Set `GOPRIVATE`:
```bash
go env -w GOPRIVATE=github.com/yourusername/go-jdenticon
```
2. Configure git authentication (see above)
3. For CI in other repos, add to workflow:
```yaml
- name: Configure git for private modules
run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf "https://github.com/"
```
(Requires a `GH_PAT` secret with `repo` scope)
## What Breaks
| Feature | Status | Notes |
|---------|--------|-------|
| pkg.go.dev documentation | Unavailable | Public proxy can't access private repos |
| "Go Reference" badges | Broken | Remove from README or accept 404 |
| Codecov | May need token | Add `CODECOV_TOKEN` secret if uploads fail |
| Anonymous `go get` | Blocked | Users need authentication |
## Codecov Fix (If Needed)
If coverage uploads fail after going private:
1. Get token from codecov.io for the repo
2. Add as repository secret: `CODECOV_TOKEN`
3. Update `.github/workflows/ci.yml`:
```yaml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.txt
token: ${{ secrets.CODECOV_TOKEN }} # Add this line
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
```
## Reverting to Public
Simply change the repository visibility back to public in GitHub settings. No code changes required.

View File

@@ -17,7 +17,7 @@ import (
"github.com/mattn/go-isatty"
"github.com/schollz/progressbar/v3"
"github.com/spf13/cobra"
"github.com/ungluedlabs/go-jdenticon/jdenticon"
"gitea.dockr.co/kev/go-jdenticon/jdenticon"
)
const (

View File

@@ -11,7 +11,7 @@ import (
"testing"
"time"
"github.com/ungluedlabs/go-jdenticon/jdenticon"
"gitea.dockr.co/kev/go-jdenticon/jdenticon"
)
// benchmarkSizes defines different test scenarios for batch processing

View File

@@ -13,7 +13,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/ungluedlabs/go-jdenticon/jdenticon"
"gitea.dockr.co/kev/go-jdenticon/jdenticon"
)
// TestBatchCommand tests the batch command functionality

View File

@@ -9,7 +9,7 @@ import (
"strings"
"github.com/spf13/cobra"
"github.com/ungluedlabs/go-jdenticon/jdenticon"
"gitea.dockr.co/kev/go-jdenticon/jdenticon"
)
// isRootPath checks if the given path is a filesystem root.

View File

@@ -11,7 +11,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/ungluedlabs/go-jdenticon/jdenticon"
"gitea.dockr.co/kev/go-jdenticon/jdenticon"
)
// TestGenerateCommand tests the generate command functionality

View File

@@ -10,7 +10,7 @@ import (
"strings"
"testing"
"github.com/ungluedlabs/go-jdenticon/jdenticon"
"gitea.dockr.co/kev/go-jdenticon/jdenticon"
)
// testBinaryName returns the correct test binary name for the current OS.

View File

@@ -9,7 +9,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/ungluedlabs/go-jdenticon/jdenticon"
"gitea.dockr.co/kev/go-jdenticon/jdenticon"
)
const (

View File

@@ -9,7 +9,7 @@ import (
"sync"
"time"
"github.com/ungluedlabs/go-jdenticon/jdenticon"
"gitea.dockr.co/kev/go-jdenticon/jdenticon"
)
func main() {

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/ungluedlabs/go-jdenticon
module gitea.dockr.co/kev/go-jdenticon
go 1.24.0

View File

@@ -6,7 +6,7 @@ import (
"sync/atomic"
lru "github.com/hashicorp/golang-lru/v2"
"github.com/ungluedlabs/go-jdenticon/internal/constants"
"gitea.dockr.co/kev/go-jdenticon/internal/constants"
)
// CacheMetrics holds cache performance metrics using atomic operations for efficiency

View File

@@ -5,7 +5,7 @@ import (
"math"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/util"
"gitea.dockr.co/kev/go-jdenticon/internal/util"
)
// FuzzGeneratorGenerate tests the internal engine generator with arbitrary inputs

View File

@@ -7,8 +7,8 @@ import (
"sync"
lru "github.com/hashicorp/golang-lru/v2"
"github.com/ungluedlabs/go-jdenticon/internal/constants"
"github.com/ungluedlabs/go-jdenticon/internal/util"
"gitea.dockr.co/kev/go-jdenticon/internal/constants"
"gitea.dockr.co/kev/go-jdenticon/internal/util"
"golang.org/x/sync/singleflight"
)

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/util"
"gitea.dockr.co/kev/go-jdenticon/internal/util"
)
var benchmarkHashes = []string{

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/util"
"gitea.dockr.co/kev/go-jdenticon/internal/util"
)
func TestNewGenerator(t *testing.T) {

View File

@@ -7,7 +7,7 @@ import (
"testing"
"time"
"github.com/ungluedlabs/go-jdenticon/internal/constants"
"gitea.dockr.co/kev/go-jdenticon/internal/constants"
)
// TestResourceExhaustionProtection tests that the generator properly blocks

View File

@@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/ungluedlabs/go-jdenticon/internal/util"
"gitea.dockr.co/kev/go-jdenticon/internal/util"
)
// Generate creates an identicon with the specified hash and size

View File

@@ -6,7 +6,7 @@ import (
"os"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/perfsuite"
"gitea.dockr.co/kev/go-jdenticon/internal/perfsuite"
)
// TestPerformanceRegressionSuite can be called from a regular Go test

View File

@@ -10,7 +10,7 @@ import (
"testing"
"time"
"github.com/ungluedlabs/go-jdenticon/jdenticon"
"gitea.dockr.co/kev/go-jdenticon/jdenticon"
)
// PerformanceBenchmark represents a single performance test case

View File

@@ -3,7 +3,7 @@ package renderer
import (
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
// Benchmark optimized renderer to compare against baseline (958,401 B/op)

View File

@@ -7,7 +7,7 @@ import (
"image/png"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
// TestPNGRenderer_VisualRegression tests that PNG output matches expected characteristics

View File

@@ -5,7 +5,7 @@ import (
"strings"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
// ============================================================================

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
// Benchmark optimized PNG renderer vs original FastPNG renderer

View File

@@ -9,7 +9,7 @@ import (
"math"
"sync"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
// PNG rendering constants

View File

@@ -5,7 +5,7 @@ import (
"image/png"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
func TestNewPNGRenderer(t *testing.T) {

View File

@@ -1,7 +1,7 @@
package renderer
import (
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
// Renderer defines the interface for rendering identicons to various output formats.

View File

@@ -3,7 +3,7 @@ package renderer
import (
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
var benchmarkSizes = []int{

View File

@@ -3,7 +3,7 @@ package renderer
import (
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
func TestNewBaseRenderer(t *testing.T) {

View File

@@ -5,7 +5,7 @@ import (
"strconv"
"strings"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
// SVG rendering constants

View File

@@ -4,7 +4,7 @@ import (
"strings"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
// TestSVGRenderer_SecurityValidation tests defense-in-depth color validation

View File

@@ -5,7 +5,7 @@ import (
"strings"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
func TestSVGPath_AddPolygon(t *testing.T) {

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"regexp"
"github.com/ungluedlabs/go-jdenticon/internal/constants"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/constants"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
// hexColorRegex validates hex color strings in #RGB or #RRGGBB format.

View File

@@ -4,8 +4,8 @@ import (
"context"
"fmt"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"github.com/ungluedlabs/go-jdenticon/internal/util"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/util"
)
// Generator provides thread-safe identicon generation with caching.

View File

@@ -3,8 +3,8 @@ package jdenticon
import (
"fmt"
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"github.com/ungluedlabs/go-jdenticon/internal/renderer"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/renderer"
)
// Icon represents a generated identicon that can be rendered as SVG or PNG.

View File

@@ -6,7 +6,7 @@ import (
"strings"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/constants"
"gitea.dockr.co/kev/go-jdenticon/internal/constants"
)
// TestDoSProtection_InputLength tests protection against large input strings.

View File

@@ -1,7 +1,7 @@
package jdenticon
import (
"github.com/ungluedlabs/go-jdenticon/internal/engine"
"gitea.dockr.co/kev/go-jdenticon/internal/engine"
)
// validation.go contains helper functions for input validation and DoS protection.