GithubHelp home page GithubHelp logo

markmssd / bitbucket-server-nodejs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sorohan/stash-rest-api

15.0 15.0 13.0 115 KB

A NodeJS library to interact with Bitbucket-Server. Supports Basic Auth and OAuth1.

JavaScript 100.00%
bitbucket bitbucket-server nodejs

bitbucket-server-nodejs's People

Contributors

goodspeedj avatar iiieii avatar markmssd avatar mrngoitall avatar smwa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bitbucket-server-nodejs's Issues

`client.repos.getAll` compounds results of previous calls

The implementation of client.repos.getAll is not idempotent, and compounds responses from the second call onwards.
It seems to keep a global state of all repos read (for recursion purposes), requiring the creation of a new client to nullify state.

The culprit is at https://github.com/markmssd/bitbucket-server-nodejs/blob/master/lib/api/repos.js#L10

The following code demonstrates the issue:

const client = new Client(url, auth);

client.repos.getAll().then(repos => console.log(repos.length)); // prints N
client.repos.getAll().then(repos => console.log(repos.length)); // prints 2N

Can you please comment on this finding? I can submit a quick PR that will add an optional repos array as a second arg of getAll, allowing the recursion to carry its state internally.

Can't connect

Hello, I'm building a simple NodeJS based CLI with some bitbucket features.

I'm trying to connect using basic auth but I'm struggling with the apis url:

var auth = {
"type": "basic",
"username": "username",
"password": "password"
}

var client = await new bitbucket('https://api.bitbucket.orgs/2.0', auth)

client.settings.get('omarfouad')

I'm getting a 'Resource not found' error.
Ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.