Ejemplo n.º 1
0
    def does_issue_exist(self, id: str):
        gm = GitManager()

        is_loaded = gm.is_inside_branch()
        if not is_loaded:
            gm.load_issue_branch()

        exists = _generate_issue_file_path(id).exists()

        if not is_loaded:
            gm.unload_issue_branch()

        return exists
Ejemplo n.º 2
0
    def get_issue_from_issue_id(self, id):
        gm = GitManager()
        is_loaded = gm.is_inside_branch()

        if not is_loaded:
            gm.load_issue_branch()

        try:
            file = JsonConvert.FromFile(_generate_issue_file_path(id))
        except FileNotFoundError:
            return None

        if not is_loaded:
            gm.unload_issue_branch()

        return file