Skip to content

Commit

Permalink
fix(backend): account for no changed packages
Browse files Browse the repository at this point in the history
  • Loading branch information
dr460nf1r3 committed Nov 4, 2024
1 parent 2d65cd5 commit ef2fb47
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions backend/src/repo-manager/repo-manager.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,13 @@ export class RepoManagerService {
* Summarize the changes of the run.
*/
summarizeChanges(results: BumpResult[], repoManager: RepoManager): void {
Logger.log("Summarizing changes:", "RepoManager");
Logger.log(`In total, ${repoManager.changedArchPackages.length} Arch package(s) were changed`, "RepoManager");

if (!results || !repoManager) return;
if (results.length > 0) {
Logger.log("Summarizing changes:", "RepoManager");
Logger.log(
`In total, ${repoManager.changedArchPackages.length} Arch package(s) were changed`,
"RepoManager",
);
for (const result of results) {
if (!result.bumped || result?.bumped?.size === 0) {
Logger.log(`No packages affected in ${result.repo}`, "RepoManager");
Expand Down Expand Up @@ -200,7 +203,9 @@ export class RepoManagerService {
},
];

this.summarizeChanges(result, this.repoManager);
if (result.length > 0) {
this.summarizeChanges(result, this.repoManager);
}
}
}

Expand Down

0 comments on commit ef2fb47

Please sign in to comment.