Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in fails if release tag points to another tag #99

Open
aoldershaw opened this issue Jun 2, 2020 · 0 comments
Open

in fails if release tag points to another tag #99

aoldershaw opened this issue Jun 2, 2020 · 0 comments

Comments

@aoldershaw
Copy link
Contributor

GitHub releases can reference an annotated tag, which is a git object that points to another git object. Currently, we assume that the annotated tag points to a commit:

// Resolve tag to commit sha
tag, res, err := g.client.Git.GetTag(context.TODO(), g.owner, g.repository, *ref.Object.SHA)
if err != nil {
return "", err
}
res.Body.Close()
if *tag.Object.Type != "commit" {
return "", fmt.Errorf("could not resolve tag %q to commit: returned type is not 'commit'", tagName)
}

However, an annotated tag can point to another annotated tag (which then points to a commit), which is a case we don't handle. In general, there could be an arbitrarily long chain of tags before resolving to a commit.

example problematic release - https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant