Skip to content

Commit 69dc1a7

Browse files
spell check: update inline comments whose text changed instead of leaving the old wording
Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 Co-authored-by: Amp <amp@ampcode.com>
1 parent 2407a71 commit 69dc1a7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

dev/post-spelling-review.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,14 @@ async function syncInlineComments(findings) {
258258
continue;
259259
}
260260
if (wanted.has(key)) {
261+
const body = inlineBody(wanted.get(key));
262+
if (body !== comment.body) {
263+
await githubWrite(
264+
'PATCH',
265+
`/repos/${REPOSITORY}/pulls/comments/${comment.id}`,
266+
{body}
267+
);
268+
}
261269
wanted.delete(key);
262270
} else {
263271
await githubWrite(

0 commit comments

Comments
 (0)