Skip to content

chore: improve initialise script #50

chore: improve initialise script

chore: improve initialise script #50

Workflow file for this run

name: Create Fix PRs
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
create-prs:
runs-on: macos-latest
if: contains(github.event.head_commit.message, 'fix!:')
steps:
- uses: actions/checkout@v3
- name: Create PRs
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run: |
TITLE="chore: auto-generated quick fix"
BODY="This PR was auto-generated from a fix on main to keep branches in sync."
# Create PR to next branch
PR_NEXT_URL=$(gh pr create --base next --head main --title "$TITLE" --body "$BODY")
PR_NEXT_NUMBER=$(echo "$PR_NEXT_URL" | grep -o '[0-9]\+$')
# Create PR to development branch
PR_DEV_URL=$(gh pr create --base development --head main --title "$TITLE" --body "$BODY")
PR_DEV_NUMBER=$(echo "$PR_DEV_URL" | grep -o '[0-9]\+$')