diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index 86055a337..e72f848a5 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -36,12 +36,23 @@ jobs: run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch + - name: Find open PR + uses: juliangruber/find-pull-request-action@v1 + id: find-pull-request + with: + branch: ${{ steps.extract_branch.outputs.branch }} + - run: echo "Pull Request ${number} (${sha})" + env: + number: ${{ steps.find-pull-request.outputs.number }} + sha: ${{ steps.find-pull-request.outputs.head-sha }} + - uses: peter-evans/create-pull-request@v4 - if: "${{ github.actor != 'dependabot' }}" + if: "${{ contains(github.event.head_commit.message, 'chore(deps') == false }}" with: token: ${{ secrets.CI_PAT_TOKEN }} branch: ${{ github.ref }} base: main title: ${{ steps.extract_branch.outputs.branch }} + body: "Public PR: https://github.com/standardnotes/app/pull/${{ steps.find-pull-request.outputs.number }}" assignees: ${{ github.actor }} reviewers: ${{ github.actor }}