Open DanielVandH opened 1 year ago
Thank you for pointing this out, Daniel! Sorry for the annoyance. I do think it'd be a good idea for the tool to detect if the fix-typos
branch already exists on the remote repo and pick a different name in this situation. I can't promise I'll put up a fix for this soon, though, to be honest.
No worries at all. Would you accept a PR giving a warning about this? e.g. I wrote about this tool here for using it for some Julia packages, and I gave this warning:
WARNING: After you use this tool once for a repository, if you try and use it again for the same repository it will error at the end due to this issue, and you will lose all the changes you have made with no way to recover them. To allow yourself to use the tool again for the same repository, you need to go to ~/.github-spellcheck/UserName/ and delete the folder corresponding to the package. For example, after running the examples below, I then manually delete the folder C:\Users\User.github-spellcheck\DanielVandH\NaturalNeighbours.jl. You also want to delete the branch corresponding to the created pull request (as the GitHub pull request will prompt you to do after the pull request has been merged).
Maybe a more concise version of this warning somewhere in this repo could be appropriate.
Sure, I would accept such a PR! Thank you for the suggestion.
Also, thank you for writing about this tool! That's cool to see.
I had made a PR to someones repo with this tool, and then had to follow up with another PR to include some other file types. Unfortunately, after going through all the corrections it then told me that the branch already exists:
so I then had to go and do the entire thing again (and again after I didn't realise I should've deleted the branch in the github-spellcheck repo rather than my fork of Manopt.jl, but that's on me).
Would it be a good idea to make the branch name change by default if
fix-typos
already exists (or, if not, check for the existence of this branch first before any work is done) and, if it does, use e.g.fix-typos-2
? (and iffix-typos-n
exists, suefix-typos-n+1
.) I'd make a PR to address this myself but I don't know any JavaScript to read any of the code.