I want to fetch, using git, the list of Pull Requests in a repository hosted in Azure DevOps.
Github has the support.
We can just add this to .git/config
:
[remote "origin"]
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
But when I tried the same method for Azure DevOps, it didn't fetch anything. I also tried git-pr
from the git-extras
package.
I am guessing if they have the support, the path might be different from refs/remotes/origin/pr/
.They have a REST API endpoint to fetch pull requests, but I couldn't find anything about doing the same using git.
git ls-remote <remote or url>
– Hoarhoundgit ls-remote
is the solution for any remote. – Civilian