Skip to content

Create Pull Request #46

Create Pull Request

Create Pull Request #46

name: Create Pull Request
on:
create:
branches-ignore:
- develop
- master
jobs:
create-pull-request:
if: startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create Pull Request
env:
GH_TOKEN: ${{ github.token }}
run: |
# Get current branch name
branch_name=$(git symbolic-ref --short HEAD)
# Create pull request using GitHub CLI
gh pr create --base develop --title "Auto-generated Pull Request for $branch_name" --body "Pulling '$branch_name into develop. Please review and merge."