示例#1
0
 def get(self, request, *args, **kwargs):
     repo = self.get_object()
     commit = self.request.query_params.get('commit', None)
     archived_path, archive_name = archive_repo(repo_git=repo.git,
                                                repo_name=self.project.name,
                                                commit=commit)
     return self.redirect(path='{}/{}'.format(archived_path, archive_name))
示例#2
0
 def get(self, request, *args, **kwargs):
     repo = self.get_object()
     archived_path, archive_name = archive_repo(repo.git, repo.project.name)
     return self.redirect(path='{}/{}'.format(archived_path, archive_name))