fix: added the missing error handler for draft updates
This commit is contained in:
parent
9f610e1d52
commit
7c9242451b
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue