Are there any Azure CLI commands that will return information about PR branches that have commits not merged into target branch. I am working through some automation and need to determine if there are any commits on a PR branch that have not been committed to the target branch.
In azure devops (ADO) when you start to create a PR, it will show you the number of files and commits like the image below. I am trying to determine if there are files or commits like the image below shows 1.
I tried these but could not see anything related in the return
azure repos pr show
Azure repos pr create
Thanks in advance.

As of now, there seemed to be no Azure CLI command for Azure DevOps pull request to compare and list the changed files/commits from source branch pending merged to target branch.
However, you may use git diff command to check the modified files between branches. Here is a simple sample for your reference.
And we can use
git logto list the new commits.See more discussions and samples based on different usage scenarios in the threads below.
diff - How to get a list of different commits between two git branches? - Stack Overflow
git - How do I see the differences between two branches? - Stack Overflow
By the way, we can use this API to get git diff between branches. In my case, I created a PR to merge BranchB to BranchA.
Then I called the sample API and got the response like below.
Hope the information would help.