Skip to content

Commit

Permalink
fix: draft release when no existing draft release exists
Browse files Browse the repository at this point in the history
closes #3115
refs #3073

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed May 20, 2022
1 parent e19a001 commit 0b33059
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/client/github.go
Expand Up @@ -218,7 +218,7 @@ func (c *githubClient) findDraftRelease(ctx *context.Context) (*github.Repositor
return nil, err
}
for _, r := range releases {
if r.TagName == &ctx.Git.CurrentTag {
if r.GetTagName() == ctx.Git.CurrentTag {
return r, nil
}
}
Expand All @@ -227,7 +227,7 @@ func (c *githubClient) findDraftRelease(ctx *context.Context) (*github.Repositor
}
opts.Page = resp.NextPage
}
return nil, nil
return nil, fmt.Errorf("no existing draft release found for %s", ctx.Git.CurrentTag)
}

func (c *githubClient) CreateRelease(ctx *context.Context, body string) (string, error) {
Expand Down

0 comments on commit 0b33059

Please sign in to comment.