From 271b8a558c747d74c60d2390124942cef4c816d1 Mon Sep 17 00:00:00 2001 From: Gerrit Date: Mon, 26 Feb 2024 11:32:32 +0100 Subject: [PATCH] Debug. --- go.mod | 2 ++ pkg/webhooks/github/actions/aggregate_releases.go | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/go.mod b/go.mod index 9df9515..2dba70d 100644 --- a/go.mod +++ b/go.mod @@ -25,6 +25,8 @@ require ( sigs.k8s.io/yaml v1.4.0 ) +require github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc + require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect diff --git a/pkg/webhooks/github/actions/aggregate_releases.go b/pkg/webhooks/github/actions/aggregate_releases.go index f8c1307..405e42a 100644 --- a/pkg/webhooks/github/actions/aggregate_releases.go +++ b/pkg/webhooks/github/actions/aggregate_releases.go @@ -11,6 +11,7 @@ import ( "github.com/Masterminds/semver/v3" "github.com/atedja/go-multilock" + "github.com/davecgh/go-spew/spew" v3 "github.com/google/go-github/v57/github" "github.com/metal-stack/metal-lib/pkg/pointer" "github.com/metal-stack/metal-robot/pkg/clients" @@ -245,9 +246,13 @@ func isReleaseFreeze(ctx context.Context, client *v3.Client, pr *v3.PullRequest, return true, fmt.Errorf("unable to list pull request comments: %w", err) } + spew.Dump(comments) + for _, comment := range comments { comment := comment + spew.Dump(comment) + if ok := searchForCommandInComment(pointer.SafeDeref(comment.Body), IssueCommentReleaseFreeze); ok { return true, nil }