Skip to content

Commit 9b280ee

Browse files
committed
build: merge-pr new checks that all requested changes have been addressed (#21817)
PR Close #21817
1 parent d4a9db2 commit 9b280ee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/github/merge-pr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PULL_JSON=`curl -s https://api.github.com/repos/angular/angular/pulls/$PR_NUMBER
4343
PR_SHA_COUNT=`node $BASEDIR/utils/json_extract.js commits <<< """$PULL_JSON"""`
4444
STATUS_JSON_URL=`node $BASEDIR/utils/json_extract.js _links.statuses.href <<< """$PULL_JSON"""`
4545
STATUS=`curl -s $STATUS_JSON_URL | node $BASEDIR/utils/json_extract.js description | cut -d '|' -f1`
46+
MERGE_STATUS=`curl -s https://api.github.com/repos/angular/angular/pulls/$PR_NUMBER/reviews | node ./scripts/github/utils/json_extract.js state`
4647
PR_LABELS=`curl -s https://api.github.com/repos/angular/angular/issues/$PR_NUMBER/labels`
4748
PR_ACTION=`echo "$PR_LABELS" | node $BASEDIR/utils/json_extract.js "name=^PR action:"`
4849
PR_TARGET=`echo "$PR_LABELS" | node $BASEDIR/utils/json_extract.js "name=^PR target:"`
@@ -60,6 +61,11 @@ if [[ "$PR_CLA" != "cla: yes" ]]; then
6061
exit 1
6162
fi
6263

64+
if [[ $MERGE_STATUS == *CHANGES_REQUESTED* ]]; then
65+
echo The PR $PR_NUMBER has not been approved by all reviewers. Ask PR owner to obtain reviews or dismiss reviews and document the dismissal reason.
66+
exit 1
67+
fi
68+
6369
if [[ "$STATUS" != "All checks passed!" ]]; then
6470
echo PR $PR_NUMBER is failing with: $STATUS
6571
if [[ $FORCE == 1 ]]; then

0 commit comments

Comments
 (0)