def on_commits(self, message=None): wi = Deployer(project_id=self.room) if 'branch' not in message: emit('commits', { 'event': 'error', 'data': { 'message': 'invalid branch' } }, room=self.room) else: try: commits = wi.list_commit(message['branch']) emit('commits', { 'event': 'commits', 'data': commits }, room=self.room) except Exception as e: emit('commits', { 'event': 'error', 'data': { 'message': e.message } }, room=self.room)
def on_commits(self, message): wi = Deployer(task_id=self.room) if 'branch' not in message: emit('commits', {'event': 'error:commits', 'data': {'message': 'invalid branch'}}, room=self.room) else: commits = wi.list_commit(message['branch']) emit('repo', {'event': 'repo:branches', 'data': commits}, room=self.room)
def on_commits(self, message=None): wi = Deployer(project_id=self.room) if 'branch' not in message: emit('commits', {'event': 'error', 'data': {'message': 'invalid branch'}}, room=self.room) else: try: commits = wi.list_commit(message['branch']) emit('commits', {'event': 'commits', 'data': commits}, room=self.room) except Exception as e: emit('commits', {'event': 'error', 'data': {'message': e.message}}, room=self.room)
def commits(self, project_id): """ fetch project list or one item /tag/ :return: """ branch = request.args.get('branch', '') wi = Deployer(project_id=project_id) commits = wi.list_commit(branch) return self.render_json(data={ 'branches': commits, })
def commits(self, project_id): """ fetch project list or one item /tag/ :return: """ current_app.logger.info('args----------------') current_app.logger.info(project_id) current_app.logger.info(request.args) branch = request.args.get('branch', '') wi = Deployer(project_id=project_id) commits = wi.list_commit(branch) return self.render_json(data={ 'commits': commits, })