Closed VJftw closed 3 years ago
The ensureReleaseForDriverVersion function had a bug in added in #37 which made it attempt to create releases for ones which already existed.
ensureReleaseForDriverVersion
This PR fixes that and adds a unit test to prevent it from happening again :pray:
The bug was the ensureReleaseforDriverVersion was doing
ensureReleaseforDriverVersion
if release, err := ghr.getReleaseByName(driverVersion); err != nil { return release, nil
which was only returning the release if there was an error, instead of returning the release when there is no error:
if release, err := ghr.getReleaseByName(driverVersion); err == nil { return release, nil
The
ensureReleaseForDriverVersion
function had a bug in added in #37 which made it attempt to create releases for ones which already existed.This PR fixes that and adds a unit test to prevent it from happening again :pray:
The bug was the
ensureReleaseforDriverVersion
was doingwhich was only returning the release if there was an error, instead of returning the release when there is no error: