Commit 239b61a
Fix file-scoped comments failing with "Error: File has been deleted" (#8664)
* Initial plan
* Initial analysis
Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/2e5f5355-cccd-4ac6-b866-9d00dcd8b8b4
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Fix file-scoped comment failing with "Error: File has been deleted"
When creating a file-scoped comment (range is undefined), the
createReviewThread method was passing `line: 0` to the GitHub GraphQL
API. The API does not accept line 0 and returns a null thread, which
caused the misleading "File has been deleted" error.
Fix: pass endLine directly (undefined for file-scoped comments) instead
of converting undefined to 0. The line parameter is not required when
subjectType is FILE.
Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/2e5f5355-cccd-4ac6-b866-9d00dcd8b8b4
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Remove file-scoped comment test that only tests mocks
Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/2bb682a1-a239-4791-a328-bfb6a7d341dd
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>1 parent eacf539 commit 239b61a
File tree
2 files changed
+11
-29
lines changed- src
- @types
- github
2 files changed
+11
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | 356 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | 357 | | |
385 | 358 | | |
386 | 359 | | |
| |||
728 | 701 | | |
729 | 702 | | |
730 | 703 | | |
| 704 | + | |
| 705 | + | |
731 | 706 | | |
732 | 707 | | |
733 | 708 | | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
734 | 716 | | |
735 | 717 | | |
736 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
754 | | - | |
| 754 | + | |
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| |||
0 commit comments