From af093ac59bb39e7c0c32d3b61a77a23691395a97 Mon Sep 17 00:00:00 2001 From: Alexander Dmitriev Date: Wed, 1 Apr 2026 17:29:24 +0400 Subject: [PATCH] feat: add CODEOWNERS file and Dependabot automation workflow --- .github/CODEOWNERS | 1 + .github/workflows/bot-automation.yml | 22 -------------- .github/workflows/dependabot-automation.yml | 32 +++++++++++++++++++++ 3 files changed, 33 insertions(+), 22 deletions(-) create mode 100644 .github/CODEOWNERS delete mode 100644 .github/workflows/bot-automation.yml create mode 100644 .github/workflows/dependabot-automation.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..608a7ab --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @zoola969 diff --git a/.github/workflows/bot-automation.yml b/.github/workflows/bot-automation.yml deleted file mode 100644 index 1717007..0000000 --- a/.github/workflows/bot-automation.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Bot Automation - -on: - pull_request: - types: [opened, reopened, synchronize] - -jobs: - automation: - runs-on: ubuntu-latest - if: (github.actor == 'dependabot[bot]' || github.actor == 'pre-commit-ci[bot]') - permissions: - pull-requests: write - contents: write - steps: - - uses: hmarr/auto-approve-action@v4 - with: - github-token: ${{ secrets.APPROVE_PAT }} - - name: Enable auto-merge - run: gh pr merge --auto --squash "$PR_URL" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dependabot-automation.yml b/.github/workflows/dependabot-automation.yml new file mode 100644 index 0000000..fe5078b --- /dev/null +++ b/.github/workflows/dependabot-automation.yml @@ -0,0 +1,32 @@ +name: Dependabot Automation + +on: + pull_request: + types: [opened, reopened, synchronize] + +permissions: + pull-requests: write + contents: write + +jobs: + automation: + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'zoola969/kb-chatbot' + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - name: Approve a 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 Dependabot PRs + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}}