Skip to content

chore(pre-commit): update configuration and remove isort #10

chore(pre-commit): update configuration and remove isort

chore(pre-commit): update configuration and remove isort #10

name: Dependabot Automation
on:
pull_request:
types: [opened, reopened, synchronize]
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'zoola969/cachium'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
if: >-
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
steps.metadata.outputs.update-type == 'version-update:semver-minor' ||
steps.metadata.outputs.update-type == 'security-update:semver-patch' ||
steps.metadata.outputs.update-type == 'security-update:semver-minor'
run: gh pr review --approve "$PR_URL"
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' ||
steps.metadata.outputs.update-type == 'security-update:semver-patch' ||
steps.metadata.outputs.update-type == 'security-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 }}
pre-commit-ci:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' && github.repository == 'zoola969/cachium'
steps:
- name: Approve pre-commit.ci autoupdate PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge for pre-commit.ci PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}