Skip to content

feat: add CODEOWNERS file and Dependabot automation workflow #1

feat: add CODEOWNERS file and Dependabot automation workflow

feat: add CODEOWNERS file and Dependabot automation workflow #1

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}}