Skip to content

Commit

Permalink
fix pass quickly for PR-CI-OP-Benchmark, test=develop (#35753)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avin0323 committed Sep 16, 2021
1 parent 554771d commit 1dcf22a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/test_ci_op_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1dcf22a

Please sign in to comment.