mirror of
https://github.com/all-contributors/cli.git
synced 2025-01-10 05:56:29 +00:00
refactor: clean-up
This commit is contained in:
parent
b0e1213723
commit
fb14296e24
2 changed files with 0 additions and 21 deletions
20
src/cli.js
20
src/cli.js
|
@ -94,24 +94,6 @@ function startGeneration(argv) {
|
||||||
async function addContribution(argv) {
|
async function addContribution(argv) {
|
||||||
util.configFile.readConfig(argv.config) // ensure the config file exists
|
util.configFile.readConfig(argv.config) // ensure the config file exists
|
||||||
const username = argv._[1] === undefined ? undefined : String(argv._[1])
|
const username = argv._[1] === undefined ? undefined : String(argv._[1])
|
||||||
/* Example: (for clarity & debugging purposes)
|
|
||||||
{
|
|
||||||
_: [ 'add' ],
|
|
||||||
projectName: 'cz-cli',
|
|
||||||
projectOwner: 'commitizen',
|
|
||||||
repoType: 'github',
|
|
||||||
repoHost: 'https://github.com',
|
|
||||||
files: [ 'AC.md' ],
|
|
||||||
imageSize: 100,
|
|
||||||
commit: false,
|
|
||||||
commitConvention: 'angular',
|
|
||||||
contributors: [],
|
|
||||||
contributorsPerLine: 7,
|
|
||||||
'contributors-per-line': 7,
|
|
||||||
config: '/mnt/c/Users/max/Projects/cz-cli/.all-contributorsrc',
|
|
||||||
'$0': '../all-contributors-cli/src/cli.js'
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
const contributions = argv._[2]
|
const contributions = argv._[2]
|
||||||
|
|
||||||
// Add or update contributor in the config file
|
// Add or update contributor in the config file
|
||||||
|
@ -124,7 +106,6 @@ async function addContribution(argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
argv.contributors = data.contributors
|
argv.contributors = data.contributors
|
||||||
|
|
||||||
/* Example
|
/* Example
|
||||||
[ { login: 'Berkmann18',
|
[ { login: 'Berkmann18',
|
||||||
name: 'Maximilian Berkmann',
|
name: 'Maximilian Berkmann',
|
||||||
|
@ -291,7 +272,6 @@ async function fetchContributors(argv) {
|
||||||
contributorsToAdd.push({login: usr.login, contributions: ['code']})
|
contributorsToAdd.push({login: usr.login, contributions: ['code']})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: Roll onto other contribution categories following https://www.draw.io/#G1uL9saIuZl3rj8sOo9xsLOPByAe28qhwa
|
// TODO: Roll onto other contribution categories following https://www.draw.io/#G1uL9saIuZl3rj8sOo9xsLOPByAe28qhwa
|
||||||
|
|
||||||
info('Finalising')
|
info('Finalising')
|
||||||
|
|
|
@ -18,7 +18,6 @@ const getContributors = async function (owner, name, cacheResult = false) {
|
||||||
commits: true,
|
commits: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log('info provided:', options);
|
|
||||||
if (cacheResult) {
|
if (cacheResult) {
|
||||||
const nycOutputPath = join(__dirname, './nyc-output.json')
|
const nycOutputPath = join(__dirname, './nyc-output.json')
|
||||||
if (existsSync(nycOutputPath)) {
|
if (existsSync(nycOutputPath)) {
|
||||||
|
|
Loading…
Reference in a new issue