Parser for parsing information from github config file
npm install @gh-conf/gh-conf-parse
const { ParseConfig, UserRepo } = require('@gh-conf/gh-conf-parse');
const CurrConfig = ParseConfig();
// Output
// {
// core:{
// repositoryformatversion:'0',
// filemode:'true',
// bare:'false',
// logallrefupdates:'true',
// ignorecase:'true',
// precomposeunicode:'true'
// },
// 'remote "origin"':{
// url:'https://github.com/gh-conf/gh-conf-parse.git',
// fetch:'+refs/heads/*:refs/remotes/origin/*'
// },
// 'branch "master"':{
// remote:'origin',
// merge:'refs/heads/master'
// }
// }
const userRepo = UserRepo();
// Output
// {
// repository:'gh-conf-parse',
// username:'gh-conf'
// }
- Returns complete git config as JSON
- Returns repo owner name and repository name
Interested in contributing to this project? You can log any issues or suggestion related to this library here.
Read our contributing guide to get started with contributing to the codebase.
Thank you to all the contributors who have helped us in making this project better 🙌