fix repo ref

Signed-off-by: dzdidi <deniszalessky@gmail.com>
This commit is contained in:
dzdidi
2024-01-24 11:21:01 +00:00
parent efcb302dfb
commit 242f84b23d

View File

@@ -48,7 +48,7 @@ module.exports = class RPC {
const { url, repo, key, branch } = this.parsePushCommand(req) const { url, repo, key, branch } = this.parsePushCommand(req)
// TODO: check ACL // TODO: check ACL
// collect stdout to buffer and return it // collect stdout to buffer and return it
const process = spawn('git', ['fetch', url, `${branch}:${branch}`], { env: { GIT_DIR: home.getCodePath(name) } }) const process = spawn('git', ['fetch', url, `${branch}:${branch}`], { env: { GIT_DIR: home.getCodePath(repo) } })
const outBuffer = new Buffer() const outBuffer = new Buffer()
const errBuffer = new Buffer() const errBuffer = new Buffer()
process.stdout.on('data', data => { process.stdout.on('data', data => {
@@ -70,7 +70,7 @@ module.exports = class RPC {
// TODO: // TODO:
// check ACL // check ACL
// collect stdout to buffer and return it // collect stdout to buffer and return it
// const process = spawn('git', ['reset', '--hard', url, branch], { env: { GIT_DIR: home.getCodePath(name) } }) // const process = spawn('git', ['reset', '--hard', url, branch], { env: { GIT_DIR: home.getCodePath(repo) } })
console.error('req', req.toString()) console.error('req', req.toString())
console.error('forcePushHandler not implemented') console.error('forcePushHandler not implemented')
} }
@@ -80,7 +80,7 @@ module.exports = class RPC {
// TODO: // TODO:
// check ACL // check ACL
// collect stdout to buffer and return it // collect stdout to buffer and return it
// const process = spawn('git', ['branch', '-d', branch], { env: { GIT_DIR: home.getCodePath(name) } }) // const process = spawn('git', ['branch', '-d', branch], { env: { GIT_DIR: home.getCodePath(repo) } })
console.error('req', req.toString()) console.error('req', req.toString())
console.error('deleteBranchHandler not implemented') console.error('deleteBranchHandler not implemented')
} }