diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index f58446d..88f887e 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,17 +1,18 @@ +name: Auto PR - Submission on: push: branches: - tool/* - -permissions: - pull-requests: write - jobs: pull-request: + name: Open PR to main runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: pull-request - run: | - gh_pr_up() { gh pr create $* || gh pr edit $* } - gh_pr_up --title "New tool!" --body "Description" + - name: Checkout + uses: actions/checkout@v3 + - name: Open or update PR + env: + GH_TOKEN: ${{ github.token }} + run: | + gh_pr_up() { IFS=$'\n'; gh pr create $* || gh pr edit $*; } + gh_pr_up --title "Automatic PR" --body "New tool added."