Exemplo n.º 1
0
    def check_pre_conditions_for_main_repo(self) -> None:
        repo = Repo(self.details.locations.main_project_dir)
        assert_step(not repo.bare)
        GitUtilities.check_branch_name(repo, 'master')
        GitUtilities.check_no_uncommitted_changes(repo)

        # From https://stackoverflow.com/questions/15849640/how-to-get-count-of-unpublished-commit-with-gitpython
        assert_step(len(
            list(repo.iter_commits('master@{u}..master'))) == 0,
                    f"there are un-pushed changes in {self.details.project_details.github_project_name}")
Exemplo n.º 2
0
 def check_pre_conditions_for_starter_project_repo(self) -> None:
     repo = Repo(self.details.locations.starter_project_dir)
     assert_step(not repo.bare)
     GitUtilities.check_branch_name(repo, 'master')