-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add reviewpad configuration (#322)
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
rules: | ||
- name: Open PR state | ||
spec: '!$isDraft() && $getState() == "open"' | ||
|
||
- name: First run state | ||
spec: $getEventType() == "opened" && $rule("Open PR state") | ||
|
||
workflows: | ||
- name: Assign author | ||
run: | ||
- if: $rule("First run state") | ||
then: $addAssignees([$getAuthor()]) | ||
|
||
- name: Request review from maintainers | ||
run: | ||
- if: $rule("First run state") | ||
then: $addReviewers($getTeamMembers("atomic-23/24")) | ||
|
||
- name: Base message and summary | ||
run: | ||
- if: $rule("First run state") | ||
then: | ||
- if: $countUserPullRequests($getAuthor()) == 1 | ||
then: $info("Thanks for your first contribution!") | ||
else: $info("Thanks for your contribution!") | ||
- $warn("Please make sure the CI is green before merging.") | ||
- $summarize() | ||
|
||
- name: Enforce conventional commits | ||
run: | ||
- if: $rule("Open PR state") | ||
then: $titleLint() | ||
|
||
- name: Enforce head branch deletion | ||
always-run: true | ||
run: $deleteHeadBranch() |