aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-02-24 09:12:55 +0100
committerJoas Schilling <coding@schilljs.com>2025-02-28 08:45:53 +0100
commit4c9948422b768ea6fe3f4fc1326e8c1a859367ad (patch)
tree2aab1578fa035d0712e33ab45cb95c2289ae3408
parentc1204c06704a97a5bfaa4bb41f4428ea873c6031 (diff)
downloadnextcloud-server-4c9948422b768ea6fe3f4fc1326e8c1a859367ad.tar.gz
nextcloud-server-4c9948422b768ea6fe3f4fc1326e8c1a859367ad.zip
chore: Automated request for reviews of pull requestchore/request-reviews
Ensure that every PR we receive gets the correct reviewers assigned. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r--.github/workflows/request-reviews.yml78
1 files changed, 78 insertions, 0 deletions
diff --git a/.github/workflows/request-reviews.yml b/.github/workflows/request-reviews.yml
new file mode 100644
index 00000000000..edc92c7196e
--- /dev/null
+++ b/.github/workflows/request-reviews.yml
@@ -0,0 +1,78 @@
+# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+# SPDX-License-Identifier: MIT
+
+name: Assign reviews
+
+on:
+ pull_request:
+ types: [opened, reopened, ready_for_review]
+
+permissions:
+ contents: read
+
+jobs:
+ changes:
+ runs-on: ubuntu-latest-low
+
+ outputs:
+ backend: ${{ steps.changes.outputs.backend }}
+ frontend: ${{ steps.changes.outputs.frontend }}
+
+ steps:
+ - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
+ id: changes
+ continue-on-error: true
+ with:
+ filters: |
+ backend:
+ - '3rdparty/**'
+ - '**/appinfo/**'
+ - '**/lib/**'
+ - '**/templates/**'
+ - '.php-cs-fixer.dist.php'
+ - 'composer.json'
+ - 'psalm*'
+ - 'build/psalm*'
+ - '**.php'
+ frontend:
+ - 'apps/*/src/**'
+ - 'core/src/**'
+ - 'tsconfig.json'
+ - '**.js'
+ - '**.ts'
+ - '**.vue'
+
+ assign-reviews:
+ name: Assign reviews
+ runs-on: ubuntu-latest-low
+
+ needs: changes
+ # Only if there are not already reviews requested
+ if: github.event.pull_request.requested_reviewers[1] == null
+
+ permissions:
+ pull-requests: write
+
+ steps:
+ - name: Assign backend engineers
+ if: needs.changes.outputs.backend == 'true'
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ gh api \
+ --method POST \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ '/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers' \
+ -f "team_reviewers[]=nextcloud/server-backend"
+ - name: Assign frontend engineers
+ if: needs.changes.outputs.frontend == 'true'
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ gh api \
+ --method POST \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ '/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers' \
+ -f "team_reviewers[]=nextcloud/server-frontend"