From 2b4b8839d166ab37c40f9c6f2cf06bb5334adbe5 Mon Sep 17 00:00:00 2001 From: Alex Corey Date: Mon, 22 Aug 2022 11:31:49 -0400 Subject: [PATCH 1/2] Edits existing PR body --- .github/workflows/update_dependabot_prs.yml | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/update_dependabot_prs.yml diff --git a/.github/workflows/update_dependabot_prs.yml b/.github/workflows/update_dependabot_prs.yml new file mode 100644 index 0000000000..a2a5b8b8a0 --- /dev/null +++ b/.github/workflows/update_dependabot_prs.yml @@ -0,0 +1,26 @@ +--- +name: Dependency Pr Update +on: + pull_request: + types: [labeled, opened, reopened] + +jobs: + pr-check: + name: Update Dependabot Prs + if: contains(github.event.pull_request.labels.*.name, 'dependencies') && contains(github.event.pull_request.labels.*.name, 'component:ui') + runs-on: ubuntu-latest + + steps: + - name: Checkout branch + uses: actions/checkout@v3 + + - name: Update PR Body + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} + BRANCH: ${{github.event.pull_request.head.ref}} + PR: ${{github.event.pull_request}} + run: | + gh pr checkout ${{ env.BRANCH }} + gh pr edit --body "${{ env.PR }} Bug, Docs Fix or other nominal change" From 8d08ac559db458a225d7bc3482d9a2bb20c76173 Mon Sep 17 00:00:00 2001 From: Alex Corey Date: Mon, 22 Aug 2022 12:05:43 -0400 Subject: [PATCH 2/2] Puts new pr string on a new line --- .github/workflows/update_dependabot_prs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_dependabot_prs.yml b/.github/workflows/update_dependabot_prs.yml index a2a5b8b8a0..b2c9016719 100644 --- a/.github/workflows/update_dependabot_prs.yml +++ b/.github/workflows/update_dependabot_prs.yml @@ -23,4 +23,4 @@ jobs: PR: ${{github.event.pull_request}} run: | gh pr checkout ${{ env.BRANCH }} - gh pr edit --body "${{ env.PR }} Bug, Docs Fix or other nominal change" + gh pr edit --body "${{ env.PR }}\nBug, Docs Fix or other nominal change"