cz-conventional-changelog-befe
Version:
cz adaptor for baidu BEFE
20 lines (17 loc) • 395 B
JavaScript
/**
* @file gitRemoteUrl
* @author Cuttle Cong
* @date 2018/10/25
*
*/
const gitconfig = require('gitconfiglocal')
const pify = require('pify')
module.exports = (dir, { remoteName = 'origin' } = {}) => {
return pify(gitconfig)(dir || process.cwd()).then(config => {
return (
config.remote &&
config.remote[remoteName] &&
config.remote[remoteName].url
)
})
}