Skip to content

Commit

Permalink
Updated review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ragavareddychalapala committed Jan 2, 2025
1 parent 51e069c commit 70e0aa0
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/ArtifactoryUploader/PackageUploadHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,8 @@ public static async Task<List<AqlResult>> GetPypiListOfComponentsFromRepo(string
{
foreach (var repo in repoList)
{
var test = await jFrogService.GetPypiInternalComponentDataByRepo(repo) ?? new List<AqlResult>();
aqlResultList.AddRange(test);
var componentRepoData = await jFrogService.GetPypiComponentDataByRepo(repo) ?? new List<AqlResult>();
aqlResultList.AddRange(componentRepoData);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public interface IJfrogAqlApiCommunication
/// </summary>
/// <param name="repoName">repoName</param>
/// <returns>HttpResponseMessage</returns>
Task<HttpResponseMessage> GetNpmInternalComponentDataByRepo(string repoName);
Task<HttpResponseMessage> GetNpmComponentDataByRepo(string repoName);
/// <summary>
/// Gets the internal component data based on repo name
/// </summary>
/// <param name="repoName">repoName</param>
/// <returns>HttpResponseMessage</returns>
Task<HttpResponseMessage> GetPypiInternalComponentDataByRepo(string repoName);
Task<HttpResponseMessage> GetPypiComponentDataByRepo(string repoName);


/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/LCT.APICommunications/JfrogAqlApiCommunication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public async Task<HttpResponseMessage> GetInternalComponentDataByRepo(string rep
HttpContent httpContent = new StringContent(aqlQueryToBody);
return await httpClient.PostAsync(uri, httpContent);
}
public async Task<HttpResponseMessage> GetNpmInternalComponentDataByRepo(string repoName)
public async Task<HttpResponseMessage> GetNpmComponentDataByRepo(string repoName)
{
HttpClient httpClient = GetHttpClient(ArtifactoryCredentials);
TimeSpan timeOutInSec = TimeSpan.FromSeconds(TimeoutInSec);
Expand All @@ -82,7 +82,7 @@ public async Task<HttpResponseMessage> GetNpmInternalComponentDataByRepo(string
HttpContent httpContent = new StringContent(aqlQueryToBody);
return await httpClient.PostAsync(uri, httpContent);
}
public async Task<HttpResponseMessage> GetPypiInternalComponentDataByRepo(string repoName)
public async Task<HttpResponseMessage> GetPypiComponentDataByRepo(string repoName)
{
HttpClient httpClient = GetHttpClient(ArtifactoryCredentials);
TimeSpan timeOutInSec = TimeSpan.FromSeconds(TimeoutInSec);
Expand Down
4 changes: 2 additions & 2 deletions src/LCT.Facade/Interfaces/IJfrogAqlApiCommunicationFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ public interface IJfrogAqlApiCommunicationFacade
/// </summary>
/// <param name="repoName">repoName</param>
/// <returns>HttpResponseMessage</returns>
Task<HttpResponseMessage> GetNpmInternalComponentDataByRepo(string repoName);
Task<HttpResponseMessage> GetNpmComponentDataByRepo(string repoName);
/// <summary>
/// Gets the Internal Component Data By Repo Name
/// </summary>
/// <param name="repoName">repoName</param>
/// <returns>HttpResponseMessage</returns>
Task<HttpResponseMessage> GetPypiInternalComponentDataByRepo(string repoName);
Task<HttpResponseMessage> GetPypiComponentDataByRepo(string repoName);


/// <summary>
Expand Down
8 changes: 4 additions & 4 deletions src/LCT.Facade/JfrogAqlApiCommunicationFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ public async Task<HttpResponseMessage> GetInternalComponentDataByRepo(string rep
/// </summary>
/// <param name="repoName">repoName</param>
/// <returns>HttpResponseMessage</returns>
public async Task<HttpResponseMessage> GetNpmInternalComponentDataByRepo(string repoName)
public async Task<HttpResponseMessage> GetNpmComponentDataByRepo(string repoName)
{
return await m_jfrogAqlApiCommunication.GetNpmInternalComponentDataByRepo(repoName);
return await m_jfrogAqlApiCommunication.GetNpmComponentDataByRepo(repoName);
}
/// <summary>
/// Gets the Internal Component Data By Repo Name
/// </summary>
/// <param name="repoName">repoName</param>
/// <returns>HttpResponseMessage</returns>
public async Task<HttpResponseMessage> GetPypiInternalComponentDataByRepo(string repoName)
public async Task<HttpResponseMessage> GetPypiComponentDataByRepo(string repoName)
{
return await m_jfrogAqlApiCommunication.GetPypiInternalComponentDataByRepo(repoName);
return await m_jfrogAqlApiCommunication.GetPypiComponentDataByRepo(repoName);
}

/// <summary>
Expand Down
8 changes: 4 additions & 4 deletions src/LCT.PackageIdentifier/BomHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ public async Task<List<AqlResult>> GetNpmListOfComponentsFromRepo(string[] repoL
{
foreach (var repo in repoList)
{
var test = await jFrogService.GetNpmInternalComponentDataByRepo(repo) ?? new List<AqlResult>();
aqlResultList.AddRange(test);
var componentRepoData = await jFrogService.GetNpmComponentDataByRepo(repo) ?? new List<AqlResult>();
aqlResultList.AddRange(componentRepoData);
}
}

Expand All @@ -197,8 +197,8 @@ public async Task<List<AqlResult>> GetPypiListOfComponentsFromRepo(string[] repo
{
foreach (var repo in repoList)
{
var test = await jFrogService.GetPypiInternalComponentDataByRepo(repo) ?? new List<AqlResult>();
aqlResultList.AddRange(test);
var componentRepoData = await jFrogService.GetPypiComponentDataByRepo(repo) ?? new List<AqlResult>();
aqlResultList.AddRange(componentRepoData);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/LCT.Services/Interface/IJFrogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public interface IJFrogService
/// </summary>
/// <param name="repoName">repoName</param>
/// <returns>IList<AqlResult></returns>
public Task<IList<AqlResult>> GetNpmInternalComponentDataByRepo(string repoName);
public Task<IList<AqlResult>> GetNpmComponentDataByRepo(string repoName);
/// <summary>
/// Gets the internal component data by Repo name
/// </summary>
/// <param name="repoName">repoName</param>
/// <returns>IList<AqlResult></returns>
public Task<IList<AqlResult>> GetPypiInternalComponentDataByRepo(string repoName);
public Task<IList<AqlResult>> GetPypiComponentDataByRepo(string repoName);

/// <summary>
/// Gets the package information in the repo, via the name or path
Expand Down
8 changes: 4 additions & 4 deletions src/LCT.Services/JFrogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ public async Task<IList<AqlResult>> GetInternalComponentDataByRepo(string repoNa

return aqlResult;
}
public async Task<IList<AqlResult>> GetNpmInternalComponentDataByRepo(string repoName)
public async Task<IList<AqlResult>> GetNpmComponentDataByRepo(string repoName)
{
HttpResponseMessage httpResponseMessage = null;
IList<AqlResult> aqlResult = new List<AqlResult>();

try
{
httpResponseMessage = await m_JFrogApiCommunicationFacade.GetNpmInternalComponentDataByRepo(repoName);
httpResponseMessage = await m_JFrogApiCommunicationFacade.GetNpmComponentDataByRepo(repoName);
if (httpResponseMessage == null || !httpResponseMessage.IsSuccessStatusCode)
{
return new List<AqlResult>();
Expand All @@ -96,14 +96,14 @@ public async Task<IList<AqlResult>> GetNpmInternalComponentDataByRepo(string rep

return aqlResult;
}
public async Task<IList<AqlResult>> GetPypiInternalComponentDataByRepo(string repoName)
public async Task<IList<AqlResult>> GetPypiComponentDataByRepo(string repoName)
{
HttpResponseMessage httpResponseMessage = null;
IList<AqlResult> aqlResult = new List<AqlResult>();

try
{
httpResponseMessage = await m_JFrogApiCommunicationFacade.GetPypiInternalComponentDataByRepo(repoName);
httpResponseMessage = await m_JFrogApiCommunicationFacade.GetPypiComponentDataByRepo(repoName);
if (httpResponseMessage == null || !httpResponseMessage.IsSuccessStatusCode)
{
return new List<AqlResult>();
Expand Down

0 comments on commit 70e0aa0

Please sign in to comment.