Commit b900c7f
committed
feat: Refactor comment filtering with new status terms and flags
This commit introduces a more granular system for classifying and
filtering pull request review comments in the
`scripts/gha/get_pr_review_comments.py` script.
New Comment Statuses:
- `[IRRELEVANT]`: Comment's original diff position is lost (`position`
is null). Displays `original_line`.
- `[OLD]`: Comment is anchored to the diff, but its line number has
changed (`line` != `original_line`). Displays current `line`.
- `[CURRENT]`: Comment is anchored and its line number is unchanged.
Displays current `line`.
New Command-Line Flags:
- `--exclude-old` (default False): If set, hides `[OLD]` comments.
- `--include-irrelevant` (default False): If set, shows `[IRRELEVANT]`
comments (which are hidden by default).
- The old `--skip-outdated` flag has been removed.
Default Behavior:
- Shows `[CURRENT]` and `[OLD]` comments.
- Hides `[IRRELEVANT]` comments.
This provides you with more precise control over which comments
are displayed, improving the script's utility for various review
workflows. The "suggest next command" feature correctly interacts
with these new filters, only considering non-skipped comments for
its timestamp calculation.1 parent 203e88f commit b900c7f
1 file changed
Lines changed: 26 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| |||
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
101 | | - | |
102 | | - | |
| 108 | + | |
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
| |||
115 | 121 | | |
116 | 122 | | |
117 | 123 | | |
| 124 | + | |
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
| |||
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
137 | 142 | | |
138 | | - | |
139 | | - | |
| 143 | + | |
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
144 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
145 | 152 | | |
146 | 153 | | |
147 | 154 | | |
| |||
159 | 166 | | |
160 | 167 | | |
161 | 168 | | |
| 169 | + | |
162 | 170 | | |
163 | 171 | | |
164 | 172 | | |
| |||
0 commit comments