How to use the zuul.model function in zuul

To help you get started, we’ve selected a few zuul examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wikimedia / integration-config / tests / test_zuul_scheduler.py View on Github external
def change_with_files(files):
            change = zuul.model.Change('mediawiki/ruby/api')
            change.branch = 'master'
            change.files.extend(files)
            return change
github wikimedia / integration-config / tests / test_zuul_scheduler.py View on Github external
def test_l10nbot_patchets_are_ignored(self):
        test_manager = self.getPipeline('test').manager
        change = zuul.model.Change('mediawiki/core')
        change.branch = 'master'

        l10n_event = zuul.model.TriggerEvent()
        l10n_event.type = 'patchset-created'
        l10n_event.account = {'email': 'l10n-bot@translatewiki.net'}
        l10n_event.branch = change.branch

        self.assertFalse(test_manager.eventMatches(l10n_event, change),
                         'l10-bot should not enter %s pipeline' %
                         test_manager.pipeline.name)
github wikimedia / integration-config / tests / test_zuul_scheduler.py View on Github external
def test_recheck_with_verified_vote_minus_one(self):
        test_manager = self.getPipeline('test').manager

        change = zuul.model.Change('mediawiki/core')
        change.branch = 'master'

        event = zuul.model.TriggerEvent()
        event.type = 'comment-added'
        event.comment = 'Patch Set 1: Verified-1\n\nrecheck'
        event.account = {'email': 'jdoe@wikimedia.org'}
        event.branch = change.branch

        self.assertFalse(test_manager.eventMatches(event, change))