← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~alvarocs/launchpad:validate-mp-subscopes into launchpad:master

 

The proposal to merge ~alvarocs/launchpad:validate-mp-subscopes into launchpad:master has been updated.

Description changed to:

These changes will allow to implement webhooks for either merge-proposal subscopes or the parent merge-proposal, from the Launchpad API. For now this hides the selection of subscopes from the UI, until we properly implement UI changes. 

code/model/branch.py - expand valid_webhook_event_types for bzr repos
code/model/gitrepository.py - expand valid_webhook_event_types for git repos.
services/webhooks/interfaces.py - validate_event_type_parent_subscope to enforce either selecting the parent or one or many subscopes, but not both.
services/webhooks/browser.py:
    - new UIValidWebhookEventTypeVocabulary to hide subscopes from the UI
    - apply this vocabulary class to WebhookEditSchema and Webhook Add
services/webhooks/configure.zcml: registered the new vocabulary class

Tests added in webhooks/tests/test_webservice: verify the parent alone is accepted, one or many subscopes are accepted, mixing parent + subscopes correctly triggers the validator error.


For more details, see:
https://code.launchpad.net/~alvarocs/launchpad/+git/launchpad/+merge/485489
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~alvarocs/launchpad:validate-mp-subscopes into launchpad:master.



References