deps(frontend)(deps-dev): bump vite from 6.3.5 to 7.1.2 in /frontend #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: π€ Dependabot Auto-merge | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # π€ DEPENDABOT PR HANDLING | |
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| dependabot-auto-merge: | |
| name: π€ Dependabot Auto-merge | |
| runs-on: ubuntu-latest | |
| if: github.actor == 'dependabot[bot]' | |
| timeout-minutes: 10 | |
| steps: | |
| - name: π₯ Checkout PR | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: π Analyze Dependabot PR | |
| id: analyze | |
| run: | | |
| echo "π€ Analyzing Dependabot PR..." | |
| # Get PR details | |
| PR_TITLE="${{ github.event.pull_request.title }}" | |
| PR_BODY="${{ github.event.pull_request.body }}" | |
| echo "π PR Title: $PR_TITLE" | |
| echo "pr_title=$PR_TITLE" >> $GITHUB_OUTPUT | |
| # Determine update type | |
| if echo "$PR_TITLE" | grep -q "Bump.*from.*to"; then | |
| echo "π Standard dependency update detected" | |
| echo "update_type=dependency" >> $GITHUB_OUTPUT | |
| elif echo "$PR_TITLE" | grep -qi "security"; then | |
| echo "π Security update detected" | |
| echo "update_type=security" >> $GITHUB_OUTPUT | |
| else | |
| echo "β Unknown update type" | |
| echo "update_type=unknown" >> $GITHUB_OUTPUT | |
| fi | |
| - name: π Check if CI passed | |
| uses: actions/github-script@v7 | |
| id: ci-check | |
| with: | |
| script: | | |
| const { data: checks } = await github.rest.checks.listForRef({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| ref: context.payload.pull_request.head.sha, | |
| }); | |
| // Look for main CI workflow | |
| const ciChecks = checks.check_runs.filter(check => | |
| check.name.includes('Quality Gate') || | |
| check.name.includes('Code Quality') | |
| ); | |
| const allPassed = ciChecks.every(check => check.status === 'completed' && check.conclusion === 'success'); | |
| const anyFailed = ciChecks.some(check => check.conclusion === 'failure'); | |
| if (anyFailed) { | |
| console.log('β Some CI checks failed'); | |
| core.setOutput('ci_status', 'failed'); | |
| } else if (allPassed && ciChecks.length > 0) { | |
| console.log('β All CI checks passed'); | |
| core.setOutput('ci_status', 'passed'); | |
| } else { | |
| console.log('β³ CI checks still running or not found'); | |
| core.setOutput('ci_status', 'pending'); | |
| } | |
| - name: π― Auto-merge Decision | |
| id: decision | |
| run: | | |
| CI_STATUS="${{ steps.ci-check.outputs.ci_status }}" | |
| UPDATE_TYPE="${{ steps.analyze.outputs.update_type }}" | |
| echo "π― Making auto-merge decision..." | |
| echo " CI Status: $CI_STATUS" | |
| echo " Update Type: $UPDATE_TYPE" | |
| SHOULD_MERGE="false" | |
| # Auto-merge conditions | |
| if [[ "$CI_STATUS" == "passed" ]]; then | |
| if [[ "$UPDATE_TYPE" == "security" ]]; then | |
| echo "π Security update with passing CI - auto-merging" | |
| SHOULD_MERGE="true" | |
| elif [[ "$UPDATE_TYPE" == "dependency" ]]; then | |
| # Check if it's a patch/minor update (safer) | |
| if echo "${{ steps.analyze.outputs.pr_title }}" | grep -E "(patch|minor)" > /dev/null; then | |
| echo "π Patch/minor update with passing CI - auto-merging" | |
| SHOULD_MERGE="true" | |
| else | |
| echo "β οΈ Major update - requires manual review" | |
| SHOULD_MERGE="false" | |
| fi | |
| fi | |
| else | |
| echo "β CI not passed - skipping auto-merge" | |
| SHOULD_MERGE="false" | |
| fi | |
| echo "should_merge=$SHOULD_MERGE" >> $GITHUB_OUTPUT | |
| echo "π― Decision: Auto-merge = $SHOULD_MERGE" | |
| - name: β Auto-merge Dependabot PR | |
| if: steps.decision.outputs.should_merge == 'true' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| console.log('β Auto-merging Dependabot PR...'); | |
| await github.rest.pulls.merge({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.payload.pull_request.number, | |
| commit_title: `π€ ${context.payload.pull_request.title}`, | |
| commit_message: `Auto-merged by Dependabot workflow\n\n${context.payload.pull_request.body}`, | |
| merge_method: 'squash' | |
| }); | |
| console.log('π Dependabot PR auto-merged successfully!'); | |
| - name: π¬ Add Review Comment | |
| if: steps.decision.outputs.should_merge == 'false' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const ciStatus = '${{ steps.ci-check.outputs.ci_status }}'; | |
| const updateType = '${{ steps.analyze.outputs.update_type }}'; | |
| let message = '## π€ Dependabot Auto-merge Analysis\n\n'; | |
| if (ciStatus === 'failed') { | |
| message += 'β **CI checks failed** - This PR requires manual review and fixes.\n\n'; | |
| } else if (ciStatus === 'pending') { | |
| message += 'β³ **CI checks still running** - Auto-merge will be reconsidered once checks complete.\n\n'; | |
| } else if (updateType === 'dependency' && !`${{ steps.analyze.outputs.pr_title }}`.match(/(patch|minor)/)) { | |
| message += 'β οΈ **Major version update detected** - This requires manual review for potential breaking changes.\n\n'; | |
| } else { | |
| message += 'βΉοΈ **Manual review required** - This PR did not meet auto-merge criteria.\n\n'; | |
| } | |
| message += '### π Auto-merge Criteria\n'; | |
| message += '- β Security updates with passing CI\n'; | |
| message += '- β Patch/minor dependency updates with passing CI\n'; | |
| message += '- β Major version updates (require manual review)\n'; | |
| message += '- β Any PR with failing CI checks\n\n'; | |
| message += '**Note:** Production deployment is automatically skipped for all Dependabot commits for security.'; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| body: message | |
| }); | |
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # π SUMMARY REPORTING | |
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| summary: | |
| name: π Dependabot Summary | |
| runs-on: ubuntu-latest | |
| needs: [dependabot-auto-merge] | |
| if: always() && github.actor == 'dependabot[bot]' | |
| steps: | |
| - name: π Generate Summary | |
| run: | | |
| echo "## π€ Dependabot PR Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**PR:** ${{ github.event.pull_request.title }}" >> $GITHUB_STEP_SUMMARY | |
| echo "**Author:** ${{ github.actor }}" >> $GITHUB_STEP_SUMMARY | |
| echo "**Status:** ${{ needs.dependabot-auto-merge.result }}" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| if [[ "${{ needs.dependabot-auto-merge.result }}" == "success" ]]; then | |
| echo "β **Dependabot PR processed successfully**" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### π‘οΈ Security Note" >> $GITHUB_STEP_SUMMARY | |
| echo "Production deployment is **automatically skipped** for Dependabot commits." >> $GITHUB_STEP_SUMMARY | |
| echo "Use the Manual Deployment workflow if you need to deploy after testing." >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "β οΈ **Dependabot PR requires attention**" >> $GITHUB_STEP_SUMMARY | |
| fi |