gr2m / octokit-plugin-create-pull-request

Octokit plugin to create a pull request with multiple file changes
MIT License
104 stars 28 forks source link

Binary files fail on forked repositories #81

Open pelikhan opened 2 years ago

pelikhan commented 2 years ago

When trying to create a commit with a binary file (e.g. image), this request fails with a 404 on a forked scenario (user does not have rights to push to repo).

https://github.com/gr2m/octokit-plugin-create-pull-request/blob/682ea7b47c16ce2b13bc07b09d201ea30381770b/src/value-to-tree-object.ts#L30

Is it the case that it should be owner: fork instead of owner ?

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 3.10.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

pelikhan commented 2 years ago

Looks like my fix was half busted so probably reopen this @gr2m

gr2m commented 2 years ago

Are you working on a follow up pull request?

pelikhan commented 2 years ago

I wonder if this should not be state.fork as well

https://github.com/gr2m/octokit-plugin-create-pull-request/blob/6ccbf00a9092fbaaf666cd0185764faa3e8738ae/src/compose-create-pull-request.ts#L84

pelikhan commented 2 years ago

https://github.com/gr2m/octokit-plugin-create-pull-request/pull/86/files