Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavsingh97 committed May 17, 2023
1 parent 4275c25 commit 2f9f110
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/types-checked.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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,
Expand Down

0 comments on commit 2f9f110

Please sign in to comment.