Copilot commented on code in PR #1718:
URL: https://github.com/apache/daffodil-vscode/pull/1718#discussion_r3405654868


##########
.github/workflows/documentaion.yml:
##########
@@ -30,18 +30,17 @@ on:
 
 jobs:
   enforce-checkbox:
-    # this if is to further ensure that this job won't run on dependabot or 
scala-steward PRs
-    if: ${{ !startsWith(github.head_ref, 'dependabot/') && 
!startsWith(github.head_ref, 'update/') }}
+    if: ${{ github.event_name == 'pull_request' && 
!startsWith(github.head_ref, 'dependabot/') && !startsWith(github.head_ref, 
'update/') }}

Review Comment:
   The workflow still triggers on `push`, but this job now only runs for 
`pull_request` events. That means every matching push will create a workflow 
run with all jobs skipped, which adds noise and uses CI resources without doing 
any work. Consider either removing the `on: push` trigger or adjusting the job 
logic so pushes are handled intentionally (e.g., a different job/condition).



##########
.github/workflows/documentaion.yml:
##########
@@ -30,18 +30,17 @@ on:
 
 jobs:
   enforce-checkbox:
-    # this if is to further ensure that this job won't run on dependabot or 
scala-steward PRs
-    if: ${{ !startsWith(github.head_ref, 'dependabot/') && 
!startsWith(github.head_ref, 'update/') }}
+    if: ${{ github.event_name == 'pull_request' && 
!startsWith(github.head_ref, 'dependabot/') && !startsWith(github.head_ref, 
'update/') }}
     runs-on: ubuntu-22.04
     steps:
       - name: Check required confirmation checkbox
         uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # 
v7
         with:
           script: |
-            const prBody = context.payload.pull_request.body || "";
+            const prBody = context.payload.pull_request?.body || "";
             const checkbox1Text = "- [x] I have determined that no 
documentation updates are needed for these changes";
             const checkbox2Text = "- [x] I have added the following 
documentation for these changes";
- 
+
             if (!prBody.includes(checkbox1Text) && 
!prBody.includes(checkbox2Text)) {
               core.setFailed("❌ Required documentation checkbox not checked. 
Please check one of the the box before merging.");

Review Comment:
   The failure message has a grammatical typo ("one of the the box"), which is 
user-facing and may be confusing. Suggest correcting it.



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