Browse Source

Merge "model: remove unused job's BranchMatcher procedures"

tags/3.6.0
Zuul 5 months ago
parent
commit
b4e6247ab5
1 changed files with 0 additions and 23 deletions
  1. 0
    23
      zuul/model.py

+ 0
- 23
zuul/model.py View File

@@ -1316,29 +1316,6 @@ class Job(ConfigObject):
1316 1316
             matchers.append(change_matcher.FileMatcher(fn))
1317 1317
         self.irrelevant_file_matcher = change_matcher.MatchAllFiles(matchers)
1318 1318
 
1319
-    def getSimpleBranchMatcher(self):
1320
-        # If the job has a simple branch matcher, return it; otherwise None.
1321
-        if not self.branch_matcher:
1322
-            return None
1323
-        m = self.branch_matcher
1324
-        if not isinstance(m, change_matcher.AbstractMatcherCollection):
1325
-            return None
1326
-        if len(m.matchers) != 1:
1327
-            return None
1328
-        m = m.matchers[0]
1329
-        if not isinstance(m, change_matcher.BranchMatcher):
1330
-            return None
1331
-        return m
1332
-
1333
-    def addImpliedBranchMatcher(self, branch):
1334
-        # Add a branch matcher that combines as a boolean *and* with
1335
-        # existing branch matchers, if any.
1336
-        self._implied_branch = branch
1337
-        matchers = [change_matcher.ImpliedBranchMatcher(branch)]
1338
-        if self.branch_matcher:
1339
-            matchers.append(self.branch_matcher)
1340
-        self.branch_matcher = change_matcher.MatchAll(matchers)
1341
-
1342 1319
     def updateVariables(self, other_vars, other_extra_vars, other_host_vars,
1343 1320
                         other_group_vars):
1344 1321
         if other_vars is not None:

Loading…
Cancel
Save