pr-revert is a tool for reverting pull requests.
GitHub Actions for pr-revert is here !!
- Clone repository from remote to temporary working directory.
- Create a branch to stack revert commits.
- Revert pull requests.
- Push branch to remote repository.
- Create a pull request.
- Cleanup temporary working directory.
$ pr-revert --number 3
$ pr-revert --latest 5
$ pr-revert --until '2 hours'
$ pr-revert --latest 3 --no-pull-request
$ pr-revert --latest 3 --no-cleanup
$ pr-revert --latest 3 --no-branch
- Git
Environment variable | Description | Default |
---|---|---|
GITHUB_TOKEN |
A GitHub access token. | - |
GITHUB_REPOSITORY |
The owner and repository name ( owner/repo ) |
- |
GITHUB_SERVER_URL |
The the GitHub server URL. | https://github.com |
GITHUB_API_URL |
The GitHub API URL | https://api.github.com |
GITHUB_GRAPHQL_URL |
The GitHub GraphQL API URL | https://api.github.com/graphql |
Environment variable | Description |
---|---|
PR_REVERT_LATEST |
Can be used instead of the --latest option |
PR_REVERT_UNTIL |
Can be used instead of the --until option |
PR_REVERT_NUMBER |
Can be used instead of the --number option |
PR_REVERT_NO_PUSH |
Can be used instead of the --no-push option |
PR_REVERT_NO_PULL_REQUEST |
Can be used instead of the --no-pull-request option |
PR_REVERT_NO_CLEANUP |
Can be used instead of the --no-cleanup option |
PR_REVERT_NO_BRANCH |
Can be used instead of the --no-branch option |
deb:
Use dpkg-i-from-url
$ export PR-REVERT_VERSION=X.X.X
$ 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
RPM:
$ export PR-REVERT_VERSION=X.X.X
$ yum install https://github.com/k1LoW/pr-revert/releases/download/v$PR-REVERT_VERSION/pr-revert_$PR-REVERT_VERSION-1_amd64.rpm
apk:
Use apk-add-from-url
$ export PR-REVERT_VERSION=X.X.X
$ 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
homebrew tap:
$ brew install k1LoW/tap/pr-revert
manually:
Download binary from releases page
go get:
$ go get github.com/k1LoW/pr-revert
docker:
$ docker pull ghcr.io/k1low/pr-revert:latest