New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove file from PR #1901
Comments
They’re different. “Delete file” fully deletes the files, it’s a feature that was added by GitHub. “Revert all changes in file” is a feature that would indeed be nice to have, arguably this is the only button PRs need 👍 |
@bfred-it I would be more than happy to contribute to this. Can you point me towards the starting point? Thanks! |
Honestly I don’t know if there’s an easy way to do this, you’d have to look the API for reverting |
Yeahhh... I was looking into this. It's definitely non-trivial. I think the easiest way to is to follow this path:
|
|
GitHub's api doesn't really expose higher level git actions like checkout. We could use the commit api to try to replicate this process, but I'm not sure how to go about doing that. |
The correct API seems to be Contents API https://developer.github.com/v3/repos/contents/#update-a-file Use it for steps 2 and 3 |
@issuehunt has funded $80.00 to this issue.
|
@sindresorhus has rewarded $72.00 to @fregante. See it on IssueHunt
|
Basically a duplicate of #1127.
Sometimes in a PR file changes slip in that you didn't intend. Maybe you didn't correctly stash, a commit hook made a formatting change, or some other thing happened.
The ultimate result is that you want to undo changes to a particular file in your PR. It'd be nice to have a button on the header of every file in the diff to revert that change.
Something like this...
It seems like this was added in #1398, but it's no longer present or working now. At least not in the FF version of the plugin. GitHub added the trashcan icon to actually delete a file... heh, I almost did that >_>.
IssueHunt Summary
fregante has been rewarded.
Backers (Total: $80.00)
Submitted pull Requests
revert-file
featureTips
IssueHunt has been backed by the following sponsors. Become a sponsor
The text was updated successfully, but these errors were encountered: