Пример #1
0
    def setUp(self):
        print('setUp')
        self.state_handler = TestGitFlowHelper.init_repo(INIT_VERSION)

        self.git: GitCmd = GitCmd(state_handler=self.state_handler)
        self.git_flow: GitFlowCmd = GitFlowCmd(
            state_handler=self.state_handler)
Пример #2
0
    def setUp(self):
        # self.state_handler = TestGitFlowHelper.init_repo(INIT_VERSION)
        # # self.state_handler: StateHandler = StateHandler(TestGitFlowHelper.DIR_PATH_TEST).load_file_config()
        self.state_handler: StateHandler = StateHandler(Path('/tmp/test'))

        self.git: GitCmd = GitCmd(state_handler=self.state_handler)
        self.git_flow: GitFlowCmd = GitFlowCmd(
            state_handler=self.state_handler)
Пример #3
0
 def __init__(self, state_handler: StateHandler,
              config_handler: ConfigHandler, issue: Optional[Type[Issue]],
              topics: Optional[List[Topic]]):
     self.__state_handler: StateHandler = state_handler
     self.__config_handler: ConfigHandler = config_handler
     self.__issue: Optional[Type[Issue]] = issue
     self.__topics: Optional[List[Topic]] = topics
     self.__git: GitCmd = GitCmd(
         self.__state_handler).with_config_handler(config_handler)
     self.__gitflow: GitFlowCmd = GitFlowCmd(self.__state_handler,
                                             config_handler)
Пример #4
0
 def __init__(self, state_handler: StateHandler,
              config_handler: ConfigHandler, issue: Optional[Type[Issue]],
              topics: Optional[List[Topic]], keep_branch: bool,
              close_issue: bool):
     self.__state_handler: StateHandler = state_handler
     self.__config_handler: ConfigHandler = config_handler
     self.__issue: Optional[Type[Issue]] = issue
     self.__topics: Optional[List[Topic]] = topics
     self.__git: GitCmd = GitCmd(self.__state_handler).with_config_handler(
         config_handler=config_handler)
     self.__gitflow: GitFlowCmd = GitFlowCmd(self.__state_handler,
                                             config_handler)
     self.__keep_branch: bool = keep_branch
     self.__close_issue: bool = close_issue
     self.__current_branch_name: str = self.__git.get_current_branch_name()
Пример #5
0
 def __init__(self, state_handler: StateHandler,
              config_handler: ConfigHandler, issue: Optional[Type[Issue]],
              topics: Optional[List[Topic]], keep_branch: bool,
              close_issue: bool):
     self.__state_handler: StateHandler = state_handler
     self.__config_handler: ConfigHandler = config_handler
     self.__issue: Optional[Type[Issue]] = issue
     self.__topics: Optional[List[Topic]] = topics
     self.__git: GitCmd = GitCmd(self.__state_handler)
     self.__gitflow: GitFlowCmd = GitFlowCmd(self.__state_handler,
                                             config_handler)
     self.__keep_branch: bool = keep_branch
     self.__close_issue: bool = close_issue
     self.__name: str = self.__git.get_branch_name_from_git(
         config_handler.release())
     self.__version_check: str = self.__state_handler.version_as_str()
Пример #6
0
    def setUp(self):
        # TestGitFlowHelper.clean_workdir()
        # TestGitFlowHelper.init_repo(INIT_VERSION)
        # GitCmd(state_handler=StateHandler(TestGitFlowHelper.DIR_PATH_TEST)).delete_branch_from_name(
        #     'hotfix/0.0.1-dev',
        #     remote=True
        # ).delete_tag('0.0.1', remote=True)

        # TestGitFlowHelper.clean_remote_repo()
        # TestGitFlowHelper.clean_workdir()

        self.state_handler = TestGitFlowHelper.init_repo(INIT_VERSION)

        self.git: GitCmd = GitCmd(state_handler=self.state_handler)
        self.git_flow: GitFlowCmd = GitFlowCmd(
            state_handler=self.state_handler)
Пример #7
0
 def __init_gitflow(self) -> Init:
     GitFlowCmd(self.__state_handler, self.__config_handler).init_config()
     return self