File tree 2 files changed +15
-9
lines changed
2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,13 @@ <h1>Homu build results - <a href="{{repo_url}}/pull/{{pull}}" target="_blank">{{
47
47
< tr >
48
48
< td class ="hide "> {{loop.index}}</ td >
49
49
< td > {{builder.name}}</ td >
50
- < td class ="{{builder.result}} "> < a href ="{{builder.url}} "> {{builder.result}}</ a > </ td >
50
+ < td class ="{{builder.result}} ">
51
+ {%- if builder.url -%}
52
+ < a href ="{{builder.url}} "> {{builder.result}}</ a >
53
+ {%- else -%}
54
+ {{ builder.result }}
55
+ {%- endif -%}
56
+ </ td >
51
57
</ tr >
52
58
{% endfor %}
53
59
</ tbody >
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def result(repo_label, pull):
82
82
states = [state for state in g .states [repo_label ].values ()
83
83
if state .num == pull ]
84
84
if len (states ) == 0 :
85
- abort (204 , 'No build results for pull request {}' .format (pull ))
85
+ abort (404 , 'No build results for pull request {}' .format (pull ))
86
86
87
87
state = states [0 ]
88
88
builders = []
@@ -94,15 +94,15 @@ def result(repo_label, pull):
94
94
if data ['res' ] is not None :
95
95
result = "success" if data ['res' ] else "failed"
96
96
97
- if not data ['url' ]:
98
- # This happens to old try builds
99
- abort (204 , 'No build results for pull request {}' .format (pull ))
100
-
101
- builders .append ({
102
- 'url' : data ['url' ],
97
+ builder_details = {
103
98
'result' : result ,
104
99
'name' : builder ,
105
- })
100
+ }
101
+
102
+ if data ['url' ]:
103
+ builder_details ['url' ] = data ['url' ]
104
+
105
+ builders .append (builder_details )
106
106
107
107
return g .tpls ['build_res' ].render (repo_label = repo_label , repo_url = repo_url ,
108
108
builders = builders , pull = pull )
You can’t perform that action at this time.
0 commit comments