File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,19 +20,18 @@ jobs:
2020 SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
2121 run : |
2222 # 1. Calculate time 65 minutes ago
23- # This ensures we only notify about alerts created since the last run
2423 TIME_THRESHOLD=$(date -u -d '65 minutes ago' +'%Y-%m-%dT%H:%M:%SZ')
2524 echo "Checking for alerts created after: $TIME_THRESHOLD"
2625
2726 # 2. Fetch Open Alerts
2827 RAW_DATA=$(gh api "/repos/${{ github.repository }}/dependabot/alerts?state=open")
2928
3029 # 3. Filter for NEW items only
31- # We look for Open alerts created > 65 mins ago
30+ # Open alerts created > 65 mins ago
3231 ALERTS=$(echo "$RAW_DATA" | jq --arg TIME "$TIME_THRESHOLD" \
3332 '[ .[] | select(.state == "open") | select(.created_at > $TIME) ]')
3433
35- # --- FOR TESTING ONLY: UNCOMMENT BELOW TO IGNORE TIME FILTER ---
34+ # --- FOR TESTING ONLY ---
3635 # ALERTS=$(echo "$RAW_DATA" | jq '[ .[] | select(.state == "open") ]')
3736 # ---------------------------------------------------------------
3837
You can’t perform that action at this time.
0 commit comments