Browse Source

Added gittea api operations

production
demo 3 years ago
parent
commit
17afe1f64b
3 changed files with 634 additions and 244 deletions
  1. 2
    1
      cliverse.js
  2. 629
    240
      index.js
  3. 3
    3
      repo-manifest.js

+ 2
- 1
cliverse.js View File

child.stderr.on('data', (chunk) => { child.stderr.on('data', (chunk) => {
if(messages.join('').indexOf('fatal: not a git repository') > -1) opts.haserrors = true; if(messages.join('').indexOf('fatal: not a git repository') > -1) opts.haserrors = true;
messages.push(chunk); messages.push(chunk);
process.stdout.write( chunk )
// process.stdout.write( chunk )
// console.error('stderr e: ' + chunk) // console.error('stderr e: ' + chunk)
}); });
} }
} }


var prompt = function(choices, label, defaultchoice){ var prompt = function(choices, label, defaultchoice){
// prompt accepts either an array or an object as choices.
var choices = choices || []; var choices = choices || [];
return this.prompter.ask( return this.prompter.ask(
`${label} \n` + Object.keys(choices).map(choice => { return ` ${(+choice) + 1}) ${choices[choice]} `}).join('\n') + `\n default ( <= ${ defaultchoice || choices[0]} ) : ` `${label} \n` + Object.keys(choices).map(choice => { return ` ${(+choice) + 1}) ${choices[choice]} `}).join('\n') + `\n default ( <= ${ defaultchoice || choices[0]} ) : `

+ 629
- 240
index.js
File diff suppressed because it is too large
View File


+ 3
- 3
repo-manifest.js View File

// different based on currently available/accessible based on device and client. // different based on currently available/accessible based on device and client.
// We just treat them as different remotes and merge as needed. // We just treat them as different remotes and merge as needed.
// //
, { 'origin' : `${options.reposerver}/${options.repouser}/elxr.git` }
, { 'origin-public' : `https://git.bbh.org.in/${options.repouser}/elxr.git` }
, { 'origin-unc' : `//172.16.0.27/repos/${options.repouser}/elxr.git` }
, { 'origin' : `${options.reposerver}/${options.username}/elxr.git` }
, { 'origin-public' : `https://git.bbh.org.in/${options.username}/elxr.git` }
, { 'origin-unc' : `//172.16.0.27/repos/${options.username}/elxr.git` }
] ]


, 'push-remotes' : [ , 'push-remotes' : [

Loading…
Cancel
Save