def _get_last_tag(self):
        """ Gets the last release tag before self.current_tag """

        current_version = LooseVersion(
            self._get_version_from_tag(self.release_notes_generator.current_tag)
        )

        versions = []
        for tag in self.repo.tags():
            if not tag.name.startswith(self.github_info["prefix_prod"]):
                continue
            version = LooseVersion(self._get_version_from_tag(tag.name))
            if version >= current_version:
                continue
            versions.append(version)
        if versions:
            versions.sort()
            return "{}{}".format(self.github_info["prefix_prod"], versions[-1])
def _get_last_tag ( self ) : current_version = LooseVersion ( self . _get_version_from_tag ( self . release_notes_generator . current_tag ) ) versions = [ ] for tag in self . repo . tags ( ) : if not tag . name . startswith ( self . github_info [ "prefix_prod" ] ) : continue version = LooseVersion ( self . _get_version_from_tag ( tag . name ) ) if version >= current_version : continue versions . append ( version ) if versions : versions . sort ( ) return "{}{}" . format ( self . github_info [ "prefix_prod" ] , versions [ - 1 ] )
Gets the last release tag before self.current_tag