Skip to content

Commit

Permalink
Use danger-go v0.1.0 in dangerfile (#10)
Browse files Browse the repository at this point in the history
* Use danger-go v0.1.0 in dangerfile

* Change danger-go version used in CI to v0.1.0

* Use danger-go version command to check the version

* Clean up go.sum
  • Loading branch information
moolmanruan authored Jan 21, 2023
1 parent 829b7cd commit 81ada33
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
run: npm install -g danger

- name: Install danger-go
run: go install github.com/moolmanruan/danger-go/cmd/danger-go@v0.0.3 # match version used in build/ci
run: go install github.com/moolmanruan/danger-go/cmd/danger-go@v0.1.0 # match version used in build/ci

- name: Check versions
run: |
go version
danger-go -V
danger-go version
danger -V
- name: Run danger-go ci
Expand Down
3 changes: 1 addition & 2 deletions build/ci/dangerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import (
"fmt"

"github.com/moolmanruan/danger-go"
"github.com/moolmanruan/danger-go/danger-js"
)

// Run is invoked by danger-go
func Run(d *danger.T, pr dangerJs.DSL) {
func Run(d *danger.T, pr danger.DSL) {
d.Message(fmt.Sprintf("%d new files added!", len(pr.Git.CreateFiles)), "", 0)
d.Message(fmt.Sprintf("%d files modified!", len(pr.Git.ModifiedFiles)), "", 0)
}
2 changes: 1 addition & 1 deletion build/ci/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module danger-go/dangerfile

go 1.19

require github.com/moolmanruan/danger-go v0.0.3
require github.com/moolmanruan/danger-go v0.1.0
10 changes: 6 additions & 4 deletions build/ci/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
github.com/moolmanruan/danger-go v0.0.2 h1:BGoqAgholwSWdZqzmxLjWSBLtLoDk+//L6FdpVUVcJ4=
github.com/moolmanruan/danger-go v0.0.2/go.mod h1:JIzQHXs5iGbWszdpQfwuEiVPd0Ees93yjzDqBUMQl6c=
github.com/moolmanruan/danger-go v0.0.3 h1:aZSktTCSUKvQqO+aF54YEhQQZR+m9Uzo5WdIQ5x/y20=
github.com/moolmanruan/danger-go v0.0.3/go.mod h1:JIzQHXs5iGbWszdpQfwuEiVPd0Ees93yjzDqBUMQl6c=
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/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=

0 comments on commit 81ada33

Please sign in to comment.