2.0.0 • Published 6 years ago
asuha v2.0.0
Asuha
Asuha: the Webhook server for online git hosting services.
WIP
Currently only support for Bitbucket. There are other great packages for Github (e.g. probot) that you can have a try ;)
Base Concepts
- Asuha is designed as a module to report remote Git events through EventEmitter API.
Installation
npm install asuha
Example
const Asuha = require('asuha')
const asuha = Asuha.http()
.addRepo('git@bitbucket.org:user/repo.git')
.on('remote', (host, fullname, event, commits) => {
// on repo:push
})
.listen(function () {
const { address, port } = asuha.server().address()
console.log('Asuha is listening on %s:%d', address, port)
})
Then set the repository's webhook to where the Asuha server is listening on and make a Git push to the remote repository to test the server.