sindresorhus/refined-github

Look into using `createcommitonbranch` for `restore-file` #4781

yakov116 posted onGitHub


I assume you're referring to replacing this bit, in which case, yes plz

https://github.com/sindresorhus/refined-github/blob/32abfaaa4696053fa956f12b0186339e80f19292/source/features/restore-file.tsx#L68-L76

The feature currently always injects a EOL linebreak because that's how the editor works. This means that if a file lacks that character, "restoring" it will never remove it from the PR. So it's actually a bug in a way.

posted by fregante over 3 years ago

Hopefully they add a restore API at some point too so we can support restoring large files.

Speaking of which, if we know a size limit, we can probably just detect this limit before sending the API request.

E.G. on click immediately show the "file too big" error

posted by fregante over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests