How to update a fork from it using the Github API

I created a github repository fork through the github API. Now, later, I want to pull any updates from the source repository into the plug. This should always be fast forward in my use case. I read access to the source repository and read-write to the fork.

I thought I might create a Pull request and then accept (both of which you can do through the API), but it makes noise (Pull Requests created and destroyed) and just doesn't seem right.

Is there any way to do this through the API?

+4
source share
2 answers

I do not have an internal scoop, so this may be a skip function, which will be deleted at some point. Until:

Github ( ) ; , API-, -, ( repos/commits/compare ).

, API:

  • Git data api: , , , .

    • refstream /repos/upstream/repo/git/refs/heads/master
    • PATCH /repos/my/repo/git/refs/heads/master .
  • merge api: , .

    • ,
    • master .
  • api: , PR.

    • PR: POST /repos/your/repo/pulls head = "upstream:master"
    • PR- ,
    • : PUT to /repos/your/repo/pulls/number/merge

, "upstream: master" 1 2, API.

+9

, API.:)

+2

All Articles