Skip to content

Commit

Permalink
Add error handling for #167
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Nov 1, 2020
1 parent 90645b1 commit 57106cd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions handler/release_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,17 @@ func updateReleaseNotes(client *github.Client, owner, repo, latestTag string) er

workingReleases := getWorkingReleases(releases, owner, repo, latestTag)

includedPRs, err := buildClosedPRs(client, workingReleases, owner, repo, latestTag)
if workingReleases.CurrentRelease == nil {
return fmt.Errorf("unable to detect current release, retry webhook after a few seconds")

}

includedPRs, err := buildClosedPRs(client, workingReleases, owner, repo, latestTag)
if err != nil {
return err
}

includedCommits, err := buildCommits(client, workingReleases, owner, repo, latestTag)

if err != nil {
return err
}
Expand Down

0 comments on commit 57106cd

Please sign in to comment.