jleach
jleach

Reputation: 7800

Get Pull Request from Git (not github)

I'm trying to automate retrieval of Pull Requests from git itself (not from a git client like GitHub or Bitbucket).

I can't seem to find where the PR lives within git. Is this a client-only feature, or can I get this from git itself?

(I have some reporting that gives me all open branches by setting up local folders for projects and doing a prune, fetch and branch output to file, where I can then read and integrate open branches into my reporting. I'd like to do the same with PRs without having to use a client API)

Upvotes: 0

Views: 98

Answers (1)

D. Ben Knoble
D. Ben Knoble

Reputation: 4703

Git has no concept of a pull request (as in the GitHub model—this is because Git =/= GitHub). The original request-pull command (IIRC) generated and sent emails to maintainers, requesting they pull from wherever your remote was located (any server with git they could access over, eg, https).

For GitHub specifically, there are ways to map the PRs on to local branches, or you can use a hub like tool, or the API. But if you are interacting with a git hosting provider, you’ll need to interact with their model.

Upvotes: 2

Related Questions