Skip to content

Commit a10be28

Browse files
authored
ci: reuse existing comment (#90)
1 parent b2c3d03 commit a10be28

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/reusable-trufflehog.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,6 @@ jobs:
104104
echo "unverified=${UNVERIFIED}" >> "${GITHUB_OUTPUT}"
105105
echo "total=${TOTAL}" >> "${GITHUB_OUTPUT}"
106106
107-
- name: Hide previous TruffleHog comments
108-
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
109-
uses: int128/hide-comment-action@a30d551065e4231e6d7a671bb5ce884f9ee6417b # v1.43.0
110-
with:
111-
ends-with: "<!-- trufflehog-secret-scan-comment -->"
112-
113107
- name: Generate PR comment
114108
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
115109
id: comment-body
@@ -161,11 +155,13 @@ jobs:
161155
162156
- name: Post PR comment
163157
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
164-
uses: int128/comment-action@f4faf53666ef83da7d274fa2007e9212c4d719c3 # v1.39.0
158+
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
165159
with:
166-
post: |
160+
# We retain the final trufflehog-secret-scan-comment marker in case we want to chang the action to another one.
161+
message: |
167162
${{ steps.comment-body.outputs.body }}
168163
<!-- trufflehog-secret-scan-comment -->
164+
message-id: trufflehog-secret-scan-comment
169165

170166
- name: Create scan report
171167
env:

0 commit comments

Comments
 (0)