Skip to content

Commit 0d7cfbb

Browse files
Fix comment minimization for duplicate TruffleHog workflows
- Change comment identifier from workflow/job specific to static identifier - Use 'trufflehog-secret-scan-comment' instead of dynamic workflow names - Ensures all TruffleHog workflows can minimize each other's comments - Fixes issue where multiple TruffleHog workflows create duplicate comments
1 parent 3e4d882 commit 0d7cfbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/reusable-trufflehog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ jobs:
198198
id: hide-comments
199199
uses: int128/hide-comment-action@a30d551065e4231e6d7a671bb5ce884f9ee6417b # v1.43.0
200200
with:
201-
ends-with: "<!-- comment-action/${{ github.workflow }}/${{ github.job }} -->"
201+
ends-with: "<!-- trufflehog-secret-scan-comment -->"
202202

203203
- name: Generate formatted scan results for PR comment (verified/unverified secrets)
204204
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
@@ -274,7 +274,7 @@ jobs:
274274
with:
275275
post: |
276276
${{ steps.comment-body.outputs.body }}
277-
${{ steps.hide-comments.outputs.ends-with }}
277+
<!-- trufflehog-secret-scan-comment -->
278278
279279
- name: Create GitHub status check with scan summary (pass/fail)
280280
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1

0 commit comments

Comments
 (0)