Skip to content

Commit

Permalink
feat: new workflow to detect PR edit and trigger renovate scan
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sandeeppanchal-bitgo committed Jan 10, 2024
1 parent 190b993 commit da34344
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pull-request-edit.yaml
Original file line number Diff line number Diff line change
@@ -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] <!-- rebase-check -->')
&& 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

0 comments on commit da34344

Please sign in to comment.