import { Post , Prefix , Get } from "egg-shell-decorators" ; import BaseController from "./base" ; @ Prefix ( "branch" ) export default class BranchController extends BaseController { author : Cookie
     *  description @ Post ( "/create" ) public async createBranch ( { request : { body : { params } , } , } ) { const { ctx } = this ; const { access_token } = this . user ; const { name : userName } = this . user ; const { projectSourceId , ref , branch } = params ; const newBranch = await ctx . service . branch . createBranch ( { access_token , projectSourceId , ref , branch , userName , } ) ; this . success ( newBranch ) ; } author : Cookie
     *  description @ Get ( "/getList" ) public async getBranchList ( { request : { query } } ) { const { ctx , user } = this ; const { access_token } = user ; const { projectId } = query ; const { projectSourceId } = await ctx . service . project . getProject ( { projectId , access_token } ) ; const branchList = await ctx . service . branch . getBranchList ( { projectId , access_token , projectSourceId : projectSourceId , } ) ; this . success ( branchList ) ; } }