Add conditions to check for core-contributors in merge PR script

Signed-off-by: Dmitry Novotochinov <trybeee@gmail.com>
This commit is contained in:
Sebastian Delgado 2018-01-26 20:06:10 -05:00 committed by Dmitry Novotochinov
parent 74f9ea32a3
commit 92c83f6579
No known key found for this signature in database
GPG Key ID: 267674DCC86628D9
1 changed files with 3 additions and 1 deletions

View File

@ -53,7 +53,9 @@ get_pr_info() {
if [[ $(echo "$pr_info" | jq -r .state) == closed ]]; then
fatal "PR $pr is closed, will not merge"
fi
if [[ $(echo "$pr_info" | jq -r .maintainer_can_modify) == true ]]; then
if [[ ($(echo "$pr_info" | jq -r .maintainer_can_modify) == true) ||\
($(echo "$pr_info" | jq -r .author_association) == MEMBER) ||\
($(echo "$pr_info" | jq -r .author_association) == OWNER)]]; then
RW_PR_REPO=1
else
warn "PR does not allow 'edits from maintainers', so it will be kept open"