Promote plugin-object to core package as @object-ui/views #543
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: | |
| branches: [main, develop] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| dependabot: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.actor == 'dependabot[bot]' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'pnpm' | |
| - name: Configure Git merge driver for pnpm-lock.yaml | |
| run: | | |
| # Configure custom merge driver for pnpm-lock.yaml | |
| # This allows Git to automatically resolve lockfile conflicts by regenerating it | |
| git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver" | |
| git config merge.pnpm-merge.driver "pnpm install --no-frozen-lockfile" | |
| - name: Dependabot metadata | |
| id: metadata | |
| uses: dependabot/fetch-metadata@v2 | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Check if auto-mergeable | |
| id: check-update | |
| run: | | |
| UPDATE_TYPE="${{ steps.metadata.outputs.update-type }}" | |
| if [[ "$UPDATE_TYPE" == "version-update:semver-patch" ]] || [[ "$UPDATE_TYPE" == "version-update:semver-minor" ]]; then | |
| echo "auto_merge=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "auto_merge=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Enable auto-merge for Dependabot PRs | |
| if: steps.check-update.outputs.auto_merge == 'true' | |
| run: gh pr merge --auto --squash "$PR_URL" | |
| env: | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Approve PR | |
| if: steps.check-update.outputs.auto_merge == 'true' | |
| run: gh pr review --approve "$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@v7 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '⚠️ This is a **major version update**. Please review carefully before merging.' | |
| }); |