From c83dc48d3fe0dabe1cccaa4d242e06ae6661b982 Mon Sep 17 00:00:00 2001 From: Mo Date: Tue, 18 Oct 2022 06:39:33 -0500 Subject: [PATCH] ci: pr linking (skip e2e) --- .github/workflows/git-sync.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 }}