2

I'm using Python's PyGithub library and want to get a list of closed prs in order from the ones most recent closed to the oldest ones closed. However, the PyGithub documentation doesn't show what options I have available for the parameters (specifically the variables available for "sorted"). How might I go about doing this? Would it be sorted=newest or something like that?

2 Answers2

1

This reply should answer it for ya: https://github.com/PyGithub/PyGithub/issues/2233#issuecomment-1130520989

Based on the GitHub docs you can use sort="created" sort="updated" etc

Can be one of: created, updated, popularity, long-running
Leslie Alldridge
  • 1,427
  • 1
  • 10
  • 26
0
get_pulls(state=NotSet, sort=NotSet, direction=NotSet, base=NotSet, head=NotSet)

Calls: GET /repos/{owner}/{repo}/pulls

Parameters: 
state – string
sort – string
direction – string
base – string
head – string

Return type:
github.PaginatedList.PaginatedList of github.PullRequest.PullRequest

joydeba
  • 778
  • 1
  • 9
  • 24