-
-
We should have unit tests for POSTing/PUTing with:
1) Bad change IDs
2) Bad review IDs
3) Bad statusesAlso, can you run
./contrib/internal/webapi-lint.py
and make sure this doesn't introduce new warnings? -
We should have a docstring here. (I know the others don't, but that's something we need to do at some point too.)
-
Since this is public docs, this should be greatly fleshed out to cover more about what the resource is about. Purpose of status updates, how you'd use the resource, etc. would be good.
-
Can we add some filtering options for timestamps, change description IDs, states, and service IDs, and document those? (This would go in
get_queryset
, but should be documented here.) -
Here and in other HTTP handler methods, we should use "Returns." While "Return" is appropriate for codebase docs, API docs aren't using it.
-
-
This should be fleshed out to go into more details about usage. For instance, indicating when a change/review ID would be provided, ordering of operations.
-
For consistency with the other resources, can we make this:
return 201, { self.item_result_key: status_update, }
-
-
-
-
This can use the pattern other resources use:
for field_name in ('service_id', 'summary', 'description', ...): if field_name in kwargs: setattr(status_update, field_name, kwargs[field_name])
-
-
Status Updates part 6: Add resource for status updates.
Review Request #8407 — Created Sept. 18, 2016 and submitted
This change adds an API endpoint for creating and manipulating status updates.
This is intended to be used by consumers who want to create status updates from
a purely third-party source without writing an extension.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
We should have unit tests for POSTing/PUTing with: 1) Bad change IDs 2) Bad review IDs 3) Bad statuses Also, … |
chipx86 | |
We should have a docstring here. (I know the others don't, but that's something we need to do at some … |
chipx86 | |
Since this is public docs, this should be greatly fleshed out to cover more about what the resource is about. … |
chipx86 | |
Can we add some filtering options for timestamps, change description IDs, states, and service IDs, and document those? (This would … |
chipx86 | |
Here and in other HTTP handler methods, we should use "Returns." While "Return" is appropriate for codebase docs, API docs … |
chipx86 | |
Missing Args and Returns. |
chipx86 | |
This should be fleshed out to go into more details about usage. For instance, indicating when a change/review ID would … |
chipx86 | |
For consistency with the other resources, can we make this: return 201, { self.item_result_key: status_update, } |
chipx86 | |
This needs a docstring for the public API docs. |
chipx86 | |
Same comment as above. |
chipx86 | |
Missing docstring. |
chipx86 | |
This can use the pattern other resources use: for field_name in ('service_id', 'summary', 'description', ...): if field_name in kwargs: setattr(status_update, … |
chipx86 | |
This needs to check and return a suitable error. |
chipx86 | |
Needs docs. |
chipx86 | |
User or unicode |
brennie | |
In part 5, you use done-success and done-failure in the StatusUpdate model. |
brennie | |
Missing Returns |
chipx86 |
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py
- Commit:
-
f830d97fa680cd3cfe41dd1e4ccde79bb191dd89e495969a155a948ffe86c8738760a407950003ba
- Diff:
-
Revision 2 (+805 -19)
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py
- Change Summary:
-
Fix a couple small bugs that I encountered trying to actually use this:
- The owning user wasn't properly assigned.
- The accepted values for the state incorrectly used underscores instead of hyphens.
- Commit:
-
e495969a155a948ffe86c8738760a407950003bae8e7f3aded3c529686fc2fbe4e09ec601c286df2
- Diff:
-
Revision 3 (+806 -19)
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py
- Change Summary:
-
Fix a docstring.
- Commit:
-
e8e7f3aded3c529686fc2fbe4e09ec601c286df25b2ac529176629455c9a0cb1f9c9c9ecd221b82e
- Diff:
-
Revision 4 (+806 -19)
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py
- Change Summary:
-
Fix a docstring.
- Commit:
-
5b2ac529176629455c9a0cb1f9c9c9ecd221b82e2d8b8cc20e7aeac179c11fbf905e4e2722eb521b
- Diff:
-
Revision 5 (+810 -19)
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py