From da343449c7a4b9ec995ddd366cea9faa13621e7f Mon Sep 17 00:00:00 2001 From: Sandeep Panchal Date: Wed, 3 Jan 2024 20:20:35 +0530 Subject: [PATCH] feat: new workflow to detect PR edit and trigger renovate scan This commit, 1. ensures PR body edit contains Rebase Tick Box is ticked 2. validates PR author is renovate bot or not 3. trigger renovate scan using composite action from BitGo/gha-renovate-bot Ticket: DO-4550 --- .github/workflows/pull-request-edit.yaml | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pull-request-edit.yaml diff --git a/.github/workflows/pull-request-edit.yaml b/.github/workflows/pull-request-edit.yaml new file mode 100644 index 00000000..7d47414f --- /dev/null +++ b/.github/workflows/pull-request-edit.yaml @@ -0,0 +1,31 @@ +name: on_pr_edit +run-name: 'on_pr_edit: ${{ github.ref_name }}' + +on: + pull_request: + types: + - edited + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + id-token: write + contents: read + +jobs: + run-scan: + name: Trigger Renovate Scan + if: + ${{ contains(github.event.pull_request.body, '[x] ') + && github.event.pull_request.user.login == 'bitgo-renovate-bot[bot]' }} + runs-on: ubuntu-latest + steps: + - id: trigger-renovate-scan + uses: BitGo/gha-renovate-bot@master + with: + target-base-branch: master + target-repository: ${{ github.repository }} + caller-pr: ${{ github.event.pull_request.number }} + trigger-token: ${{ secrets.BITGOBOT_RENOVATE_ACTIONS_GITHUB_TOKEN }} # Should be a PAT