Skip to content

Commit

Permalink
teuthology: add the function of finding the commit correctly when the…
Browse files Browse the repository at this point in the history
… code is not in github

Signed-off-by: Sun Junnan <sunjunnan_yewu@cmss.chinamobile.com>

add the function of finding the commit correctly when the code is not in github
  • Loading branch information
sunjunnan committed Apr 6, 2023
1 parent 8d156ae commit eb71703
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions teuthology/suite/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ def git_validate_sha1(project, sha1, project_owner='ceph'):
# kinda specific to knowing git.ceph.com is gitweb
url = ('http://git.ceph.com/?p=%s.git;a=blob_plain;f=.gitignore;hb=%s'
% (project, sha1))
elif config.ceph_git_base_url in url:
url = '/'.join((url, 'commit', sha1))
else:
raise RuntimeError(
'git_validate_sha1: how do I check %s for a sha1?' % url
Expand Down

0 comments on commit eb71703

Please sign in to comment.