Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit a1a6e75

Browse files
authored
Merge pull request #81 from rylev/clean-up-logs
Clean up logs by not showing headers on empty diffs
2 parents c9a63f6 + 3a07888 commit a1a6e75

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/github/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,11 +866,15 @@ impl std::fmt::Display for UpdateRepoDiff {
866866
for permission_diff in &self.permission_diffs {
867867
write!(f, "{permission_diff}")?;
868868
}
869-
writeln!(f, " Branch Protections:")?;
869+
if !self.branch_protection_diffs.is_empty() {
870+
writeln!(f, " Branch Protections:")?;
871+
}
870872
for branch_protection_diff in &self.branch_protection_diffs {
871873
write!(f, "{branch_protection_diff}")?;
872874
}
873-
writeln!(f, " App installation changes:")?;
875+
if !self.app_installation_diffs.is_empty() {
876+
writeln!(f, " App installation changes:")?;
877+
}
874878
for diff in &self.app_installation_diffs {
875879
write!(f, "{diff}")?;
876880
}

0 commit comments

Comments
 (0)