From 75a5de63f0f2bd1815ce0bb3f7874482b9434633 Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Fri, 9 Dec 2022 10:59:33 +0900 Subject: [PATCH] docs: add snippet for bypassing git hooks --- docs/examples.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/examples.md b/docs/examples.md index 86295e9..f291525 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -19,6 +19,7 @@ - [autopep8](#autopep8) - [Misc workflow tips](#misc-workflow-tips) - [Filtering push events](#filtering-push-events) + - [Bypassing git hooks](#bypassing-git-hooks) - [Dynamic configuration using variables](#dynamic-configuration-using-variables) - [Setting the pull request body from a file](#setting-the-pull-request-body-from-a-file) - [Using a markdown template](#using-a-markdown-template) @@ -526,6 +527,18 @@ jobs: ... ``` +### Bypassing git hooks + +If you have git hooks that prevent the action from working correctly you can remove them before running the action. + +```yml + # Remove git hooks + - run: rm -rf .git/hooks + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 +``` + ### Dynamic configuration using variables The following examples show how configuration for the action can be dynamically defined in a previous workflow step.