Skip to content

Q module with Node-github #205

@ThiagoMiranda

Description

@ThiagoMiranda

Hi. Thanks for the great module. It's covering basically all my needs here but one.
I have to list a list of issues by ids ( like 567, 555, 523 ) and it seems that I can't do this filter so I was thinking in use the Q module to make N requests ( N as how many issues ) and them returning it as an array to the response. But it seems that you don't work with promises so this is not working:

var issuesArray = [567, 565]; 
var promiseArray = [];
for(var i = issuesArray.length; i--;) {
    promiseArray.push(getIssues(github, obj, issuesArray[i]));
}

Q.all(promiseArray).then(function(issues){
    console.info(issues)
}).done();

function getIssues(github, obj, issueid) {
    return github.issues.getRepoIssue({
        user: obj.issue.user,
        repo: obj.issue.repo,
        number: issueid
    });    
}

Does anyone did something like this? Or do you have an endpoint that I can filter by IssueId?

Thanks for the attention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions