Label based on file paths
Here's an example of a Revy configuration that label pull requests that contain changes to a certain filepath.
apiVersion: reviewpad.com/v0.0.4
labels:
critical:
description: critical changes
# color is the hexadecimal color code for the label, without the leading #.
color: fd5e53
rules:
changesMainFile:
kind: patch
description: Patch contains changes to the main file
spec: $hasFileName("go/main.go")
protectionGates:
- name: critical
description: Modifications of critical code require careful review
patchRules:
- rule: changesMainFile
actions:
- $addLabel("critical")
Updated 29 days ago
Did this page help you?