Skip to content

Commit 6f5a024

Browse files
committed
modify underlying runs object
1 parent 31bd105 commit 6f5a024

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/treeViews/currentBranch.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,10 @@ export class CurrentBranchTreeProvider
113113
const resp = result.data;
114114
const runs = resp.workflow_runs;
115115
// We are removing newlines from workflow names for presentation purposes
116-
const runsWithNamesWithNoNewlines = runs.map(run => {
117-
if (run.name) {
118-
run.name = run.name.replace(/(\r\n|\n|\r)/gm, " ");
119-
}
120-
121-
return run;
122-
});
116+
for (const run of runs) {
117+
run.name = run.name?.replace(/(\r\n|\n|\r)/gm, " ");
118+
}
123119

124-
return this.runNodes(gitHubRepoContext, runsWithNamesWithNoNewlines, true);
120+
return this.runNodes(gitHubRepoContext, runs, true);
125121
}
126122
}

0 commit comments

Comments
 (0)