Getting Pull request details using commit sha

I have all the commit details , how can i get the pull request details corresponding to that commit SHA or commit url?

What exactly are you trying to achieve? In general commits exist independent of PRs, while PRs contain a set of commits to merge (which may change if the PR is updated).

I imagine you’re trying to reproduce the equivalent of:

It’s doable. There are magical APIs for it