fix: added the missing error handler for draft updates

This commit is contained in:
Christian Schulze 2023-03-06 10:27:27 +01:00
parent 9f610e1d52
commit 7c9242451b
1 changed files with 5 additions and 2 deletions

View File

@ -56,11 +56,14 @@ func CreateDraftRelease(c *gitea.Client, owner string, repo string, targetBranch
} }
func UpdateExistingDraft(c *gitea.Client, owner string, repo string, draft *gitea.Release, nextVersion string, body string) (*gitea.Release, error) { func UpdateExistingDraft(c *gitea.Client, owner string, repo string, draft *gitea.Release, nextVersion string, body string) (*gitea.Release, error) {
c.EditRelease(owner, repo, draft.ID, gitea.EditReleaseOption{ rel, _, err := c.EditRelease(owner, repo, draft.ID, gitea.EditReleaseOption{
TagName: nextVersion, TagName: nextVersion,
Title: nextVersion, Title: nextVersion,
Note: body, Note: body,
}) })
if err != nil {
return nil, err
}
return draft, nil return rel, nil
} }