File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
site/src/request_handlers Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -760,11 +760,7 @@ where
760760 let ( name, date, ty) = match artifact {
761761 ArtifactId :: Commit ( commit) => (
762762 commit. sha . to_string ( ) ,
763- if commit. is_try ( ) {
764- None
765- } else {
766- Some ( commit. date . 0 )
767- } ,
763+ Some ( commit. date . 0 ) ,
768764 if commit. is_try ( ) { "try" } else { "master" } ,
769765 ) ,
770766 ArtifactId :: Tag ( a) => ( a. clone ( ) , None , "release" ) ,
Original file line number Diff line number Diff line change 11use collector:: Bound ;
2+ use database:: CommitType ;
23use std:: collections:: HashMap ;
34use std:: sync:: Arc ;
45
@@ -140,9 +141,19 @@ async fn create_graphs(
140141 } ) )
141142}
142143
144+ /// Returns artifact IDs for the given range.
145+ /// Inside of the range (not at the start/end), only master commits are kept.
143146fn artifact_ids_for_range ( ctxt : & SiteCtxt , start : Bound , end : Bound ) -> Vec < ArtifactId > {
144147 let range = ctxt. data_range ( start..=end) ;
145- range. into_iter ( ) . map ( |c| c. into ( ) ) . collect ( )
148+ let count = range. len ( ) ;
149+ range
150+ . into_iter ( )
151+ . enumerate ( )
152+ . filter ( |( index, commit) | {
153+ * index == 0 || * index == count - 1 || matches ! ( commit. r#type, CommitType :: Master )
154+ } )
155+ . map ( |c| c. 1 . into ( ) )
156+ . collect ( )
146157}
147158
148159/// Creates a summary "benchmark" that averages the results of all other
You can’t perform that action at this time.
0 commit comments