Open spenserblack opened 2 years ago
These states can actually be combined. E.g. closed and unmerged PRs.
@spenserblack I believe that GitHub uses the merged_at attribute in order to separate 'closed' and 'merged'. The state for the pr itself is always 'closed'. Therefore the valid states that are also collected in IssueState are ['closed', 'active'].
Perhaps I'm wrong in requesting these as "states", but I believe that it is useful to be able to get a list of PRs by their merged/unmerged status. This concept exists for the PullRequestHandler
, but I believe that, if possible, the ListPullRequestHandler
should be able to filter to status merged/unmerged, and not just state open/closed.
It should be noted that the official GitHub CLI tool does refer to "merged" as a state
Pull requests have more states than
Open
andClosed
. A closed PR is any PR that isn't open, regardless of whether or not it was merged. Not all closed PRs are merged.The
merged
state is supported by the GitHub CLI'sgh pr list
, for example.The
unmerged
state includes open PRs, closed PRs that weren't merged, and drafts.Example
octocrab
's closed PR countoctocrab
's merged PR countoctocrab
's unmerged PR count