File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,20 +127,23 @@ jobs:
127127
128128 # Two independent builds run in parallel:
129129 # A) prepare main worktree → build main binary (git I/O then CPU)
130- # Skipped on main scan cache hit — binary is not needed.
130+ # Skipped on main scan cache hit or when main_csv is empty
131+ # (all changed detectors are new — no baseline needed).
131132 # B) build PR binary (CPU, no dependencies)
132133 - name : Build binaries
133134 if : steps.detect.outputs.any_changed == 'true'
134135 shell : bash
135136 env :
136137 MERGE_BASE : ${{ steps.merge_base.outputs.sha }}
138+ MAIN_CSV : ${{ steps.detect.outputs.main_csv }}
137139 MAIN_SCAN_CACHE_HIT : ${{ steps.main_scan_cache.outputs.cache-hit }}
138140 run : |
139141 set -o pipefail
140142
141143 # Chain A: prepare worktree, then build main binary.
142- # Skipped when main scan results are already cached.
143- if [[ "$MAIN_SCAN_CACHE_HIT" != 'true' ]]; then
144+ # Skipped when main scan results are already cached, or when all
145+ # changed detectors are new (main_csv empty — no baseline needed).
146+ if [[ -n "$MAIN_CSV" && "$MAIN_SCAN_CACHE_HIT" != 'true' ]]; then
144147 (
145148 git worktree add /tmp/trufflehog-main-src "$MERGE_BASE"
146149 cd /tmp/trufflehog-main-src
Original file line number Diff line number Diff line change 3636)
3737
3838STATUS_KEY = (
39- "🔴 regression: >5 new, >20% increase over main, or any removed"
40- " \u00a0 ·\u00a0 "
41- "⚠️ warning: 1–5 new and ≤20% increase over main"
42- " \u00a0 ·\u00a0 "
43- "✅ clean"
44- " \u00a0 ·\u00a0 "
45- "🆕 new detector (no baseline)"
39+ "- 🔴 regression: >5 new, >20% increase over main, or any removed\n "
40+ "- ⚠️ warning: 1–5 new and ≤20% increase over main\n "
41+ "- ✅ clean\n "
42+ "- 🆕 new detector (no baseline)"
4643)
4744
4845# Marker on the very first line of the body so peter-evans/find-comment can
You can’t perform that action at this time.
0 commit comments