Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Automated request for reviews of pull request #50991

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/request-reviews.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Assign reviews

on:
pull_request:
types: [opened, reopened, ready_for_review]

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"
Loading