From d8402927e13852bfcd6de6d3ce601ae234bd2c9e Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Wed, 17 Dec 2025 10:11:25 +0545 Subject: [PATCH] feat(.github/workflows): streamline dependabot auto-merge workflow The Dependabot auto-merge workflow has been simplified and focused on essential functionality. Approval steps have been removed, leaving only the core auto-merge capability for minor and patch updates. **New Features** - Added explicit conditional filtering to run jobs **only for Dependabot PRs** **Enhancements & Refinements** - Renamed workflow from **Dependabot Auto-Approve and Auto-Merge** to **Dependabot Auto-Merge** to reflect simplified scope - Improved workflow structure with clearer YAML syntax separation - Reorganized **Fetch Dependabot metadata** step placement for better readability - Removed redundant GitHub script approval step to reduce complexity --- .github/workflows/dependabot-auto-merge.yml | 24 +++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 7c0bdb0..540c878 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -1,5 +1,7 @@ -name: Dependabot Auto-Approve and Auto-Merge -on: pull_request +name: Dependabot Auto-Merge + +on: + pull_request: permissions: contents: write @@ -7,25 +9,15 @@ permissions: jobs: dependabot: + # Run only for Dependabot PRs if: github.actor == 'dependabot[bot]' runs-on: ubuntu-latest + steps: - - name: Dependabot metadata + - name: Fetch Dependabot metadata id: metadata uses: dependabot/fetch-metadata@v2 - - name: Approve PR - if: | - steps.metadata.outputs.update-type == 'version-update:semver-minor' || - steps.metadata.outputs.update-type == 'version-update:semver-patch' - uses: actions/github-script@v8 - with: - script: | - await github.rest.pulls.createReview({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - event: 'APPROVE' - }) + - name: Enable auto-merge (squash) if: | steps.metadata.outputs.update-type == 'version-update:semver-minor' ||