Fix a display bug for tests that look like sha commits
This commit is contained in:
1 parent
7334ae4091
commit
9c95b60c25
2 files changed
+2
-7
No files matched your search
@@ -132,7 +132,7 @@ def insertCommas(value):
|
|||||||
return '{:,}'.format(int(value))
|
return '{:,}'.format(int(value))
|
||||||
|
|
||||||
def prettyName(name):
|
def prettyName(name):
|
||||||
if re.search('[0-9a-fA-F]{40}', name):
|
if re.search('^[0-9a-fA-F]{40}$', name):
|
||||||
return name[:16].upper()
|
return name[:16].upper()
|
||||||
return name
|
return name
|
||||||
|
|
||||||
@@ -336,8 +336,3 @@ register.filter('network_download_link', network_download_link)
|
|||||||
|
|
||||||
register.filter('workload_url', workload_url)
|
register.filter('workload_url', workload_url)
|
||||||
register.filter('workload_pretty_name', workload_pretty_name)
|
register.filter('workload_pretty_name', workload_pretty_name)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ def collect_github_info(errors, request, field):
|
|||||||
|
|
||||||
# Get branch name / commit sha / tag, and the API path for it
|
# Get branch name / commit sha / tag, and the API path for it
|
||||||
branch = request.POST['{0}_branch'.format(field)]
|
branch = request.POST['{0}_branch'.format(field)]
|
||||||
bysha = bool(re.search('[0-9a-fA-F]{40}', branch))
|
bysha = bool(re.search('^[0-9a-fA-F]{40}$', branch))
|
||||||
|
|
||||||
# All API requests will share this common path. Some engines are private.
|
# All API requests will share this common path. Some engines are private.
|
||||||
base = request.POST['%s_repo' % (field)].replace('github.com', 'api.github.com/repos')
|
base = request.POST['%s_repo' % (field)].replace('github.com', 'api.github.com/repos')
|
||||||
|
|||||||
Reference in new issue
Block a user