gabrielcsapo / node-git-server

🎡 A configurable git server written in Node.js
https://gabrielcsapo.github.io/node-git-server
MIT License
253 stars 73 forks source link

Is it possible to get the pushed files? #79

Open jrichardsz opened 3 years ago

jrichardsz commented 3 years ago

After push.accept(), how can I get the received files?

I'm in a proof of concept to use node-git-server as a devops platform. My goal is:

repos.on('push', (push) => {
    console.log(`push ${push.repo}/${push.commit} (${push.branch})`);
    push.accept();
    //exec some task or commands over the received files
});

Is it possible?

Thanks in advance.

adhvaithprasad commented 2 years ago

Consider cloning the repository in the frontend ( or backend ) via isomorphic git ( a js package ) . You can then list the files read the content etc .