Closed CWSites closed 2 years ago
For anyone else that comes looking I was able to bypass this by temporarily disabling and reenabling branch protection rules inside the action using https://github.com/octokit/request-action
@CWSites Could have written the request-action code saved me some writing :)
Ah sorry about that @oreporan :)
steps:
- name: Get existing branch protection
id: get_branch_protection
uses: octokit/request-action@v2.0.24
with:
route: GET /repos/[USER OR ORGANIZATION]/[REPO NAME]/branches/[BRANCH NAME]/protection
mediaType: |
format: application/json
env:
# Uses a personal access token (PAT) from user with admin rights on repo
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
# The following step will print the existing branch protection rules
# Only uncomment as needed, there is an error within the echo statement
# which causes the workflow to fail
# - run: echo ${{steps.get_branch_protection.outputs.data}}
Hi there, I'm trying to merge
master
back intodevelop
automatically. I've got the configuration setup however mydevelop
branch is protected and requires at least one reviewer and a PR to be submitted. Is there a way to bypass these protection rules when using this action?Action Config
Error Log