From 7c8014f8d8491b083a4a5defbf1c90ee0ad72c06 Mon Sep 17 00:00:00 2001 From: Christian Schulze Date: Mon, 6 Mar 2023 15:14:54 +0100 Subject: [PATCH] fix: unused response values when updating the draft ... causing errors to be missed --- src/action.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/action.go b/src/action.go index 78d34da..6ff8e99 100644 --- a/src/action.go +++ b/src/action.go @@ -79,8 +79,12 @@ func updateOrCreateDraftRelease(a *Action, cfg *config.RepoConfig) (*gitea.Relea } if draft != nil { - UpdateExistingDraft(a.client, a.config.RepoOwner, a.config.RepoName, draft, nextVersion.String(), b.String()) - return draft, nil + updatedDraft, err := UpdateExistingDraft(a.client, a.config.RepoOwner, a.config.RepoName, draft, nextVersion.String(), b.String()) + if err != nil { + return nil, err + } + + return updatedDraft, nil } newDraft, err := CreateDraftRelease(a.client, a.config.RepoOwner, a.config.RepoName, cfg.DefaultBranch, fmt.Sprintf("v%s", nextVersion.String()), b.String())