Skip to content

refactor: improve CLI perf with lazy loading #8

refactor: improve CLI perf with lazy loading

refactor: improve CLI perf with lazy loading #8

name: Dependabot Automerge

Check failure on line 1 in .github/workflows/dependabot-automerge.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/dependabot-automerge.yml

Invalid workflow file

(Line: 10, Col: 3): Unexpected value 'workflows'
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: write
pull-requests: write
workflows: write
jobs:
dependabot:
runs-on: ubuntu-latest
# Only run for dependabot PRs
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for patch and minor updates
# Auto-merge patch and minor updates, but require manual review for major updates
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' }}
run: |
echo "Enabling auto-merge for ${{ steps.metadata.outputs.update-type }} update"
gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on major updates
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-major' }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.1.0
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '🚨 **Major version update detected!** This PR requires manual review before merging due to potential breaking changes.\n\n**Dependency:** `${{ steps.metadata.outputs.dependency-name }}`\n**Update Type:** `${{ steps.metadata.outputs.update-type }}`'
})