@@ -109,32 +109,33 @@ $packageProperties = Get-ChildItem -Recurse -Force "$configFileDir" `
109
109
foreach ($packagePropFile in $packageProperties )
110
110
{
111
111
$packageMetadata = Get-Content $packagePropFile | ConvertFrom-Json
112
- Write-Host " Processing $ ( $packageMetadata.ArtifactName ) "
112
+ $artifactOrModuleName = $packageMetadata.ArtifactName ?? $packageMetadata.ModuleName
113
+ Write-Host " Processing $ ( $artifactOrModuleName ) "
113
114
114
- $packages = & $FindArtifactForApiReviewFn $ArtifactPath $packageMetadata .ArtifactName
115
+ $packages = & $FindArtifactForApiReviewFn $ArtifactPath $artifactOrModuleName
115
116
116
117
if ($packages )
117
118
{
118
119
$pkgPath = $packages.Values [0 ]
119
- $isRequired = Should- Process- Package - pkgPath $pkgPath - packageName $ ($packageMetadata .ArtifactName )
120
+ $isRequired = Should- Process- Package - pkgPath $pkgPath - packageName $ ($artifactOrModuleName )
120
121
Write-Host " Is API change detect required for $ ( $packages.ArtifactName ) :$ ( $isRequired ) "
121
122
if ($isRequired -eq $True )
122
123
{
123
124
$filePath = $pkgPath.Replace ($ArtifactPath , " " ).Replace(" \" , " /" )
124
- $respCode = Submit-Request - filePath $filePath - packageName $ ($packageMetadata .ArtifactName )
125
+ $respCode = Submit-Request - filePath $filePath - packageName $ ($artifactOrModuleName )
125
126
if ($respCode -ne ' 200' )
126
127
{
127
- $responses [$ ($packageMetadata .ArtifactName )] = $respCode
128
+ $responses [$ ($artifactOrModuleName )] = $respCode
128
129
}
129
130
}
130
131
else
131
132
{
132
- Write-Host " Pull request does not have any change for $ ( $packageMetadata .ArtifactName ) ). Skipping API change detect."
133
+ Write-Host " Pull request does not have any change for $ ( $artifactOrModuleName ) ). Skipping API change detect."
133
134
}
134
135
}
135
136
else
136
137
{
137
- Write-Host " No package is found in artifact path to find API changes for $ ( $packageMetadata .ArtifactName ) "
138
+ Write-Host " No package is found in artifact path to find API changes for $ ( $artifactOrModuleName ) "
138
139
}
139
140
}
140
141
0 commit comments