asuha
v2.0.0
Published
Asuha: the Webhook server for online git hosting services.
Downloads
26
Maintainers
Readme
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('[email protected]: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.