Build WebAPI docs for DiffCommit resources
Review Request #10118 — Created Aug. 13, 2018 and submitted
The docs fixtures now include
DiffCommit
objects, which allows
documentation to be built for the diff commit resource pages, which are
now also included in the documentation.The repository used for these is the
git_repo
shipped in
reviewboard/scmtools/testdata
, but since repositories require an
absolute file path, we ship the fixtures with a placeholder path and
replace it when we build the documentation.
Built docs and looked through them.
Description | From | Last Updated |
---|---|---|
The review request info makes it sound like this is purely about the fixtures, but this change is truly about … |
chipx86 | |
E128 continuation line under-indented for visual indent |
reviewbot | |
E128 continuation line under-indented for visual indent |
reviewbot | |
E128 continuation line under-indented for visual indent |
reviewbot | |
Can you add comments here about what we're doing and why? I think we could also simplify this a fair … |
chipx86 | |
Diff commits should be after diff (immediately before the file attachments). |
chipx86 |
- Commit:
-
748df5f486327fe9c3a0e9b527feb4c8fde2cba32d1df21ce4755a189277bdc1f2a2cbe9941f15cc
- Diff:
-
Revision 2 (+423 -1)
Checks run (2 succeeded)
-
-
The review request info makes it sound like this is purely about the fixtures, but this change is truly about being able to document and build docs for the new resources, with the fixture changes supporting that purpose.
-
Can you add comments here about what we're doing and why?
I think we could also simplify this a fair amount:
Repository.objects.filter(name='Git Repo', path='/placeholder').update( path=os.path.abspath(os.path.join(reviewboard.__file__, '..', 'scmtools', 'testdata', 'git_repo')))
One SQL query instead of two, less data to fetch, fewer lines, and the path join is cheap. Of course, this is not exactly an expensive code path, but no point in doing extra work.
- Change Summary:
-
Addressed Christiann's issues.
- Commit:
-
2d1df21ce4755a189277bdc1f2a2cbe9941f15cc51276955bc0098d4b3bbddf7552a6bf5f58393f6
- Diff:
-
Revision 3 (+421 -1)
Checks run (2 succeeded)
- Commit:
-
51276955bc0098d4b3bbddf7552a6bf5f58393f60150021e48203ddf8ac2e20fe6cb571880022ff8
- Diff:
-
Revision 4 (+421 -1)