DaanHoogland commented on code in PR #13878:
URL: https://github.com/apache/cloudstack/pull/13878#discussion_r3784104401


##########
.github/workflows/sonar-check.yml:
##########
@@ -106,10 +108,26 @@ jobs:
               `> [View full Actions run](${runUrl})`,
             ].filter(l => l !== undefined).join('\n');
 
-            await github.rest.issues.createComment({
+            const { data: comments } = await github.rest.issues.listComments({
               owner:        context.repo.owner,
               repo:         context.repo.repo,
               issue_number: context.issue.number,
-              body:         body,
             });
-            console.log('Posted coverage grade comment');
+           const existing = comments.find(c => c.user.type === 'Bot' && 
c.body.includes(marker));

Review Comment:
   ```suggestion
               const { data: comments } = await 
github.rest.issues.listComments({
                owner:        context.repo.owner,
                repo:         context.repo.repo,
                issue_number: context.issue.number,
              });
              const existing = comments.find(c => c.user.login === 
'github-actions[bot]' && c.body.includes(marker));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to