Identifying PRs that were rebased against master

Hi, I am interested in getting a list of all PRs that were rebased against master at some point, and when that happened in the history of the PR. From https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request, what would indicate a rebase? And, in the event of a force-push, what happens to the list of commits in this response? Is it totally overwritten?

My actual use case is that the “Dismiss stale pull request approvals when new commits are pushed” is a bit too heavy-handed for us (ideally it would be "dismiss stale pull request approvals when new commits are pushed that does not represent a rebase against master). But, in lieu of having that more nuanced setting, I instead would like to do some periodic review of these PRs, which requires getting a list of those PRs.

Hi @rgangopadhya,

Thanks for being here! A force push is a destructive operation that rewrites the commit history of a git repository. You can identify force pushes by looking for "non_fast_forward":true in push logs. Push logs are only available on self-hosted GitHub Enterprise Server appliances.