You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Improve context display and suggested command robustness
This commit enhances `scripts/gha/get_pr_review_comments.py` in two ways:
1. Suggested Command: The "suggest next command" feature now
prepends `sys.executable` to the command. This ensures that the
suggested command uses the same Python interpreter that the script
was originally run with, making it more robust across different
environments or if a specific interpreter was used.
2. Diff Hunk Context Display:
- The default for `--context-lines` is now 10 (reverted from 0).
- When `--context-lines > 0`, the script will first print the
diff hunk header line (if it starts with "@@ ").
- It will then print the last N (`args.context_lines`) lines from
the *remainder* of the hunk. This ensures the header is shown
for context, and then the trailing lines of that hunk are
displayed, avoiding double-printing of the header if it would
have naturally fallen into the "last N lines" of the full hunk.
- If `--context-lines == 0`, the full hunk is displayed.
0 commit comments