Skip to content
This repository has been archived by the owner on Oct 31, 2019. It is now read-only.

Updated bz. #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Updated bz. #25

wants to merge 1 commit into from

Conversation

hemanth
Copy link
Contributor

@hemanth hemanth commented Aug 23, 2014

Fixes #21

/cc @debloper @MrDHat

If possible please do provide the API, so I can test it once.

@MrDHat
Copy link
Contributor

MrDHat commented Aug 23, 2014

@hemanth emailed you the api key. Thank you for the patch 😄

@hemanth
Copy link
Contributor Author

hemanth commented Aug 23, 2014

@MrDHat Kool!

@debloper
Copy link
Member

Thanks for the patch @hemanth

+@sankha93 to verify if it's safe to remove the BZ hack (whether the methods have been added upstream, or is a part of bz-api itself), also the necessity of ./bz explicitly over bz.

@hemanth
Copy link
Contributor Author

hemanth commented Aug 23, 2014

@debloper Strangely the latest bzapi gives a 404 but this works and on installing the latest bz and doing a require('bz') would result in:

bzClient.countBugs({
             ^
TypeError: Object #<Object> has no method 'countBugs'
    at createUser (/home/ubuntu/leaderchalk/index.js:63:14)
    at /home/ubuntu/leaderchalk/index.js:37:44
    at fs.js:271:14
    at Object.oncomplete (fs.js:107:15)

But the bz API states countBugs

@debloper
Copy link
Member

Yes, that's exactly why:

// copy our copy of bz.js
var execResult = execSync.exec('cp bz.js node_modules/bz/');
if (execResult.code != 0) {
  // Command failed
  console.log(execResult.stderr);
  process.exit(1);
}

part was necessary.

@hemanth
Copy link
Contributor Author

hemanth commented Aug 23, 2014

@debloper I don't get the point of copying it to node_modules when we can require it with a ./ ...
But here we are trying to use the published module, rather than the local bz.js.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to the Bugzilla REST API
3 participants