about summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorhailey <me@haileyok.com>2025-07-24 16:31:37 -0700
committerGitHub <noreply@github.com>2025-07-24 16:31:37 -0700
commit101b3262b88b494459a211bdc697b1fd3222a50c (patch)
tree30f07024e15ed7532f9493ac9e849008113530e1 /.github
parent1ee91d2c90ef84e0b6728e896292968562c8af01 (diff)
downloadvoidsky-101b3262b88b494459a211bdc697b1fd3222a50c.tar.zst
fix action (#8715)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/pull-request-comment.yml94
1 files changed, 48 insertions, 46 deletions
diff --git a/.github/workflows/pull-request-comment.yml b/.github/workflows/pull-request-comment.yml
index 351e518bc..2233fbbba 100644
--- a/.github/workflows/pull-request-comment.yml
+++ b/.github/workflows/pull-request-comment.yml
@@ -12,52 +12,54 @@ jobs:
     outputs:
       should-deploy: ${{ steps.check-org.outputs.result }}
 
-  steps:
-    - name: Check if bot is mentioned
-      id: check-mention
-      run: |
-        if [[ "${{ github.event.comment.body }}" == *"@github-actions"* ]] || \
-           [[ "${{ github.event.comment.body }}" == *"github-actions[bot]"* ]]; then
-          bot_mentioned=true
-        else
-          bot_mentioned=false
-        fi
-
-
-        if [[ "${{ github.event.comment.body }}" == *"ota"* ]]; then
-          has_ota=true
-        else
-          has_ota=false
-        fi
-
-
-        if [[ "$bot_mentioned" == "true" ]] && [[ "$has_ota" == "true" ]]; then
-          echo "mentioned=true" >> $GITHUB_OUTPUT
-        else
-          echo "mentioned=false" >> $GITHUB_OUTPUT
-        fi
-
-    - name: Check organization membership
-      if: steps.check-mention.outputs.mentioned == 'true'
-      id: check-org
-      uses: actions/github-script@v7
-      with:
-        script: |
-          try {
-            const { data: perm } = await github.rest.repos.getCollaboratorPermissionLevel({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              username: context.payload.comment.user.login
-            });
-
-            const hasAccess = ['admin', 'write'].includes(perm.permission);
-            console.log(`User has ${perm.permission} access`);
-
-            return hasAccess;
-          } catch(error) {
-            console.log('User has no repository access');
-            return false;
-          }
+    steps:
+      - name: Check if bot is mentioned
+        id: check-mention
+        env:
+          COMMENT: ${{ github.event.comment.body }}
+        run: |
+          if [[ "$TITLE" == *"@github-actions"* ]] || \
+             [[ "$TITLE" == *"github-actions[bot]"* ]]; then
+            bot_mentioned=true
+          else
+            bot_mentioned=false
+          fi
+
+
+          if [[ "${{ github.event.comment.body }}" == *"ota"* ]]; then
+            has_ota=true
+          else
+            has_ota=false
+          fi
+
+
+          if [[ "$bot_mentioned" == "true" ]] && [[ "$has_ota" == "true" ]]; then
+            echo "mentioned=true" >> $GITHUB_OUTPUT
+          else
+            echo "mentioned=false" >> $GITHUB_OUTPUT
+          fi
+
+      - name: Check organization membership
+        if: steps.check-mention.outputs.mentioned == 'true'
+        id: check-org
+        uses: actions/github-script@v7
+        with:
+          script: |
+            try {
+              const { data: perm } = await github.rest.repos.getCollaboratorPermissionLevel({
+                owner: context.repo.owner,
+                repo: context.repo.repo,
+                username: context.payload.comment.user.login
+              });
+
+              const hasAccess = ['admin', 'write'].includes(perm.permission);
+              console.log(`User has ${perm.permission} access`);
+
+              return hasAccess;
+            } catch(error) {
+              console.log('User has no repository access');
+              return false;
+            }
 
   bundle-deploy:
     name: Bundle and Deploy EAS Update