Skip to content

Commit 7ae1629

Browse files
committed
Return empty string from github commits so as not to violate the null constraint on tags when stored in the DB
1 parent 2bf22df commit 7ae1629

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

codespeed/commits/github.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,15 @@ def retrieve_tag(commit_id, username, project):
6666
tags_url = 'https://api.github.com/repos/%s/%s/git/refs/tags' % (
6767
username, project)
6868

69+
## TODO: This might not do what is intended
70+
## the tag SHA isn't the same thing as the commit it points
6971
tags_json = fetch_json(tags_url)
7072
for tag in tags_json:
7173
if tag['object']['sha'] == commit_id:
7274
return tag['ref'].split("refs/tags/")[-1]
7375

76+
return ""
77+
7478

7579
def retrieve_revision(commit_id, username, project, revision=None):
7680
commit_url = 'https://api.github.com/repos/%s/%s/git/commits/%s' % (

0 commit comments

Comments
 (0)