{"id":15404567,"url":"https://github.com/k1low/pr-revert","last_synced_at":"2026-05-04T03:34:26.119Z","repository":{"id":44541836,"uuid":"390650681","full_name":"k1LoW/pr-revert","owner":"k1LoW","description":"pr-revert is a tool for reverting pull requests","archived":false,"fork":false,"pushed_at":"2023-12-28T07:48:49.000Z","size":101,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-02T03:29:48.644Z","etag":null,"topics":["git-revert","github","pull-request"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k1LoW.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"k1LoW","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-07-29T08:13:36.000Z","updated_at":"2023-01-10T03:23:03.000Z","dependencies_parsed_at":"2024-06-20T00:03:19.736Z","dependency_job_id":"20691f05-6d89-47fd-836d-dae23905cd50","html_url":"https://github.com/k1LoW/pr-revert","commit_stats":{"total_commits":31,"total_committers":1,"mean_commits":31.0,"dds":0.0,"last_synced_commit":"e0bf868b5c1526d417be0d1bdfca6224dcdfe8c3"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fpr-revert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fpr-revert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fpr-revert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fpr-revert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k1LoW","download_url":"https://codeload.github.com/k1LoW/pr-revert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245955161,"owners_count":20699889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git-revert","github","pull-request"],"created_at":"2024-10-01T16:13:43.739Z","updated_at":"2026-05-04T03:34:26.053Z","avatar_url":"https://github.com/k1LoW.png","language":"Go","funding_links":["https://github.com/sponsors/k1LoW"],"categories":[],"sub_categories":[],"readme":"# pr-revert\n\npr-revert is a tool for reverting pull requests.\n\n**:octocat: GitHub Actions for pr-revert is [here](https://github.com/k1LoW/pr-revert-action) !!**\n\n## Usage\n\n### Default behavior\n\n1. Clone repository from remote to temporary working directory.\n2. Create a branch to stack revert commits.\n3. Revert pull requests.\n4. Push branch to remote repository.\n5. Create a pull request.\n6. Cleanup temporary working directory.\n\n### Revert a pull request by number (#3)\n\n``` console\n$ pr-revert --number 3\n```\n\n### Revert latest 5 merged pull requests\n\n``` console\n$ pr-revert --latest 5\n```\n\n### Revert all merged pull requests until 2 hours\n\n``` console\n$ pr-revert --until '2 hours'\n```\n\n### Revert pull requests without new pull request\n\n``` console\n$ pr-revert --latest 3 --no-pull-request\n```\n\n### Revert pull requests without cleanup\n\n``` console\n$ pr-revert --latest 3 --no-cleanup\n```\n\n### Revert pull requests and push to default branch of remote repository\n\n``` console\n$ pr-revert --latest 3 --no-branch\n```\n\n## Requirements\n\n- Git\n\n### Required Environment Variables\n\n| Environment variable | Description | Default |\n| --- | --- | --- |\n| `GITHUB_TOKEN` | A GitHub access token. | - |\n| `GITHUB_REPOSITORY` | The owner and repository name ( `owner/repo` )| - |\n| `GITHUB_SERVER_URL` | The the GitHub server URL. | `https://github.com` |\n| `GITHUB_API_URL` | The GitHub API URL | `https://api.github.com` |\n| `GITHUB_GRAPHQL_URL` | The GitHub GraphQL API URL | `https://api.github.com/graphql` |\n\n## Environment Variables\n\n| Environment variable | Description |\n| --- | --- |\n| `PR_REVERT_LATEST` | Can be used instead of the `--latest` option |\n| `PR_REVERT_UNTIL` | Can be used instead of the `--until` option |\n| `PR_REVERT_NUMBER` | Can be used instead of the `--number` option |\n| `PR_REVERT_NO_PUSH` | Can be used instead of the `--no-push` option |\n| `PR_REVERT_NO_PULL_REQUEST` | Can be used instead of the `--no-pull-request` option |\n| `PR_REVERT_NO_CLEANUP` | Can be used instead of the `--no-cleanup` option |\n| `PR_REVERT_NO_BRANCH` | Can be used instead of the `--no-branch` option |\n\n## Install\n\n**deb:**\n\nUse [dpkg-i-from-url](https://github.com/k1LoW/dpkg-i-from-url)\n\n``` console\n$ export PR-REVERT_VERSION=X.X.X\n$ curl -L https://git.io/dpkg-i-from-url | bash -s -- https://github.com/k1LoW/pr-revert/releases/download/v$PR-REVERT_VERSION/pr-revert_$PR-REVERT_VERSION-1_amd64.deb\n```\n\n**RPM:**\n\n``` console\n$ export PR-REVERT_VERSION=X.X.X\n$ yum install https://github.com/k1LoW/pr-revert/releases/download/v$PR-REVERT_VERSION/pr-revert_$PR-REVERT_VERSION-1_amd64.rpm\n```\n\n**apk:**\n\nUse [apk-add-from-url](https://github.com/k1LoW/apk-add-from-url)\n\n``` console\n$ export PR-REVERT_VERSION=X.X.X\n$ curl -L https://git.io/apk-add-from-url | sh -s -- https://github.com/k1LoW/pr-revert/releases/download/v$PR-REVERT_VERSION/pr-revert_$PR-REVERT_VERSION-1_amd64.apk\n```\n\n**homebrew tap:**\n\n```console\n$ brew install k1LoW/tap/pr-revert\n```\n\n**manually:**\n\nDownload binary from [releases page](https://github.com/k1LoW/pr-revert/releases)\n\n**go get:**\n\n```console\n$ go get github.com/k1LoW/pr-revert\n```\n\n**docker:**\n\n```console\n$ docker pull ghcr.io/k1low/pr-revert:latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk1low%2Fpr-revert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk1low%2Fpr-revert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk1low%2Fpr-revert/lists"}