From 320cc6e6a046450621bdf0bdd14d0e5a524e5689 Mon Sep 17 00:00:00 2001 From: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com> Date: Mon, 22 Sep 2025 15:23:34 +0200 Subject: [PATCH] harden: implement CodeRabbit bash and output file suggestions - Add 'set -Eeuo pipefail' for strict bash error handling - Make issue metrics output file explicit to avoid coupling to action defaults - Prevents future breakage if github/issue-metrics changes default filenames - Follows defensive programming best practices --- .github/workflows/weekly-metrics-discord.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/weekly-metrics-discord.yml b/.github/workflows/weekly-metrics-discord.yml index 459c19b8..e207963b 100644 --- a/.github/workflows/weekly-metrics-discord.yml +++ b/.github/workflows/weekly-metrics-discord.yml @@ -27,6 +27,7 @@ jobs: - name: Get dates for last week run: | + set -Eeuo pipefail # Last 14 days first_day=$(date -d "14 days ago" +%Y-%m-%d) last_day=$(date +%Y-%m-%d) @@ -43,6 +44,7 @@ jobs: SEARCH_QUERY: "repo:${{ github.repository }} is:issue created:${{ env.first_day }}..${{ env.last_day }}" HIDE_TIME_TO_ANSWER: true HIDE_LABEL_METRICS: false + OUTPUT_FILE: issue_metrics.md - name: Generate PR metrics uses: github/issue-metrics@v3