Add an API for commenting on FileDiffs ranges
Review Request #10190 — Created Oct. 19, 2018 and submitted
The
ReviewDiffCommentResource
is now capable of creating comments on
FileDiffs with a base FileDiff ID. This allows us to comment on
FileDiffs in commit ranges and keep the context of the base FileDiff.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
E128 continuation line under-indented for visual indent |
reviewbot | |
F841 local variable 'rsp' is assigned to but never used |
reviewbot | |
Seems like this should be "The ID fo the base FileDiff" or "The base FileDiff ID" |
chipx86 | |
This would be more concise as: return (self.extra_data and self.extra_data.get(...)) |
chipx86 | |
Mind putting :term: around "cumulative diff?" We'll still need to define it, but it's such an insider term that I … |
chipx86 | |
I don't understand what this means. |
chipx86 | |
We should handle the case of this not existing. I know it should exist, but we've seen cases like this … |
chipx86 | |
Alphabetical order. |
chipx86 | |
Same comments as above with the terms and referencing commit histories. |
chipx86 | |
This really should have a period at the end. I know it didn't before, but most of our errors do. … |
chipx86 | |
This gets pretty deeply nested, and the checking of base_filediff_id here and the setting in the else clause can initially … |
chipx86 | |
This should be one statement. |
chipx86 | |
Typo: "Comapare" -> "Compare" Also, I think the "with" before "response" shouldn't be there. |
chipx86 | |
Let's just compare for truthiness. This is a bit fragile otherwise. |
chipx86 | |
Missing a docstring. |
chipx86 | |
"commit history" |
chipx86 | |
E999 SyntaxError: invalid syntax |
reviewbot | |
F401 'reviewboard.diffviewer.models.FileDiff' imported but unused |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
Let's use :term: here for "cumulative diff," since we now have it. |
chipx86 |
- Commit:
-
ba06d71ffbbe698c0343b46a122444c377c12d6b2669689253ab702a180ed67ac95cc7ff2d7739bd
Checks run (2 succeeded)
-
-
-
-
Mind putting
:term:
around "cumulative diff?" We'll still need to define it, but it's such an insider term that I think we'll need to if we're going to at all reference it publicly.This should probably also mention that it's used for review requests with commit history.
-
-
We should handle the case of this not existing. I know it should exist, but we've seen cases like this before with corruption/hand-modified tables.
-
-
-
This really should have a period at the end. I know it didn't before, but most of our errors do.
All the ones below should as well.
-
This gets pretty deeply nested, and the checking of
base_filediff_id
here and the setting in theelse
clause can initially be confusing. How about:if filediff is None or not dvcs_feaure.is_enabled(request=request): base_filediff_id = None if base_filediff_id is not None: ...
-
-
-
-
-
- Change Summary:
-
Addressed feedback.
- Commit:
-
2669689253ab702a180ed67ac95cc7ff2d7739bd23bc09a1302c353543e317f1d2ea99b9a3590a8a
- Diff:
-
Revision 3 (+843 -40)
- Commit:
-
23bc09a1302c353543e317f1d2ea99b9a3590a8aaab8ef49464cdbcf9dc7d4bfd10bc004600ba748