1

Is there a way to send commits vía API to a pull request made from a not own forked repo.

I can send commits to my own repo.

Sometimes i want to make some changes on a pull request made for other person and the only thing i think is send commits in its forked repo. But the API throws me "Not Found".

Here is the code in curl

curl.exe -i -X PUT -H "Authorization: token TOKEN" -d "{\"message\":\"update\", \"content\": \"SG9sYSBtdW5kaWxsbwo=\",  \"branch\" : \"BRANCH\",  \"sha\" : \"SHA\"}" "https://api.github.com/repos/otherPerson/MyRepo/contents/File"

EDIT: I can push commits to the forked repo vía Github front-end , on the web.

Thanks in advance!

lsalvatore
  • 101
  • 1
  • 11

1 Answers1

1

But the API throws me "Not Found".

This means you are not a collaborator on that repo, which implies you cannot directly push commits.

Since you cannot fork a fork, you could create a patch, publish it as a workaround to a gist, and leave a comment to the fork PR in progress to apply that patch.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Hi VonC, the strangest thing is that i can send commits vía Github front-end directly to the forked repository. At least to the head branch – lsalvatore Apr 30 '19 at 10:05
  • @lsalvatore That is strange: maybe GitHub support would have more on this: https://github.com/contact – VonC Apr 30 '19 at 10:45