@@ -1099,61 +1099,6 @@ private async Task<TreeResponse> GetTreeForPathAsync(string owner, string repo,
1099
1099
}
1100
1100
}
1101
1101
1102
- private async Task GetCommitMapForPathAsync (
1103
- string repoUri ,
1104
- string branch ,
1105
- string assetsProducedInCommit ,
1106
- List < GitFile > files ,
1107
- string pullRequestBaseBranch ,
1108
- string path = "eng/common/" )
1109
- {
1110
- if ( path . EndsWith ( "/" ) )
1111
- {
1112
- path = path . Substring ( 0 , path . Length - 1 ) ;
1113
- }
1114
-
1115
- _logger . LogInformation (
1116
- $ "Getting the contents of file/files in '{ path } ' of repo '{ repoUri } ' at commit '{ assetsProducedInCommit } '") ;
1117
-
1118
- ( string owner , string repo ) = ParseRepoUri ( repoUri ) ;
1119
- List < GitHubContent > ? contents ;
1120
-
1121
- using ( HttpResponseMessage response = await ExecuteRemoteGitCommandAsync (
1122
- HttpMethod . Get ,
1123
- $ "https://github.com/{ owner } /{ repo } ",
1124
- $ "repos/{ owner } /{ repo } /contents/{ path } ?ref={ assetsProducedInCommit } ",
1125
- _logger ) )
1126
- {
1127
- contents = JsonConvert . DeserializeObject < List < GitHubContent > > ( await response . Content . ReadAsStringAsync ( ) ) ;
1128
- }
1129
-
1130
- foreach ( GitHubContent content in contents ! )
1131
- {
1132
- if ( content . Type == GitHubContentType . File )
1133
- {
1134
- if ( ! DependencyFileManager . DependencyFiles . Contains ( content . Path ) )
1135
- {
1136
- string fileContent = await GetFileContentsAsync ( owner , repo , content . Path ) ;
1137
- var gitCommit = new GitFile ( content . Path , fileContent ) ;
1138
- files . Add ( gitCommit ) ;
1139
- }
1140
- }
1141
- else
1142
- {
1143
- await GetCommitMapForPathAsync (
1144
- repoUri ,
1145
- branch ,
1146
- assetsProducedInCommit ,
1147
- files ,
1148
- pullRequestBaseBranch ,
1149
- content . Path ) ;
1150
- }
1151
- }
1152
-
1153
- _logger . LogInformation (
1154
- $ "Getting the contents of file/files in '{ path } ' of repo '{ repoUri } ' at commit '{ assetsProducedInCommit } ' succeeded!") ;
1155
- }
1156
-
1157
1102
/// <summary>
1158
1103
/// Parse out the owner and repo from a repository url
1159
1104
/// </summary>
0 commit comments