def run(self, state):
     # FIXME: For now we disable this check when a user is driving the script
     # this check is too draconian (and too poorly tested) to foist upon users.
     if not self._options.non_interactive:
         return
     for changelog_path in self.cached_lookup(state, "changelogs"):
         changelog_entry = ChangeLog(changelog_path).latest_entry()
         if self._has_valid_reviewer(changelog_entry):
             continue
         reviewer_text = changelog_entry.reviewer_text()
         if reviewer_text:
             log("%s found in %s does not appear to be a valid reviewer according to committers.py." % (reviewer_text, changelog_path))
         error('%s neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).' % changelog_path)
 def run(self, state):
     # FIXME: For now we disable this check when a user is driving the script
     # this check is too draconian (and too poorly tested) to foist upon users.
     if not self._options.non_interactive:
         return
     for changelog_path in self.cached_lookup(state, "changelogs"):
         changelog_entry = ChangeLog(changelog_path).latest_entry()
         if self._has_valid_reviewer(changelog_entry):
             continue
         reviewer_text = changelog_entry.reviewer_text()
         if reviewer_text:
             log("%s found in %s does not appear to be a valid reviewer according to committers.py."
                 % (reviewer_text, changelog_path))
         error(
             '%s neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).'
             % changelog_path)
示例#3
0
 def run(self, state):
     # FIXME: For now we disable this check when a user is driving the script
     # this check is too draconian (and too poorly tested) to foist upon users.
     if not self._options.non_interactive:
         return
     # FIXME: We should figure out how to handle the current working
     #        directory issue more globally.
     os.chdir(self._tool.scm().checkout_root)
     for changelog_path in self._tool.checkout().modified_changelogs(self._options.git_commit, self._options.squash):
         changelog_entry = ChangeLog(changelog_path).latest_entry()
         if self._has_valid_reviewer(changelog_entry):
             continue
         reviewer_text = changelog_entry.reviewer_text()
         if reviewer_text:
             log("%s found in %s does not appear to be a valid reviewer according to committers.py." % (reviewer_text, changelog_path))
         error('%s neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).' % changelog_path)
 def run(self, state):
     # FIXME: For now we disable this check when a user is driving the script
     # this check is too draconian (and too poorly tested) to foist upon users.
     if not self._options.non_interactive:
         return
     # FIXME: We should figure out how to handle the current working
     #        directory issue more globally.
     os.chdir(self._tool.scm().checkout_root)
     for changelog_path in self._tool.checkout().modified_changelogs(
             self._options.git_commit, self._options.squash):
         changelog_entry = ChangeLog(changelog_path).latest_entry()
         if self._has_valid_reviewer(changelog_entry):
             continue
         reviewer_text = changelog_entry.reviewer_text()
         if reviewer_text:
             log("%s found in %s does not appear to be a valid reviewer according to committers.py."
                 % (reviewer_text, changelog_path))
         error(
             '%s neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).'
             % changelog_path)