Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Aug 3, 2024
1 parent ad9672d commit 1fb6f4a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1,953 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 0.1.3

## 0.1.2

### Added
Expand Down
4 changes: 2 additions & 2 deletions Source/Fn/Binary/Command/Parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ pub async fn Fn(Option { Entry, Separator, Pattern, Omit, .. }: Option) {
{
Ok(Summary) => {
if let Err(_Error) = Approval.send((Entry, Summary)) {
eprintln!("Failed to send result: {}", _Error);
eprintln!("Cannot Approval: {}", _Error);
}
}
Err(_Error) => eprintln!("Error generating summary for {}: {}", Entry, _Error),
Err(_Error) => eprintln!("Cannot Summary for {}: {}", Entry, _Error),
}
}));
}
Expand Down
24 changes: 9 additions & 15 deletions Source/Fn/Summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub async fn Fn(
})
.collect();

Date.sort_by(|A, B| A.1.cmp(&B.1)); // Sort in descending order (newest first)
Date.sort_by(|A, B| A.1.cmp(&B.1));

let Tag: Vec<String> = Date.into_iter().map(|(Tag, _)| Tag).collect();

Expand All @@ -82,28 +82,22 @@ pub async fn Fn(
format!("🗣️ Summary from first commit to last commit"),
)
} else {
for Window in Tag.windows(2) {
let Start = &Window[0];
let End = &Window[1];

if let Some(Latest) = Tag.last() {
Insert::Fn(
&Summary,
crate::Fn::Summary::Difference::Fn(&Repository, &Start, &End, Option)?,
format!("🗣️ Summary from {} to {}", Start, End),
crate::Fn::Summary::Difference::Fn(&Repository, Latest, &Last, Option)?,
format!("🗣️ Summary from {} to last commit", Latest),
);
}

if let Some(Latest) = Tag.last() {
Insert::Fn(
&Summary,
crate::Fn::Summary::Difference::Fn(&Repository, &First, Latest, Option)?,
format!("🗣️ Summary from first commit to {}", Latest),
);
for Window in Tag.windows(2) {
let Start = &Window[0];
let End = &Window[1];

Insert::Fn(
&Summary,
crate::Fn::Summary::Difference::Fn(&Repository, Latest, &Last, Option)?,
format!("🗣️ Summary from {} to last commit", Latest),
crate::Fn::Summary::Difference::Fn(&Repository, &Start, &End, Option)?,
format!("🗣️ Summary from {} to {}", Start, End),
);
}
}
Expand Down
Loading

0 comments on commit 1fb6f4a

Please sign in to comment.