You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Output validation comments even without changes (#4781)
* Output validation comments even without changes
Otherwise, a PR that breaks validation but then restores it will keep a comment
saying that validation is broken.
* Adjust output
* Try fixing branch name
* Stop trying to display the target branch
(cherry picked from commit bbd5dcf)
letcomment=`Following you can find the validation changes against the target branch for the API${changedApis.length===1 ? '' : 's'}.\n\n`
147
148
if(changedApis.length>0){
148
-
letcomment=`Following you can find the validation changes for the API${changedApis.length===1 ? '' : 's'} you have modified.\n\n`
149
149
comment+='| API | Status | Request | Response |\n'
150
150
comment+='| --- | --- | --- | --- |\n'
151
151
for(constchangeofchangedApis){
152
152
comment+=buildDiffTableLine(change)
153
153
}
154
-
comment+=`\nYou can validate ${changedApis.length===1 ? 'this' : 'these'} API${changedApis.length===1 ? '' : 's'} yourself by using the ${tick}make validate${tick} target.\n`
155
-
156
-
core.setOutput('has_results','true')
157
-
core.setOutput('comment_body',comment)
158
154
}else{
159
-
core.setOutput('has_results','false')
155
+
comment+='**No changes detected**.\n'
160
156
}
157
+
comment+=`\nYou can validate ${changedApis.length===1 ? 'this' : 'these'} API${changedApis.length===1 ? '' : 's'} yourself by using the ${tick}make validate${tick} target.\n`
158
+
core.setOutput('comment_body',comment)
161
159
162
160
core.info('Done!')
163
161
}
@@ -231,4 +229,4 @@ function generateResponse (r) {
0 commit comments