Skip to content

Commit 9c541fa

Browse files
committed
CI/check-ocaml-refs: update the existing commits instead of creating
1 parent c43d71a commit 9c541fa

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/check-ocaml-refs.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ jobs:
7979
STATUS_MSG="✓ Validation passed"
8080
fi
8181
82-
# Create comment body
82+
# Create comment body with hidden identifier
8383
cat > comment.md <<COMMENT_EOF
84+
<!-- ocaml-ref-validation -->
8485
## OCaml Reference Validation Results
8586
8687
**Repository**: ${OCAML_REPO}
@@ -103,12 +104,23 @@ jobs:
103104
</details>
104105
COMMENT_EOF
105106
107+
- name: Find existing OCaml validation comment
108+
if: github.event_name == 'pull_request'
109+
uses: peter-evans/find-comment@v3
110+
id: find-comment
111+
with:
112+
issue-number: ${{ github.event.pull_request.number }}
113+
comment-author: 'github-actions[bot]'
114+
body-includes: '<!-- ocaml-ref-validation -->'
115+
106116
- name: Post PR comment with validation results
107117
if: github.event_name == 'pull_request'
108118
uses: peter-evans/create-or-update-comment@v4
109119
with:
120+
comment-id: ${{ steps.find-comment.outputs.comment-id }}
110121
issue-number: ${{ github.event.pull_request.number }}
111122
body-path: comment.md
123+
edit-mode: replace
112124

113125
- name: Update references if stale
114126
if: steps.check.outputs.has_issues != 'true' && github.event_name != 'pull_request'

0 commit comments

Comments
 (0)