{"push_id":1108065999,"size":113,"distinct_size":2,"ref":"refs/heads/jenkins","head":"a8f87dbbd3ba3b7657f6df424e850de99f618e4d","before":"8f3c5716ab9302afede1190512f5dfb3e0d029f3","commits":[{"sha":"0d58f63a3f58c6d5364859acc5d3ab3bd2de4375","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Don't reset fields when updating an annotation\n\nTo be consistent with the behaviour of the legacy Elasticsearch\nAPI/schemas/storage code, when an API client updates an annotation with\nthe 'postgres' flag on they can choose to send only some fields (e.g.\nonly text: \"Hi\") and only the values of those fields will be updated,\nother fields will be left unchanged rather than being deleted from the\nannotation or reset to default values.","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/0d58f63a3f58c6d5364859acc5d3ab3bd2de4375"},{"sha":"82c37549764b83c78f08a4696ea5ece7a52edebe","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Use appstruct instead of result\n\nName the variable in tests the same as it's named in the code.\n\nAlso makes tests in this file consistent with each other.","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/82c37549764b83c78f08a4696ea5ece7a52edebe"},{"sha":"51fda4139a2f7371582f8d64b2f6fb0ab9d95719","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Typo","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/51fda4139a2f7371582f8d64b2f6fb0ab9d95719"},{"sha":"caa4d5e4bb41a67b07d662420890f5082fb7c508","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Prevent some fields from being updated\n\nDon't allow users to change the group, references or userid of an\nannotation when updating one.","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/caa4d5e4bb41a67b07d662420890f5082fb7c508"},{"sha":"127263a2c97ab7f1d2d91fa8bf517a685f55f2a8","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Don't require the \"permissions\" field\n\nThe general design of the API is that when updating an annotation if you\ndon't send a given field in the update request that field's value is\nsimply left unchanged. Any field can be omitted from API requests in\nthis way.\n\n\"permissions\" was the one field that was required.\n\nAllow \"permissions\" to be omitted in the same way as the other fields.\n\nAlso when creating an annotation, fields can be omitted and they will get\ndefault values. Make \"permissions\" behave the same.","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/127263a2c97ab7f1d2d91fa8bf517a685f55f2a8"},{"sha":"90ef3e22296d3c4caeb0439d24a57af13479d79f","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Make mock_request() a fixture","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/90ef3e22296d3c4caeb0439d24a57af13479d79f"},{"sha":"4732f4ffb76c7a936b2bf6e599dfe2d7683fb92c","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"PEP8","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/4732f4ffb76c7a936b2bf6e599dfe2d7683fb92c"},{"sha":"c47556422b4b9ad6edbf5525c8264250193b4026","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Deduplicate schemas","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/c47556422b4b9ad6edbf5525c8264250193b4026"},{"sha":"12b937e17bfd85842066318740e97daf9b5c0662","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Don't pass annotation to UpdateAnnotationSchema","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/12b937e17bfd85842066318740e97daf9b5c0662"},{"sha":"8e308557149f70cd51c9f69852d15320bd93e5d4","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"PEP8","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/8e308557149f70cd51c9f69852d15320bd93e5d4"},{"sha":"291ae2b48a2ae124d811a7fbdc8dbb72baaceb17","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Delete unused variables and fixtures","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/291ae2b48a2ae124d811a7fbdc8dbb72baaceb17"},{"sha":"e7ada10a9a0a1480732d3ce98ac9f3f65664302e","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Add \"links\" to protected fields\n\nAdd \"links\" to the list of protected fields (fields that are always\nignored if the client sends them in annotation create or update API\nrequests).\n\nA \"links\" property was recently added to the annotations that we return\nto the API: https://github.com/hypothesis/h/pull/3081\n\nThis is not a property that can be set or updated by the user. It's not\nstored in the database. The links are _generated_ at annotation read\ntime.\n\nUnfortunately this meant that, when the 'postgres' feature flag was on:\n\n- The client would receive the \"links\" field in the annotation from the\n  API\n\n- The client would send back the unmodified \"links\" field in annotation\n  update requests (it sends back all fields that it got from the API)\n\n- UpdateAnnotationSchema, because its code doesn't recognise the \"links\"\n  field, would then end up adding this field to the annotation \"extra\"\n  field in the DB\n\nWe don't want to store these generated, unmodifiable links in the DB.\n\nAdding \"links\" to the list of ignored fields fixes the problem.","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/e7ada10a9a0a1480732d3ce98ac9f3f65664302e"},{"sha":"099f8feca041a7397f9a23ab4df39eafaccf8475","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Create private annotations by default\n\nIf no \"permissions\" object is posted by an API client when creating an\nannotation then create a private rather than a shared annotation by\ndefault.\n\nWe decided it was safer to default to creating private data if not\nspecified.","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/099f8feca041a7397f9a23ab4df39eafaccf8475"},{"sha":"e77eb4f2c9bf896c11898714e1f9d921868ab2b4","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Improve some parse_document_claims_test.py test names","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/e77eb4f2c9bf896c11898714e1f9d921868ab2b4"},{"sha":"4a9ca9f1afb0fa483358301406d1268855f8351d","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Improve some schemas_test.py test names","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/4a9ca9f1afb0fa483358301406d1268855f8351d"},{"sha":"c224ae739141973560cf13aa8aeda217bb73a5ef","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Interpret permissions more conservatively\n\nInstead of considering an annotation to be private (not shared) if and\nonly if permissions['read'] == [userid], consider an annotation to be\n_shared_ if and only if permissions['read'] == [groupid].\n\nThis shouldn't make any difference to the behaviour given the annotation\ndata that our own client sends when creating or updating annotations.\n\nBut when other potential clients call the API, this means that if the\ngiven read permissions don't match what we expect we'll interpret the\nannotation as private rather than as shared by default.","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/c224ae739141973560cf13aa8aeda217bb73a5ef"},{"sha":"8ae1fd836c2d14f0761705d4784fb45eec4569f4","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Dont use annotation_data() in {Create,Update}AnnotationSchema tests\n\nWhatever data the {Create,Update}AnnotationSchema tests pass to\nvalidate(data) is not used, because the first thing that validate(data)\ndoes is appstruct = self.structure.validate(data) and then it never uses\ndata again. So the data that actually matters to the tests is the\nappstruct returned by the (mocked) self.structure.validate() method.\n\nThese tests were using annotation_data() unnecessarily and/or were\nactually broken (impossible to fail) tests.\n\nFix them all to set AnnotationSchema.validate.return_value instead, and\nmove annotation_data() into the one class that can actually use it,\nTestAnnotationSchema.","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/8ae1fd836c2d14f0761705d4784fb45eec4569f4"},{"sha":"01beec97f1cf773903d0ecc5ce5d77df12743942","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Parametrize some repetitive tests","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/01beec97f1cf773903d0ecc5ce5d77df12743942"},{"sha":"7bf50c1231dd95d0784a5839def87bfd46e83762","author":{"email":"46f1a0bd5592a2f9244ca321b129902a06b53e03@seanh.cc","name":"Sean Hammond"},"message":"Add some create annotation view tests","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/7bf50c1231dd95d0784a5839def87bfd46e83762"},{"sha":"68ed2ab2c54faeccab3bbbe7de7a9df38f40813f","author":{"email":"2fe3c805070d242647c7870e431812e6fcfdbf83@chdorner.com","name":"chdorner"},"message":"Move EventQueue it its own module in h.api","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/68ed2ab2c54faeccab3bbbe7de7a9df38f40813f"}]}