Skip to content

Commit 665d852

Browse files
feat: add support for require_last_push_approval boolean (#12)
1 parent d864579 commit 665d852

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

branch-rules.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@
7575
data['required_pull_request_reviews']['required_approving_review_count'] = inputconfig['Required approvals count']
7676
else:
7777
data['required_pull_request_reviews']['required_approving_review_count'] = 0
78+
if inputconfig['Require last push approval'] == True:
79+
data['required_pull_request_reviews']['require_last_push_approval'] = True
80+
else:
81+
data['required_pull_request_reviews']['require_last_push_approval'] = False
7882
data['required_pull_request_reviews']['bypass_pull_request_allowances'] = {}
7983
data['required_pull_request_reviews']['bypass_pull_request_allowances']['users'] = []
8084
data['required_pull_request_reviews']['bypass_pull_request_allowances']['teams'] = []

example.config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"data": {
66
"Require a pull request before merging": false,
77
"Required approvals count": 0,
8+
"Require last push approval": false,
89
"Dismiss stale pull request approvals when new commits are pushed": false,
910
"Require review from Code Owners": false,
1011
"Restrict who can dismiss pull request reviews": [

0 commit comments

Comments
 (0)