-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix GitLab /ask_line for single-line diff notes #2156
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
base: main
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||
User description
Summary
Testing
PR Type
Bug fix, Tests
Description
Handle GitLab single-line diff notes without
line_rangefieldSupport both old and new file sides with correct path mapping
Add comprehensive unit tests for multi-line and single-line scenarios
Improve error handling with validation for missing line numbers/paths
Diagram Walkthrough
File Walkthrough
gitlab_webhook.py
Enhanced /ask_line handler for single-line diff notespr_agent/servers/gitlab_webhook.py
handle_ask_line()to handle both multi-line ranges andsingle-line notes
position.new_lineorposition.old_linewhenline_rangeis absent(old vs new)
before processing
.get()methods and null checkstest_gitlab_webhook.py
Add unit tests for GitLab webhook ask_line handlertests/unittest/test_gitlab_webhook.py
notes
side/path mapping
line_rangeGITLAB__URLenvironmentvariable