diff --git a/.github/workflows/expo-preview.yml b/.github/workflows/expo-preview.yml
index 22540548..b7dafb3e 100644
--- a/.github/workflows/expo-preview.yml
+++ b/.github/workflows/expo-preview.yml
@@ -47,9 +47,21 @@ jobs:
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
+ const body = 'The Expo app for the example from this branch is ready!\n\n[expo.io/${{ steps.expo.outputs.path }}](https://expo.io/${{ steps.expo.outputs.path }})\n\n
';
+
+ const comments = await github.issues.listComments({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ });
+
+ if (comments.some(comment => comment.body === body)) {
+ return;
+ }
+
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
- body: 'The Expo app for the example from this branch is ready!\n\n[expo.io/${{ steps.expo.outputs.path }}](https://expo.io/${{ steps.expo.outputs.path }})\n\n
'
+ body
})
diff --git a/.github/workflows/versions.yml b/.github/workflows/versions.yml
index 4fe21e7b..21009928 100644
--- a/.github/workflows/versions.yml
+++ b/.github/workflows/versions.yml
@@ -1,7 +1,7 @@
name: Check versions
on:
issues:
- types: [opened]
+ types: [opened, edited]
jobs:
check-versions: