Annotations with both startLine and endLine reported as only on endLine in PR’s Files tab
#206690
Replies: 4 comments 3 replies
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
Hi, The workflow command in the example uses Could you try using - run: |
echo "::error file=src/controllers/Items/Sync.php,startLine=55,endLine=60::test foo"If it still shows only the end line, this may be a limitation or bug in how the Files tab renders multi-line annotations. I hope this helps! |
This comment was marked as low quality.
This comment was marked as low quality.
|
This is an intentional design choice in GitHub's PR diff renderer:
Multi-line annotations in the PR "Files changed" tab are anchored to the bottom of the code span (endLine / right side line R60). This ensures the comment box renders cleanly below the full block of code rather than breaking up the lines above it.
Review comments can be attached to multiple lines and they are
displayed below the range just fine, and the heading then reads
“Comment on lines R55 to R60” as expected.
The card's title pill reflects the DOM anchor line (R60), while the full line range (R55 through R60) receives the subtle red error highlight band across the diff margin.
That is not true for me. The only difference is the presence of the
annotation box.
If you open the Checks tab (or the workflow run details view), GitHub renders the annotation with its formal range: Lines 55–60.
That does not seem to be the case. The workflow run summary just shows
`src/controllers/Items/Sync.php#L55` (at least it is a start line
here).
|
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
Body
The issue previously reported in https://github.com/orgs/community/discussions/129899 still exists. When I add something like the following to my workflow:
I see the following annotation in the Files tab on a PR:
Note that it says “on line R60” rather than “on lines R55–R60”.
All reactions