Benjamin-Philip commented on code in PR #128:
URL: https://github.com/apache/arrow-erlang/pull/128#discussion_r4755404275


##########
.github/workflows/pr_comment.yml:
##########
@@ -18,37 +18,45 @@
 name: PR comment
 
 on: # zizmor: ignore[dangerous-triggers]
-  pull_request_target:
+  workflow_run:
+    workflows: [Docs]
     types:
-      - opened
+      - completed
+  workflow_dispatch:
+    inputs:
+      run_id:
+        description: 'workflow run-id of the Docs workflow which generated the 
message'
+        required: true
 
 permissions:
-  contents: read
+  actions: read
   issues: write
   pull-requests: write
 
 jobs:
   preview-url:
     name: Preview URL
-    if: github.event.pull_request.head.repo.full_name != 'apache/arrow-erlang'

Review Comment:
   See the changes to the triggers. `workflow_run` (i.e. a completion of the 
Docs workflow) and `workflow_dispatch` are the only triggers.
   
   A push to main may trigger `docs.yml`, which in turn when completed may 
trigger `pr_comment.yml`. However, the `--create-if-none --edit-last` flags 
passed to `gh pr comment` cleanly handles repeated runs.



-- 
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