diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 615d4bc0d..272454b83 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -85,5 +85,8 @@ "at any time" ], }], - "labels": ["auto-approve"], + "labels": [ + // Add auto-approve label which triggers the corresponding workflow. + "auto-approve", + ], } diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index fbf3e2332..5277bbace 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -7,9 +7,9 @@ on: jobs: auto-approve: - name: Auto-approve Konflux updates + name: Auto-approve Konflux updates for default branch runs-on: ubuntu-latest - if: github.actor == 'red-hat-konflux[bot]' && github.event.label.name == 'auto-approve' + if: github.actor == 'red-hat-konflux[bot]' && github.event.label.name == 'auto-approve' && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch steps: - env: GH_TOKEN: ${{ secrets.RHACS_BOT_GITHUB_TOKEN }}