File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,29 @@ async function renderSidebarHTML() {
100100
101101 // create temporary modified files array
102102 let modifiedFilesTemp = Object . values ( JSON . parse ( JSON . stringify ( modifiedFiles ) ) ) ;
103+
104+ // legacy modified file dir
105+ modifiedFilesTemp . forEach ( modFile => {
106+
107+ // map modified file location
108+ let [ fileUser , fileRepo , fileDir ] = modFile . dir . split ( ',' ) ;
103109
110+ const [ repoName , repoBranch ] = repo . split ( ':' ) ;
111+
112+ // if modified file dosen't have a branch
113+ // and is in current repo
114+ if ( ! fileRepo . includes ( ':' )
115+ && fileUser === user
116+ && fileRepo === repoName ) {
117+
118+ // append default branch to file
119+ fileRepo = fileRepo + ':' + repoBranch ;
120+ modFile . dir = [ fileUser , fileRepo , fileDir ] . join ( ) ;
121+
122+ }
123+
124+ } ) ;
125+
104126 // get all modified files in directory
105127 modifiedFilesTemp = modifiedFilesTemp . filter ( modFile => modFile . dir == treeLoc . join ( ) ) ;
106128
You can’t perform that action at this time.
0 commit comments