Closed st3phhays closed 2 years ago
I think when I ran the first initial PR, I had update: false
, and then I changed it to update: true
later. I can not recall, however, I'm not sure if that matters or not.
Great issue, thanks for sharing all the code! I should be able to have a look at it on Monday
Awesome, I appreciate it!
@gr2m So weird thing, I also had setforceFork: true
, but when I set it back to forceFork: false
, then updating of the commit worked!
I think when I ran the first initial PR, I had
update: false
, and then I changed it toupdate: true
later. I can not recall, however, I'm not sure if that matters or not.
without setting update: true
, an error is thrown if a pull request already exists for the given head branch.
While looking into what the problem might be, I found a bug related to forks, it's fixed via https://github.com/gr2m/octokit-plugin-create-pull-request/pull/108. But it doesn't look like you ran into it.
I was thus far not able to reproduce the problem you ran into. I realize instead of update: true
we should have called it relpace: true
, as that's what the code does. But with your example code, you didn't remove previous entries of the files
map, you only added to it, right?
I'm sorry I'm not sure what else to try. If you find a way to reliably reproduce the problem, I'd be happy to look further into it
I think what I did was first ran it with forceFork: false
, and then later ran it with forceFork: true
and update:true
, and in that case a branch had already been created and it didn't want to update files. Either way.. I'm up and running now. I switched it back to forceFork:false
, and all good now! If I run into this again with a new PR I'll update back with more info.
Thanks for taking a look and the awesome work on octokit.js, very cool all that it can do!
glad it's working now 👍🏼
I am running into an issue where I am unable to add new files or update an existing file in a pull request that I have created with this plugin. To reproduce:
First run the code in the base example on the README (update your TOKEN):
This should create a PR successfully. Next, add a new file to this code. Note how I have added a new
file1-1.txt
file.Running this again does not add the new
file1-1.txt
file. I am also unable to update an existing files content as well if it was added during the first push of the PR.I have tested updating the Title of the PR, and that does seem to work perfectly.
Here is my repo I'm tesitng this out on: https://github.com/craftastack/craftastack/pull/1