https://github.com/srt32/revert
A GitHub Action to automatically revert a commit on a '/revert' comment
https://github.com/srt32/revert
action git github-action github-actions pull-requests revert slash-commands
Last synced: about 2 months ago
JSON representation
A GitHub Action to automatically revert a commit on a '/revert' comment
- Host: GitHub
- URL: https://github.com/srt32/revert
- Owner: srt32
- License: mit
- Created: 2019-02-04T16:35:59.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-22T17:48:33.000Z (over 5 years ago)
- Last Synced: 2024-12-09T04:11:26.648Z (11 months ago)
- Topics: action, git, github-action, github-actions, pull-requests, revert, slash-commands
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 102
- Watchers: 14
- Forks: 83
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Action to revert a commit via a comment
After installation, comment `/revert ` to trigger the action.

## Installation
```
name: Automatic Revert
on:
issue_comment:
types: [created]
jobs:
revert-commit:
runs-on: ubuntu-latest
if: contains(github.event.comment.body, '/revert')
steps:
- name: Checkout latest code
uses: actions/checkout@v2
- name: Automatic Revert
uses: srt32/revert@v0.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
This Action is heavily inspired by [rebase](https://github.com/cirrus-actions/rebase).