diff --git a/reviewpad.yml b/reviewpad.yml index 8483479db..6b153b445 100644 --- a/reviewpad.yml +++ b/reviewpad.yml @@ -1,13 +1,22 @@ +rules: + - name: Open PR state + spec: '!$isDraft() && $getState() == "open"' + + - name First run state + spec: '$getEventType == "opened" && $rule("Open PR state)' + workflows: - name: Request review from maintainers run: - - if: "!$isDraft() && $getEventType() == 'opened' && $getState() == 'open'" + - if: $rule("First run state") then: $addReviewers($getTeamMembers("atomic-23/24")) - name: Base message and summary run: - - if: $countUserPullRequests($getAuthor()) == 1 - then: $info("Thanks for your first contribution!") + - $info("Thanks for your contribution!") - $warn("Please make sure the CI is green before merging.") - - if: "!$isDraft() && $getEventType() == 'opened' && $getState() == 'open'" + - if: $rule("Open PR state") then: $summarize() + + - name: Enforce head branch deletion + run: $deleteHeadBranch()