Skip to content
git-pull-request

GitHub Action

Automatic Revert

v0.0.1 Latest version

Automatic Revert

git-pull-request

Automatic Revert

Automatically revert a commit on '/revert' comment

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Automatic Revert

uses: srt32/[email protected]

Learn more about this action in srt32/revert

Choose a version

GitHub Action to revert a commit via a comment

After installation, comment /revert <commit_sha> to trigger the action.

revert

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/[email protected]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

This Action is heavily inspired by rebase.