Skip to content

bug fixes

bug fixes #166

name: Automatically create pull requests
on:
push:
branches-ignore:
- main
tags-ignore:
- "*"
permissions: write-all
jobs:
createPullRequest:
if: ${{ github.actor == 'ehharvey' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch current pull requests
run: |
pull_requests=$(gh pr list --json headRefName --jq '.[] | .headRefName')
echo "pull_requests=$(echo $pull_requests | tr '\n' ' ')" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ github.token }}
id: fetchCurrentPullRequests
- name: Create pull request
run: gh pr create --title "$(git branch --show-current)" --body "TBD" --draft
env:
GH_TOKEN: ${{ github.token }}
if: ${{ !contains(steps.fetchCurrentPullRequests.outputs.pull_requests, github.ref_name) }}