Commit 8cfb267c authored by 黎博's avatar 黎博

修改获取分支的数量-bug fix

parent 213e89ac
...@@ -160,11 +160,11 @@ const gitBranch = async (svcName) => { ...@@ -160,11 +160,11 @@ const gitBranch = async (svcName) => {
url: `http://${proConfig.git_lab}/api/${version}/projects/${projectId}/repository/branches?private_token=${token}&page=1&per_page=100`, url: `http://${proConfig.git_lab}/api/${version}/projects/${projectId}/repository/branches?private_token=${token}&page=1&per_page=100`,
method: 'GET', method: 'GET',
}) })
branchInfo += await awaitRequest({ var branchInfoPage2 = await awaitRequest({
url: `http://${proConfig.git_lab}/api/${version}/projects/${projectId}/repository/branches?private_token=${token}&page=2&per_page=100`, url: `http://${proConfig.git_lab}/api/${version}/projects/${projectId}/repository/branches?private_token=${token}&page=2&per_page=100`,
method: 'GET', method: 'GET',
}) })
return branchInfo return branchInfo.concat(branchInfoPage2)
} }
const getGitBranch = async function (ctx) { const getGitBranch = async function (ctx) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment