Skip to content

Filter and sort users based on PRs and Issues

Varun Khalate edited this page Apr 11, 2023 · 1 revision

Url structure

  • The url will contain a single query parameter query containing these 4 values
    • filterBy (mandatory)
    • sortBy (optional)
    • startDate (optional)
    • endDate (optional)

Possible values of parameters

filterBy

can contain only a single value

  • OPEN_PRS
  • MERGED_PRS
  • OPEN_ISSUES
  • CLOSED_ISSUES

sortBy

can contain only a single value

  • RECENT_FIRST
  • OLD_FIRST

startDate

If only start date is passed than it will fetch results from start date

  • yyyy-MM-dd

endDate

If only end date is passed then it will fetch results until endDate

  • yyyy-MM-dd

If both start date and end date are passed then it will fetch results within the range

Example

// To fetch list of user who's PRs are merged
/users?query=filterBy:MERGED_PRS

// To fetch list of user who's PRs are open and sort by recent to old
/users?query=filterBy:OPEN_PRS+sortBy:RECENT_FIRST

// To fetch list of users who's issues are closed since 22nd March '23, sorted by recent first
/users?query=filterBy:CLOSED_ISSUES+sortBy:RECENT_FIRST+startDate:22-03-2022