From fe1cbc565b57abfade2b91b296dab1fc0a704606 Mon Sep 17 00:00:00 2001 From: Ed Harrod Date: Wed, 23 Aug 2023 10:35:34 +0100 Subject: [PATCH] Rename module after forking (#1) * Rename module after forking * fix imports --- .github/workflows/main.yml | 2 +- README.md | 8 ++++---- api.go | 2 +- api_test.go | 3 ++- build/ci/dangerfile.go | 2 -- build/ci/go.mod | 2 +- build/ci/go.sum | 4 ++-- cmd/danger-go/main.go | 4 ++-- cmd/danger-go/main_internal_test.go | 2 +- cmd/danger-go/runner/runner.go | 4 ++-- go.mod | 4 +++- 11 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f804d8..54a6f57 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,7 +19,7 @@ jobs: run: npm install -g danger - name: Install danger-go - run: go install github.com/moolmanruan/danger-go/cmd/danger-go@v0.1.0 # match version used in build/ci + run: go install github.com/luno/danger-go/cmd/danger-go@v0.1.0 # match version used in build/ci - name: Check versions run: | diff --git a/README.md b/README.md index c4f014d..c5a798e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Danger in Go -This is a Go version of the popular Danger tool. +This is a Go version of the popular [Danger](https://danger.systems/) tool. ## Installation of command line tool ```shell -go install github.com/moolmanruan/danger-go/cmd/danger-go@latest +go install github.com/luno/danger-go/cmd/danger-go@latest yarn global add danger ``` @@ -22,7 +22,7 @@ package main import ( "fmt" - "github.com/moolmanruan/danger-go" + "github.com/luno/danger-go" ) func Run(d *danger.T, pr danger.DSL) { @@ -32,7 +32,7 @@ func Run(d *danger.T, pr danger.DSL) { 3. Run the following in the directory: ```shell go mod init dangerfile -go get github.com/moolmanruan/danger-go +go get github.com/luno/danger-go go mod tidy ``` diff --git a/api.go b/api.go index 6c1fdbc..3cf168a 100644 --- a/api.go +++ b/api.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - dangerJs "github.com/moolmanruan/danger-go/danger-js" + dangerJs "github.com/luno/danger-go/danger-js" ) // DSL wraps the DSL received from danger JS. This allows dangerfiles to only diff --git a/api_test.go b/api_test.go index d308a3d..a3a227d 100644 --- a/api_test.go +++ b/api_test.go @@ -3,8 +3,9 @@ package danger_test import ( "testing" - "github.com/moolmanruan/danger-go" "github.com/stretchr/testify/require" + + "github.com/luno/danger-go" ) func TestResults(t *testing.T) { diff --git a/build/ci/dangerfile.go b/build/ci/dangerfile.go index 83678f1..5b22f97 100644 --- a/build/ci/dangerfile.go +++ b/build/ci/dangerfile.go @@ -2,8 +2,6 @@ package main import ( "fmt" - - "github.com/moolmanruan/danger-go" ) // Run is invoked by danger-go diff --git a/build/ci/go.mod b/build/ci/go.mod index f01fae3..670b51a 100644 --- a/build/ci/go.mod +++ b/build/ci/go.mod @@ -2,4 +2,4 @@ module danger-go/dangerfile go 1.19 -require github.com/moolmanruan/danger-go v0.1.0 +require github.com/luno/danger-go v0.1.0 diff --git a/build/ci/go.sum b/build/ci/go.sum index 99d32b8..0238b47 100644 --- a/build/ci/go.sum +++ b/build/ci/go.sum @@ -1,6 +1,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/moolmanruan/danger-go v0.1.0 h1:SYIi2FAWIWukDMQTjeIvndavigbZWM8CDtSXvpFkKZE= -github.com/moolmanruan/danger-go v0.1.0/go.mod h1:JIzQHXs5iGbWszdpQfwuEiVPd0Ees93yjzDqBUMQl6c= +github.com/luno/danger-go v0.1.0 h1:SYIi2FAWIWukDMQTjeIvndavigbZWM8CDtSXvpFkKZE= +github.com/luno/danger-go v0.1.0/go.mod h1:JIzQHXs5iGbWszdpQfwuEiVPd0Ees93yjzDqBUMQl6c= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/cmd/danger-go/main.go b/cmd/danger-go/main.go index 8a8fe36..e6eec07 100644 --- a/cmd/danger-go/main.go +++ b/cmd/danger-go/main.go @@ -5,8 +5,8 @@ import ( "log" "os" - "github.com/moolmanruan/danger-go/cmd/danger-go/runner" - dangerJs "github.com/moolmanruan/danger-go/danger-js" + "github.com/luno/danger-go/cmd/danger-go/runner" + dangerJs "github.com/luno/danger-go/danger-js" ) const version = "v0.1.0" diff --git a/cmd/danger-go/main_internal_test.go b/cmd/danger-go/main_internal_test.go index 63f9273..d087bec 100644 --- a/cmd/danger-go/main_internal_test.go +++ b/cmd/danger-go/main_internal_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" ) -const cliPkg = "github.com/moolmanruan/danger-go/cmd/danger-go" +const cliPkg = "github.com/luno/danger-go/cmd/danger-go" func execute(args ...string) (string, error) { cmdArgs := append([]string{"run", cliPkg}, args...) diff --git a/cmd/danger-go/runner/runner.go b/cmd/danger-go/runner/runner.go index 4dfdff5..94eefed 100644 --- a/cmd/danger-go/runner/runner.go +++ b/cmd/danger-go/runner/runner.go @@ -15,8 +15,8 @@ import ( "plugin" "strings" - "github.com/moolmanruan/danger-go" - "github.com/moolmanruan/danger-go/danger-js" + "github.com/luno/danger-go" + dangerJs "github.com/luno/danger-go/danger-js" ) const dangerURLPrefix = "danger://dsl/" diff --git a/go.mod b/go.mod index 9aeec89..e286651 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/moolmanruan/danger-go +module github.com/luno/danger-go go 1.19 @@ -9,3 +9,5 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/luno/danger-go v0.0.0-20230121134440-81ada33efa08 => github.com/moolmanruan/danger-go v0.1.0