Skip to content

Create PR on Branch Creation #113

Create PR on Branch Creation

Create PR on Branch Creation #113

name: Create PR on Branch Creation
on:
create:
permissions:
pull-requests: write
jobs:
pull-request:
if: github.ref_type != 'tag'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create Pull Request
run: |
prefix=$(echo ${{ github.ref }}| cut -d '/' -f 3)
branch_name=$(echo ${{ github.ref }} | cut -d '/' -f 4- | tr '-' ' ')
GH_TOKEN=${{ secrets.GH_TOKEN }} gh pr create --title "${prefix}: ${branch_name}" --body ""