---
title: "How to preserve a GitHub review comment when its line moves | Proofline"
description: "Keep the comment’s stable ID, its review and thread relationship, the original commit and the original diff coordinates available from the API."
url: https://proofline.sh/learn/export-github-review-comment-anchors/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# How to preserve a GitHub review comment when its line moves

Keep the comment’s stable ID, its review and thread relationship, the original commit and the original diff coordinates available from the API. A current line number can be missing or refer to a different version of the file after a push.

Code review The Proofline team November 23, 2026 1 min read

## Restore an old inline warning

Suppose a reviewer comments on a fallback branch in `src/retry.ts`. The author then moves the fallback to a helper and replies that the old branch is gone. In an export, showing only the current file and line can make the warning look like it refers to the new helper.

Keep the path, original commit, original line or position fields and the diff hunk GitHub returned. For replies, keep the parent comment ID. The exported record can show the old hunk beside the author’s response without projecting it onto the new code. Preserve a link to the original thread for readers who still have access. [GitHub review comment response fields](https://docs.github.com/en/rest/pulls/comments)

Try the export before and after the move. A reader should be able to answer what the warning referred to from the earlier data, even if the record retained only an approved excerpt. If the whole original file is needed, [preserve its Git objects](/learn/retain-git-objects-for-review/).

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Can you reproduce an old review from the recorded Git SHA?](/learn/retain-git-objects-for-review/)
    
    Code review The Proofline team November 23, 2026 1 min read
    
-   ### [What to retain when exporting GitHub review decisions](/learn/export-github-review-decisions/)
    
    Code review The Proofline team November 23, 2026 1 min read
