File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,7 +112,15 @@ export class CurrentBranchTreeProvider
112112
113113 const resp = result . data ;
114114 const runs = resp . workflow_runs ;
115+ // 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+ } ) ;
115123
116- return this . runNodes ( gitHubRepoContext , runs , true ) ;
124+ return this . runNodes ( gitHubRepoContext , runsWithNamesWithNoNewlines , true ) ;
117125 }
118126}
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ export async function getWorkflowNodes(gitHubRepoContext: GitHubRepoContext) {
3636 workflows . map ( async wf => {
3737 const workflowUri = getWorkflowUri ( gitHubRepoContext , wf . path ) ;
3838 const workflowContext = await getContextStringForWorkflow ( workflowUri ) ;
39+ const nameWithoutNewlines = wf . name . replace ( / ( \r \n | \n | \r ) / gm, " " ) ;
40+
41+ // We are removing all newline characters from the workflow name for presentation purposes
42+ wf . name = nameWithoutNewlines ;
3943
4044 return new WorkflowNode ( gitHubRepoContext , wf , workflowContext ) ;
4145 } )
You can’t perform that action at this time.
0 commit comments