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
760
760
let ( name, date, ty) = match artifact {
761
761
ArtifactId :: Commit ( commit) => (
762
762
commit. sha . to_string ( ) ,
763
- if commit. is_try ( ) {
764
- None
765
- } else {
766
- Some ( commit. date . 0 )
767
- } ,
763
+ Some ( commit. date . 0 ) ,
768
764
if commit. is_try ( ) { "try" } else { "master" } ,
769
765
) ,
770
766
ArtifactId :: Tag ( a) => ( a. clone ( ) , None , "release" ) ,
Original file line number Diff line number Diff line change 1
1
use collector:: Bound ;
2
+ use database:: CommitType ;
2
3
use std:: collections:: HashMap ;
3
4
use std:: sync:: Arc ;
4
5
@@ -140,9 +141,19 @@ async fn create_graphs(
140
141
} ) )
141
142
}
142
143
144
+ /// Returns artifact IDs for the given range.
145
+ /// Inside of the range (not at the start/end), only master commits are kept.
143
146
fn artifact_ids_for_range ( ctxt : & SiteCtxt , start : Bound , end : Bound ) -> Vec < ArtifactId > {
144
147
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 ( )
146
157
}
147
158
148
159
/// Creates a summary "benchmark" that averages the results of all other
You can’t perform that action at this time.
0 commit comments