diff --git a/action.yml b/action.yml index 41b10f8..7487391 100644 --- a/action.yml +++ b/action.yml @@ -26,7 +26,7 @@ inputs: runs: using: 'docker' - image: 'docker://stackit-solutions.git.onstackit.cloud/actions/notify-slim:v0.2.1' + image: 'docker://stackit-solutions.git.onstackit.cloud/actions/notify-slim:v0.1.2' # image: 'Dockerfile' args: - ${{ inputs.project }} diff --git a/main.go b/main.go index be6ccd9..7a9eafc 100644 --- a/main.go +++ b/main.go @@ -4,8 +4,6 @@ import ( "bytes" _ "embed" "fmt" - "io" - "log" "net/http" "os" "text/template" @@ -83,12 +81,8 @@ func main() { githubactions.Fatalf("error %s", err.Error()) os.Exit(1) } - defer func(Body io.ReadCloser) { - err := Body.Close() - if err != nil { - log.Fatalln(err) - } - }(resp.Body) + defer resp.Body.Close() //nolint:gocritic + fmt.Println("response Status:", resp.Status) if resp.StatusCode != http.StatusOK { githubactions.Infof("json: %s", jsonStr) diff --git a/main_test.go b/main_test.go index ec0da17..f7e5241 100644 --- a/main_test.go +++ b/main_test.go @@ -113,9 +113,6 @@ func Test_card(t *testing.T) { t.Fatalf("error: %v\nsrc: %s", err, tt.want) } - //if !reflect.DeepEqual(wantJson, gotJson) { - // t.Errorf("card() got = %v, want %v", gotJson, wantJson) - //} if diff := cmp.Diff(wantJson, gotJson); diff != "" { t.Errorf("MakeGatewayInfo() mismatch (-want +got):\n%s", diff) }