Copilot commented on code in PR #3077:
URL: https://github.com/apache/apisix-dashboard/pull/3077#discussion_r2103680013


##########
.github/workflows/e2e.yml:
##########
@@ -15,7 +15,8 @@ concurrency:
 
 jobs:
   test:
-    if: ${{ contains(github.event.pull_request.labels.*.name, 'e2e-test') }}
+    # only run when e2e-test label is added or scheduled
+    if: ${{ contains(github.event.pull_request.labels.*.name, 'e2e-test') || 
github.event_name == 'schedule' }}

Review Comment:
   When the event is scheduled, the 'pull_request' object might not be present, 
which could lead to a runtime error. Consider adding a safeguard or 
restructuring the condition to handle scheduled events without relying on 
pull_request attributes.
   ```suggestion
       if: ${{ (github.event_name == 'pull_request' && 
contains(github.event.pull_request.labels.*.name, 'e2e-test')) || 
github.event_name == 'schedule' }}
   ```



-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to