create-pull-request
create-pull-request copied to clipboard
I get error "protected branch hook declined" when I try to create a draft pull request into protected branch
trafficstars
Subject of the issue
I would like to create a pull request that a developer has to review/approve online before the change gets merged in. However, I get error "protected branch hook declined" when I try to create a draft pull request into protected branch.
Steps to reproduce
I've tried various variations of this step., but I always get the error:
- name: Create Draft Pull Request
id: create-pull-request
env:
NEW_VERSION: "test-version"
uses: peter-evans/create-pull-request@v6
with:
token: ${{ github.token }}
delete-branch: false
labels: |
automated pr
commit-message: "Update main branch to ${{ env.NEW_VERSION }}"
title: "Update main branch to ${{ env.NEW_VERSION }}"
body: "$NEW_VERSION version update of main branch from int"
branch: "main_for_rule_tests"
draft: true
Hi @MayaTaylorAccuity
The branch input should not be your existing branch that you want to merge into, it should be the name of the pull request branch that the action will create. I think that is probably what the issue is.