From eca77c8df030e297090324ef2a486e1775c76bb2 Mon Sep 17 00:00:00 2001 From: Hans Kristian Flaatten Date: Thu, 3 Nov 2022 10:21:17 +0100 Subject: [PATCH 1/3] Bump dependencis and add debug --- ci.go | 2 ++ notifier/github/comment.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ci.go b/ci.go index 28930e1..a1e78b0 100644 --- a/ci.go +++ b/ci.go @@ -165,6 +165,8 @@ func githubActions() (ci CI, err error) { ci.PR.Number = pr } + fmt.Printf("ci: %+v, err: %v, os.Getenv(GITHUB_REF): %v, os.Getenv(GITHUB_SHA): %v", ci, err, os.Getenv("GITHUB_REF"), os.Getenv("GITHUB_SHA")) + return ci, err } diff --git a/notifier/github/comment.go b/notifier/github/comment.go index eaf61f0..e47de59 100644 --- a/notifier/github/comment.go +++ b/notifier/github/comment.go @@ -20,6 +20,8 @@ type PostOptions struct { // Post posts comment func (g *CommentService) Post(body string, opt PostOptions) error { + fmt.Printf("%v", opt) + if opt.Number != 0 { _, _, err := g.client.API.IssuesCreateComment( context.Background(), From e47529aee96e2f149c024efe6cd39e2523535daa Mon Sep 17 00:00:00 2001 From: Hans Kristian Flaatten Date: Thu, 3 Nov 2022 10:23:52 +0100 Subject: [PATCH 2/3] Bump Go version to v1.18 --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a6fb1e..9a3bbf4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v1 with: - go-version: '1.14.x' + go-version: '1.18.x' - name: Run GoReleaser uses: goreleaser/goreleaser-action@v1 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e276eb..d8bcf3b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v1 with: - go-version: '1.14.x' + go-version: '1.18.x' - name: Checkout uses: actions/checkout@v2 - name: Test From 84ccda5bc5ce2ebee15c59b19f1aa3553b311d14 Mon Sep 17 00:00:00 2001 From: Hans Kristian Flaatten Date: Thu, 3 Nov 2022 10:32:52 +0100 Subject: [PATCH 3/3] Remove debug variables --- ci.go | 2 -- notifier/github/comment.go | 2 -- 2 files changed, 4 deletions(-) diff --git a/ci.go b/ci.go index a1e78b0..28930e1 100644 --- a/ci.go +++ b/ci.go @@ -165,8 +165,6 @@ func githubActions() (ci CI, err error) { ci.PR.Number = pr } - fmt.Printf("ci: %+v, err: %v, os.Getenv(GITHUB_REF): %v, os.Getenv(GITHUB_SHA): %v", ci, err, os.Getenv("GITHUB_REF"), os.Getenv("GITHUB_SHA")) - return ci, err } diff --git a/notifier/github/comment.go b/notifier/github/comment.go index e47de59..eaf61f0 100644 --- a/notifier/github/comment.go +++ b/notifier/github/comment.go @@ -20,8 +20,6 @@ type PostOptions struct { // Post posts comment func (g *CommentService) Post(body string, opt PostOptions) error { - fmt.Printf("%v", opt) - if opt.Number != 0 { _, _, err := g.client.API.IssuesCreateComment( context.Background(),