Skip to main content
Version: 3.10.0

Label based on file paths

Here's an example of a reviewpad.yml configuration that labels pull requests that contain changes to a certain filepath.

api-version: reviewpad.com/v3.x

labels:
critical:
description: Critical changes
# color is the hexadecimal color code for the label, without the leading #.
color: fd5e53

rules:
- name: changes-main-file
kind: patch
description: Patch contains changes to the main file
spec: '$hasFileName("go/main.go")'

workflows:
- name: critical
description: Modifications of critical code require careful review
if:
- rule: changes-main-file
then:
- '$addLabel("critical")'