File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed
Expand file tree Collapse file tree 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">{{
4747 < tr >
4848 < td class ="hide "> {{loop.index}}</ td >
4949 < 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 >
5157 </ tr >
5258 {% endfor %}
5359 </ tbody >
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def result(repo_label, pull):
8282 states = [state for state in g .states [repo_label ].values ()
8383 if state .num == pull ]
8484 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 ))
8686
8787 state = states [0 ]
8888 builders = []
@@ -94,15 +94,15 @@ def result(repo_label, pull):
9494 if data ['res' ] is not None :
9595 result = "success" if data ['res' ] else "failed"
9696
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 = {
10398 'result' : result ,
10499 'name' : builder ,
105- })
100+ }
101+
102+ if data ['url' ]:
103+ builder_details ['url' ] = data ['url' ]
104+
105+ builders .append (builder_details )
106106
107107 return g .tpls ['build_res' ].render (repo_label = repo_label , repo_url = repo_url ,
108108 builders = builders , pull = pull )
You can’t perform that action at this time.
0 commit comments