Prior to this commit when gh changelog new was executed on a repository with no tags it would cause an index out of range error. This error was not handled and would be displayed to the user.
This commit fixes that by checking the length of the tags slice that is returned from GetTags. If it is 0 then we return an error so that it properly bubbles up to the user.
Prior to this commit when
gh changelog new
was executed on a repository with no tags it would cause anindex out of range
error. This error was not handled and would be displayed to the user.This commit fixes that by checking the length of the tags slice that is returned from
GetTags
. If it is 0 then we return an error so that it properly bubbles up to the user.