Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-pull-request

GitHub Action

Block PR Merges if Keyword Found

releases/v0.1

Block PR Merges if Keyword Found

git-pull-request

Block PR Merges if Keyword Found

Checks that the added code in a PR doesn't contain a keyword

Installation

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

              

- name: Block PR Merges if Keyword Found

uses: itsvs/no-merge-action@releases/v0.1

Learn more about this action in itsvs/no-merge-action

Choose a version

Block Merge if Keyword in PR Diff

Setup

Add a file to .github/workflows with similar contents to:

name: "Block @nocommit Merges"
on: [pull_request]

jobs:
  check_pr:
    runs-on: ubuntu-latest
    steps:
    - name: Check for @nocommit
      uses: itsvs/no-commit-action@releases/v2
      with:
        github-token: ${{github.token}}
        keyword: "@nocommit"

The keyword variable is the string that we don't want the PR to include.

Contributing

Use issues!

License

This is a modification of the original template, and is released under the MIT license.