From 0b37b4dfbd920acbe835122ec0440a344e4fc0ca Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Fri, 20 May 2022 10:02:56 -0300 Subject: [PATCH] Revert "fix: draft release when no existing draft release exists" This reverts commit 0b3305999c136f276256e787d90e951576186eee. --- internal/client/github.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/client/github.go b/internal/client/github.go index be8a3697c..9aaf8d351 100644 --- a/internal/client/github.go +++ b/internal/client/github.go @@ -218,7 +218,7 @@ func (c *githubClient) findDraftRelease(ctx *context.Context) (*github.Repositor return nil, err } for _, r := range releases { - if r.GetTagName() == ctx.Git.CurrentTag { + if r.TagName == &ctx.Git.CurrentTag { return r, nil } } @@ -227,7 +227,7 @@ func (c *githubClient) findDraftRelease(ctx *context.Context) (*github.Repositor } opts.Page = resp.NextPage } - return nil, fmt.Errorf("no existing draft release found for %s", ctx.Git.CurrentTag) + return nil, nil } func (c *githubClient) CreateRelease(ctx *context.Context, body string) (string, error) {