Skip to content
This repository was archived by the owner on Feb 27, 2026. It is now read-only.

deps(deps): bump marked from 17.0.1 to 17.0.3 #302

deps(deps): bump marked from 17.0.1 to 17.0.3

deps(deps): bump marked from 17.0.1 to 17.0.3 #302

name: Auto-merge Dependabot PRs
on:
pull_request_target:
types: [opened, synchronize, reopened, labeled]
permissions:
contents: write
pull-requests: write
jobs:
auto-merge-dependabot:
runs-on: ubuntu-latest
if: |
github.event.pull_request.user.login == 'dependabot[bot]' &&
contains(github.event.pull_request.labels.*.name, 'dependencies')
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Wait for CI checks
run: |
echo "⏳ Waiting for CI checks to complete..."
sleep 90
- name: Check CI status
id: ci-status
run: |
# Get all check runs for this PR
CHECKS_STATUS=$(gh api /repos/${{ github.repository }}/commits/${{ github.event.pull_request.head.sha }}/check-runs \
--jq '.check_runs | map(select(.name != "auto-merge-dependabot")) | if length == 0 then "no-checks" else (map(.conclusion) | if any(. == "failure") then "failed" elif any(. == null) then "pending" else "passed" end) end')
echo "CI Status: $CHECKS_STATUS"
case $CHECKS_STATUS in
"no-checks")
echo "✅ No CI checks required"
echo "status=passed" >> $GITHUB_OUTPUT
;;
"passed")
echo "✅ All CI checks passed"
echo "status=passed" >> $GITHUB_OUTPUT
;;
"pending")
echo "⏳ CI checks still running, will try again later"
echo "status=pending" >> $GITHUB_OUTPUT
;;
"failed")
echo "❌ Some CI checks failed"
echo "status=failed" >> $GITHUB_OUTPUT
;;
*)
echo "⚠️ Unknown CI status: $CHECKS_STATUS"
echo "status=unknown" >> $GITHUB_OUTPUT
;;
esac
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Auto-approve Dependabot PR
if: steps.ci-status.outputs.status == 'passed'
run: |
echo "🤖 Auto-approving Dependabot PR"
# Extract package info from PR title for better messaging
PR_TITLE="${{ github.event.pull_request.title }}"
# Try to extract package name and version
if echo "$PR_TITLE" | grep -q "bump.*from.*to"; then
PACKAGE_INFO=$(echo "$PR_TITLE" | sed 's/deps-dev(deps-dev): //' | sed 's/deps(deps): //')
else
PACKAGE_INFO="dependency update"
fi
gh pr review ${{ github.event.pull_request.number }} --approve --body "🤖 **Automated Dependabot Approval**
This dependency update has been automatically approved:
📦 **Change**: $PACKAGE_INFO
🔒 **Security**: Dependabot updates help maintain security and compatibility
✅ **CI Status**: All automated checks passed successfully
🚀 **Auto-merge**: Merging automatically to keep dependencies up-to-date
---
*This is an automated approval for a trusted Dependabot dependency update.*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Auto-merge Dependabot PR
if: steps.ci-status.outputs.status == 'passed'
run: |
echo "🔀 Auto-merging Dependabot PR"
# Attempt to merge with squash strategy
if gh pr merge ${{ github.event.pull_request.number }} --squash --delete-branch; then
echo "✅ Successfully auto-merged Dependabot PR #${{ github.event.pull_request.number }}"
else
echo "⚠️ Auto-merge failed, attempting to enable auto-merge instead"
# Try to enable GitHub's auto-merge feature as fallback
gh api graphql -F pullRequestId='${{ github.event.pull_request.node_id }}' -F mergeMethod=SQUASH -f query='
mutation EnableAutoMerge($pullRequestId: ID!, $mergeMethod: PullRequestMergeMethod!) {
enablePullRequestAutoMerge(input: {
pullRequestId: $pullRequestId,
mergeMethod: $mergeMethod
}) {
pullRequest {
autoMergeRequest {
enabledAt
}
}
}
}' || echo "Auto-merge enable also failed"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Handle pending CI
if: steps.ci-status.outputs.status == 'pending'
run: |
echo "⏳ CI checks still running - will retry later"
gh pr comment ${{ github.event.pull_request.number }} --body "⏳ **Auto-merge Pending**
This Dependabot PR is queued for auto-merge, but CI checks are still running.
**Status**: Waiting for all checks to complete
**Next**: Will auto-approve and merge once CI passes
If checks take longer than expected, you can manually merge with:
\`\`\`bash
gh pr merge ${{ github.event.pull_request.number }} --squash --delete-branch
\`\`\`"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Handle failed CI
if: steps.ci-status.outputs.status == 'failed'
run: |
echo "❌ CI checks failed - manual intervention needed"
gh pr comment ${{ github.event.pull_request.number }} --body "❌ **Auto-merge Blocked**
This Dependabot PR cannot be auto-merged because CI checks failed.
**Action needed**:
1. 🔍 Review the failing checks in the Actions tab
2. 🔧 Determine if this is a breaking change that needs attention
3. 🚀 Manually merge if the failures are acceptable
**Common scenarios**:
- **Breaking API changes** - May require code updates
- **Test failures** - Could indicate compatibility issues
- **Security alerts** - Need careful review before merging
**Manual merge** (if safe):
\`\`\`bash
gh pr merge ${{ github.event.pull_request.number }} --squash --delete-branch
\`\`\`"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Success notification
if: steps.ci-status.outputs.status == 'passed'
run: |
echo "🎉 Dependabot PR auto-merge completed successfully!"
echo "📦 Dependency: ${{ github.event.pull_request.title }}"
echo "🔗 PR: ${{ github.event.pull_request.html_url }}"
echo "✅ Your project dependencies are now up-to-date and secure!"