Skip to content

Commit b15355a

Browse files
committed
Do not include try commits in artifact range
Now only master commits will be displayed e.g. on the main page of compare if no bounds are specified.
1 parent dde38ae commit b15355a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

collector/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ impl Bound {
3737
pub fn left_match(&self, commit: &Commit) -> bool {
3838
match self {
3939
Bound::Commit(sha) => commit.sha == **sha,
40-
Bound::Date(date) => commit.date.0.naive_utc().date() >= *date,
40+
Bound::Date(date) => commit.is_master() && commit.date.0.naive_utc().date() >= *date,
4141
Bound::None => {
4242
let last_month = chrono::Utc::now().date().naive_utc() - chrono::Duration::days(30);
43-
last_month <= commit.date.0.naive_utc().date()
43+
commit.is_master() && last_month <= commit.date.0.naive_utc().date()
4444
}
4545
}
4646
}
@@ -49,8 +49,8 @@ impl Bound {
4949
pub fn right_match(&self, commit: &Commit) -> bool {
5050
match self {
5151
Bound::Commit(sha) => commit.sha == **sha,
52-
Bound::Date(date) => commit.date.0.date().naive_utc() <= *date,
53-
Bound::None => true,
52+
Bound::Date(date) => commit.is_master() && commit.date.0.date().naive_utc() <= *date,
53+
Bound::None => commit.is_master(),
5454
}
5555
}
5656
}

0 commit comments

Comments
 (0)