From c9c0070582ec70d14ce61de88612f56ed8a085aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Mon, 26 Oct 2026 14:37:05 +0000 Subject: [PATCH] ci: suggest reviewers based on git blame --- .github/workflows/auto-assign-reviewers.yml | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/auto-assign-reviewers.yml diff --git a/.github/workflows/auto-assign-reviewers.yml b/.github/workflows/auto-assign-reviewers.yml new file mode 100644 index 00000000..8e87561f --- /dev/null +++ b/.github/workflows/auto-assign-reviewers.yml @@ -0,0 +1,29 @@ +name: Auto Assign Reviewers + +# Use a writable token for suggestion comments, including on fork PRs. +on: + pull_request_target: + types: [opened, synchronize] + +permissions: + contents: read + pull-requests: write + +jobs: + assign-reviewers: + runs-on: ubuntu-latest + + steps: + # Only check out trusted base code: this job holds a writable token. + # The action reads changed lines from the pull request files API. + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.event.pull_request.base.sha }} + fetch-depth: 0 # Required for git blame + persist-credentials: false + + - uses: cachix/git-blame-auto-reviewer@2d112d9bbd60c4feaf2b55e94a058e0e397ab0e0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + max-reviewers: 3 + threshold: 20