github-tools / github-tools/github

listPullRequests({ state: 'all' }) does not return all pull requests.

Open
#593 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.8k
Forks
809
PR merge metrics
No merged PRs in 30d

Description

# Reproduction

```js
const assert = require('assert')
const Github = require('github-api')

const github = new Github()

;(async () => {
const repo = github.getRepo('vuejs', 'rfcs')

const all = (await repo.listPullRequests({ state: 'all' })).data.length
const open = (await repo.listPullRequests({ state: 'open' })).data.length
const closed = (await repo.listPullRequests({ state: 'closed' })).data.length

assert.equal(all, open + closed)
})()
```

# See

https://github.com/vuejs/rfcs/pulls

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the listPullRequests entry point and reproduce the issue using the JavaScript example against vuejs/rfcs. Compare the counts returned for state values all, open, and closed, then trace how the all-state result is obtained. Done means the all result matches the combined open and closed results for this reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.