diff --git a/tools/test_ci_op_benchmark.sh b/tools/test_ci_op_benchmark.sh index b76013e224f0870114e9256cdcf88e8e11de6287..d60556a242d9a4f3dbae449f4f95f8701592057b 100644 --- a/tools/test_ci_op_benchmark.sh +++ b/tools/test_ci_op_benchmark.sh @@ -316,6 +316,21 @@ function gpu_op_benchmark { exit 0 } +# The PR will pass quickly when get approval from specific person. +# Xreki 12538138, luotao1 6836917, Avin0323 16167147 +set +x +approval_line=$(curl -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/PaddlePaddle/Paddle/pulls/${GIT_PR_ID}/reviews?per_page=10000) +if [ -n "${approval_line}" ]; then + APPROVALS=$(echo ${approval_line} | python ${PADDLE_ROOT}/tools/check_pr_approval.py 1 16167147 12538138 6836917) + LOG "[INFO] current pr ${GIT_PR_ID} got approvals: ${APPROVALS}" + if [ "${APPROVALS}" == "TRUE" ]; then + LOG "[INFO] ===================================" + LOG "[INFO] current pr ${GIT_PR_ID} has got approvals. So, Pass CI directly!" + LOG "[INFO] ===================================" + exit 0 + fi +fi +set -x case $1 in cpu_op_benchmark)