Merge or Rebase a Pull Request Under Specific Conditions
Automatically Merge or Rebase if the PR isn't critical or follow the review process
Automatically merge the Pull Request if the patch contains files with a comment of the form// reviewpad-an: critical
and the changes were approved by two core members, or automatically rebase if the patch contains .md files and there is no comment of the form // reviewpad-an: critical
.labels:
ship:
description: Ship mode
color: 76dbbe
groups:
- name: ignore-patterns
spec: '["*.lock", "generated/**"]'
workflows:
- name: auto-merge-policy
run:
if: $hasAnnotation("critical") && $hasRequiredApprovals(2, $team("core"))
then: $merge()
else:
if: $hasAnnotation("critical") == false || $hasFileExtensions([".md"])
then:
- $addLabel("ship")
- $merge("rebase")