@@ -469,18 +469,21 @@ function assert_api_spec_approvals() {
469
469
BRANCH=" develop"
470
470
fi
471
471
472
- API_CHANGE=` git diff --name-only upstream/$BRANCH | grep " paddle/fluid/API.spec" || true`
473
- echo " checking API.spec change, PR: ${GIT_PR_ID} , changes: ${API_CHANGE} "
474
- if [ ${API_CHANGE} ] && [ " ${GIT_PR_ID} " != " " ]; then
475
- # NOTE: per_page=10000 should be ok for all cases, a PR review > 10000 is not human readable.
476
- APPROVALS=` curl -H " Authorization: token ${GITHUB_API_TOKEN} " https://api.github.com/repos/PaddlePaddle/Paddle/pulls/${GIT_PR_ID} /reviews? per_page=10000 | \
477
- python ${PADDLE_ROOT} /tools/check_pr_approval.py 2 7845005 2887803 728699 13348433`
478
- echo " current pr ${GIT_PR_ID} got approvals: ${APPROVALS} "
479
- if [ " ${APPROVALS} " == " FALSE" ]; then
480
- echo " You must have at least 2 approvals for the api change!"
481
- exit 1
482
- fi
483
- fi
472
+ API_FILES=(' paddle/fluid/API.spec' ' paddle/fluid/framework/operator.h' )
473
+ for API_FILE in ${API_FILES} ; do
474
+ API_CHANGE=` git diff --name-only upstream/$BRANCH | grep " ${API_FILE} " || true`
475
+ echo " checking ${API_FILE} change, PR: ${GIT_PR_ID} , changes: ${API_CHANGE} "
476
+ if [ ${API_CHANGE} ] && [ " ${GIT_PR_ID} " != " " ]; then
477
+ # NOTE: per_page=10000 should be ok for all cases, a PR review > 10000 is not human readable.
478
+ APPROVALS=` curl -H " Authorization: token ${GITHUB_API_TOKEN} " https://api.github.com/repos/PaddlePaddle/Paddle/pulls/${GIT_PR_ID} /reviews? per_page=10000 | \
479
+ python ${PADDLE_ROOT} /tools/check_pr_approval.py 2 7845005 2887803 728699 13348433`
480
+ echo " current pr ${GIT_PR_ID} got approvals: ${APPROVALS} "
481
+ if [ " ${APPROVALS} " == " FALSE" ]; then
482
+ echo " You must have at least 2 approvals for the api change! ${API_FILE} "
483
+ exit 1
484
+ fi
485
+ fi
486
+ done
484
487
}
485
488
486
489
0 commit comments