From 909b3ea0e2fe9b705b22a83512e3d78a6c783cde Mon Sep 17 00:00:00 2001 From: m-tartari <37861893+m-tartari@users.noreply.github.com> Date: Tue, 18 Mar 2025 13:28:21 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=91=B7=20chore(CI):=20add=20Dependabo?= =?UTF-8?q?t=20automation=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- .github/workflows/dependabot-automation.yml | 31 +++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/dependabot-automation.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb7fe6d..f03c15f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: run: npm run test:coverage - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} slug: m-tartari/m-tartari.github.io diff --git a/.github/workflows/dependabot-automation.yml b/.github/workflows/dependabot-automation.yml new file mode 100644 index 0000000..7eb8d25 --- /dev/null +++ b/.github/workflows/dependabot-automation.yml @@ -0,0 +1,31 @@ +name: Dependabot Automation +on: pull_request + +permissions: + pull-requests: write + contents: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'm-tartari/m-tartari.github.io' + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Enable auto-merge for Dependabot PRs + if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} From 59aa6176cb9b42906c9504a20c994f925553bfb6 Mon Sep 17 00:00:00 2001 From: m-tartari <37861893+m-tartari@users.noreply.github.com> Date: Tue, 18 Mar 2025 13:28:32 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=91=B7=20chore(CI):=20enable=20Depend?= =?UTF-8?q?abot=20auto-rebase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/dependabot.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8b9eff7..3b10c79 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,7 +7,6 @@ updates: timezone: 'Europe/Rome' interval: 'daily' open-pull-requests-limit: 10 - rebase-strategy: 'disabled' # Disable rebasing for npm pull requests commit-message: prefix: '⬆️ chore' include: 'scope'