Skip to content

Commit

Permalink
SonarQube code issue fixed - Code complexity for Artifactory Uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
NihalBarick13 committed Nov 7, 2023
1 parent 71d36ea commit e79083a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/ArtifactoryUploader/PackageUploadHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,21 @@ public async static Task<List<ComponentsToArtifactory>> GetComponentsToBeUploade
ApiKey = appSettings.ArtifactoryUploadApiKey,
Email = appSettings.ArtifactoryUploadUser,
JfrogApi = appSettings.JFrogApi,
SrcRepoPathWithFullName = aqlResult != null ? aqlResult.Repo + "/" + aqlResult.Path + "/" + aqlResult.Name : string.Empty,
Path = aqlResult != null ? GetConanPath(aqlResult.Path, $"{item.Name}/{item.Version}") : string.Empty,
PypiCompName = aqlResult != null ? aqlResult.Name : string.Empty
};

if (aqlResult != null)
{
components.SrcRepoPathWithFullName = aqlResult.Repo + "/" + aqlResult.Path + "/" + aqlResult.Name;
components.Path = GetConanPath(aqlResult.Path, $"{item.Name}/{item.Version}");
components.PypiCompName = aqlResult.Name;
}
else
{
components.SrcRepoPathWithFullName = string.Empty;
components.Path = string.Empty;
components.PypiCompName = string.Empty;
}

components.PackageInfoApiUrl = GetPackageInfoURL(components);
components.CopyPackageApiUrl = GetCopyURL(components);
componentsToBeUploaded.Add(components);
Expand Down

0 comments on commit e79083a

Please sign in to comment.