Skip to content

chore(deps-dev): bump @types/vscode from 1.103.0 to 1.140.0 in the npm-minor-patch group across 1 directory #29

chore(deps-dev): bump @types/vscode from 1.103.0 to 1.140.0 in the npm-minor-patch group across 1 directory

chore(deps-dev): bump @types/vscode from 1.103.0 to 1.140.0 in the npm-minor-patch group across 1 directory #29

name: Dependabot auto-merge

Check warning on line 1 in .github/workflows/dependabot-auto-merge.yml

View workflow run for this annotation

GitHub Actions / Dependabot auto-merge

Workflow execution policy warning (evaluate mode)

On December 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
# Arms auto-merge on Dependabot's patch and minor security updates. GitHub merges
# them only after the required human review and branch-protection checks pass.
#
# Major bumps are deliberately excluded: they are the ones that break builds, and
# they stay open for a human to read.
#
# No step approves anything. Human review remains independent from the bot that
# opened the pull request, while a green build can merge automatically afterward.
#
# Why pull_request_target and not pull_request: GitHub treats Dependabot runs as if
# they came from a fork, so on `pull_request` the GITHUB_TOKEN is read-only and
# cannot enable auto-merge. `pull_request_target` runs in the base repository's
# context with a writable token. That trigger is dangerous when a workflow checks
# out and runs the pull request's code, because untrusted code would inherit those
# permissions — this workflow never checks out the PR, it only reads metadata and
# calls the API.
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
# Check the author rather than the actor, so the job cannot be driven by a
# pull request someone else opened.
if: github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest
timeout-minutes: 5
concurrency:
group: dependabot-auto-merge-${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- name: Fetch Dependabot metadata
id: meta
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
- name: Enable auto-merge for patch and minor updates
if: |
steps.meta.outputs.update-type == 'version-update:semver-patch' ||
steps.meta.outputs.update-type == 'version-update:semver-minor'
run: gh pr merge --auto --squash --match-head-commit "$PR_HEAD_SHA" "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Leave major updates for manual review
if: steps.meta.outputs.update-type == 'version-update:semver-major'
run: |
echo "::notice::Major update ($DEPENDENCY_NAMES) left for manual review."
env:
DEPENDENCY_NAMES: ${{ steps.meta.outputs.dependency-names }}