From 3b125100daa4f179f372699b5ddf1c9e2a90ac0c Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 20 Dec 2022 16:09:34 +0000 Subject: [PATCH] OPS: Use new `octue/generate-pull-request-description` GitHub action --- .github/workflows/update-pull-request.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/update-pull-request.yml b/.github/workflows/update-pull-request.yml index 351c3ba..1efc58f 100644 --- a/.github/workflows/update-pull-request.yml +++ b/.github/workflows/update-pull-request.yml @@ -2,7 +2,7 @@ # message headers of the commits since the last pull request merged into main. The auto generated section is enveloped # between two comments: "" and "". Anything # outside these in the description is left untouched. Auto-generated updates can be skipped for a commit if -# "skip_ci_update_description" is in the commit message body. +# "" is added to the pull request description. name: update-pull-request @@ -17,19 +17,14 @@ jobs: if: "!contains(github.event.pull_request.body, '')" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - uses: octue/generate-pull-request-description@1.0.0.beta-2 + id: pr-description with: - # Set fetch-depth to 0 to fetch all commit history (necessary for compiling pull request description). - fetch-depth: 0 - - name: Install release note compiler - run: pip install git+https://github.com/octue/conventional-commits - - name: Compile new pull request description - run: | - echo 'PULL_REQUEST_NOTES<> $GITHUB_ENV - echo "$(compile-release-notes PULL_REQUEST_START --pull-request-url=${{ github.event.pull_request.url }} --api-token=${{ secrets.GITHUB_TOKEN }})" >> $GITHUB_ENV - echo EOF >> $GITHUB_ENV + pull_request_url: ${{ github.event.pull_request.url }} + api_token: ${{ secrets.GITHUB_TOKEN }} - name: Update pull request body uses: riskledger/update-pr-description@v2 with: - body: ${{ env.PULL_REQUEST_NOTES }} + body: ${{ steps.pr-description.outputs.pull_request_description }} token: ${{ secrets.GITHUB_TOKEN }}