From 1dcf22a866bd48b742726621d6757143d46b1261 Mon Sep 17 00:00:00 2001 From: wuhuanzhou Date: Thu, 16 Sep 2021 10:26:46 +0800 Subject: [PATCH] fix pass quickly for PR-CI-OP-Benchmark, test=develop (#35753) --- tools/test_ci_op_benchmark.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/test_ci_op_benchmark.sh b/tools/test_ci_op_benchmark.sh index b76013e224..d60556a242 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) -- GitLab