Skip to content

Commit

Permalink
ci: Test auto pr (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt authored Oct 11, 2024
1 parent 378f081 commit 77b7d6b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/auto-create-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Auto Create Pull Request

on:
push:
branches-ignore:
- main

jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Create Pull Request
run: |
BRANCH_NAME="${{ github.ref_name }}"
if [[ $BRANCH_NAME == *"/"* ]]; then
IFS="/" read -ra PARTS <<< "$BRANCH_NAME"
PR_TITLE="${PARTS[0]}: ${PARTS[1]^}"
PR_TITLE="${PR_TITLE//-/ }"
else
PR_TITLE="${BRANCH_NAME//-/ }"
fi
gh pr create \
-B main \
-H "$BRANCH_NAME" \
--title "$PR_TITLE" \
--body ""
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Empty file added test
Empty file.

0 comments on commit 77b7d6b

Please sign in to comment.