From 27aa15150cc33d6eab8fd6510e02edbbbb4cb5a7 Mon Sep 17 00:00:00 2001 From: wuhuanzhou Date: Mon, 21 Dec 2020 19:16:16 +0800 Subject: [PATCH] Add approval for PR-CI-OP-benchmark (#29797) * Add approval for PR-CI-OP-benchmark, test=develop * dont show token in log, test=document_fix --- paddle/scripts/paddle_build.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 71df05912ee..59bf13ca392 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -1689,6 +1689,21 @@ function collect_ccache_hits() { function test_op_benchmark() { + # The PR will pass quickly when get approval from specific person. + # Xreki 12538138, luotao1 6836917, GaoWei8 53294385 + 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 [ "${approval_line}" != "" ]; then + APPROVALS=$(echo ${approval_line} | python ${PADDLE_ROOT}/tools/check_pr_approval.py 1 53294385 12538138 6836917) + echo "current pr ${GIT_PR_ID} got approvals: ${APPROVALS}" + if [ "${APPROVALS}" == "TRUE" ]; then + echo "===================================" + echo -e "\n current pr ${GIT_PR_ID} has got approvals. So, Pass CI directly!\n" + echo "===================================" + exit 0 + fi + fi + set -x bash ${PADDLE_ROOT}/tools/test_op_benchmark.sh } -- GitLab