Skip to content

Add revert-commit to PRs #9670

@fregante

Description

@fregante

Description

It doesn't look like there's a "revert" action in the API, you'd have to manually download and upload each file to create the commit manually.

But what if "reset --hard" was enough?

PATCH /repos/{owner}/{repo}/git/refs/heads/main
{
  "sha": "<older_commit_sha>",
  "force": true
}

Not sure if this is a common and acceptable enough feature to add. It should likely be limited to PRs, most likely in the Commits tab, and require manually typing "force" in a prompt() dialog.

Example URLs

https://github.com/refined-github/refined-github/pull/9668/commits

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions