docs: add script usage notes #52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]\+$') |