MunifTanjim / node-bitbucket

Bitbucket API client for Browser and Node.js
https://bitbucketjs.netlify.app
MIT License
106 stars 28 forks source link

The jar files pushed are corrupted #77

Open juan-carlos-duarte opened 3 years ago

juan-carlos-duarte commented 3 years ago

#####################

diccionary: AnyObject = {};

if (extensionFile === '.jar') { readerStreamer = fs.readFileSync(fullPath); } else { readerStreamer = fs.readFileSync(fullPath, 'utf8');

      }

##########################

async pushCode(bitbucketDTO: BitbucketDTO, diccionary: AnyObject) {

console.log("Posting with diccionary " + diccionary);

return await BitBucketClient(bitbucketDTO.email, bitbucketDTO.password).repositories.createSrcFileCommit({
  repo_slug: bitbucketDTO.name,
  message: "Initial commit",
  author: bitbucketDTO.email,
  branch: "master",
  workspace: bitbucketDTO.workspace,
  _body: diccionary
})

}

image