From 2f9f110b9caac57517a70ca3351cc21818c23e3e Mon Sep 17 00:00:00 2001 From: Vaibhav Singh Date: Wed, 17 May 2023 15:32:30 +0530 Subject: [PATCH] test --- .github/workflows/types-checked.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/types-checked.yml b/.github/workflows/types-checked.yml index 390fc5149a..578c8a7a25 100644 --- a/.github/workflows/types-checked.yml +++ b/.github/workflows/types-checked.yml @@ -26,8 +26,11 @@ jobs: with: script: | const comment = ` - :x: No modified files found in the 'types' directory. - Please ensure that you have made changes to files within the 'types' directory. + ## Status + * ❌ No modified files found in the `types` directory. + + Please make sure to include types for any changes you have made. Thank you!. + If you believe this is an error, kindly double-check your changes. `; const pullRequest = await github.rest.pulls.get({ @@ -40,14 +43,9 @@ jobs: repo: context.repo.repo, issue_number: context.issue.number }); - const existingComment = comments.data.find(comment => comment.user.login === 'github-actions[bot]' && comment.body.includes(':warning: No modified files found in the \'types\' directory.')); + const existingComment = comments.data.find(comment => comment.user.login === 'github-actions[bot]' && comment.body.includes('No modified files found in the `types` directory')); if (existingComment) { - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: existingComment.id, - body: comment - }); + console.log('Comment already exists, skipping...'); } else { await github.rest.issues.createComment({ owner: context.repo.owner,