fix: unused response values when updating the draft ...

causing errors to be missed
This commit is contained in:
Christian Schulze 2023-03-06 15:14:54 +01:00
parent 7c9242451b
commit 7c8014f8d8
1 changed files with 6 additions and 2 deletions

View File

@ -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())