Status API
Review Request #7961 — Created Feb. 14, 2016 and discarded — Latest diff uploaded
Basic GET/POST/PUT request handlers are done. The basic statuses has type Success(represented as "S"), Failure("F") and Pending("P").
Unit tests are written for new features.
UI for displaying statuses are created.A demo for latest version can be viewed at:
https://drive.google.com/file/d/0B9f_D8xqWtODX01NMTFiZ2hfOG8/view?usp=sharingWhat to be done next:
Statuses are referenced by internally generated status id. Should change to a unique client ID.
Work with ReviewBot on grouping reviews of latest statuses.
Add filter to whether the statuses are current for the latest change (should probably default to only showing for the latest change)It's best to start looking at webapi/resources/status.py and reviews/models/status.py for implementation.
Some sample requests to be made are:
Get all statuses on a review request:
curl host/api/review-requests/1/statuss/GET request with some filter options:
curl host/api/review-requests/1/statuss/?status_type=P
curl host/api/review-requests/1/statuss/?time=YYYY-MM-DD-HH-MM-SSPOST request (need authorization info):
curl -X POST host/api/review-requests/1/statuss/ -d "context=Travis%20CI&label=Failed&progress=F&url=continuous-integration/travis&url_label=Build%20log" -A application/jsonPUT request (need authorization info):
curl -X PUT host/api/review-requests/1/statuss/1/ -d "context=Unit%20Testing&label=Success&progress=S" -A application/json