Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull request review thread start line must precede the end line #42

Closed
parkerbxyz opened this issue Oct 9, 2024 · 0 comments · Fixed by #45
Closed

Pull request review thread start line must precede the end line #42

parkerbxyz opened this issue Oct 9, 2024 · 0 comments · Fixed by #45
Assignees
Labels
bug Something isn't working

Comments

@parkerbxyz
Copy link
Owner

Sometimes this action fails with the following error:

Pull request review thread start line must precede the end line

Here's the debug output from a workflow run that failed with this error:

diff --git a/README.md b/README.md
index 35de41f..2f8d74e 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1 @@
-# test-repo!
-test
-
+# test-repo
@@ -4,0 +3 @@ test
+test
Starting line: 1
Number of lines: 3
Changes: [{"type":"DeletedLine","lineBefore":1,"content":"# test-repo!"},{"type":"DeletedLine","lineBefore":2,"content":"test"},{"type":"DeletedLine","lineBefore":3,"content":""},{"type":"AddedLine","lineAfter":1,"content":"# test-repo"}]
Starting line: 4
Number of lines: 0
Changes: [{"type":"AddedLine","lineAfter":3,"content":"test"}]

To fix this, we need to handle cases where the number of lines in a chunk is 0. In such cases, we should treat the start_line and [end] line as the same line.

@parkerbxyz parkerbxyz added the bug Something isn't working label Oct 9, 2024
@parkerbxyz parkerbxyz self-assigned this Oct 9, 2024
@parkerbxyz parkerbxyz linked a pull request Oct 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant