Add new webhook event: on_version_created#24545
Conversation
5ca7ef0 to
7905e91
Compare
| }, | ||
| "url": "http://olympia.test/api/v5/addons/addon/85/versions/42/", | ||
| "download_source_url": "http://olympia.test/downloads/source/42" | ||
| }, |
There was a problem hiding this comment.
Yep, that's breaking scanners listening to this event, but we don't have any anyway. The source builder is the only one that will listen to this event, but it'll also have to listen to on_version_created so I'll update the source builder to account for that change.
7905e91 to
42fa46f
Compare
eviljeff
left a comment
There was a problem hiding this comment.
I wasn't sure how to test (so I didn't) but r+
| license = CompactLicenseSerializer(read_only=True) | ||
| file = MinimalFileSerializer(read_only=True) |
There was a problem hiding this comment.
nit: doesn't hurt, but you don't need to specify read_only=True on the field too if the Meta read_only_fields is defined - it's the shortcut to defining it per field.
There was a problem hiding this comment.
That's what I assumed but then
disagreed :DThere was a problem hiding this comment.
Hah, I had a feeling there was some edge case so I read the drf code 🤷♂️
Fixes mozilla/addons#15958
Once we have this webhook event, we can hook up the source builder to it. We'll also want this event to be blocking auto approval (see #24533).