Skip to content

Commit 0f9b0fe

Browse files
Avin0323AnnaTrainingG
authored andcommitted
fix pass quickly for PR-CI-OP-Benchmark, test=develop (PaddlePaddle#35753)
1 parent b41628c commit 0f9b0fe

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tools/test_ci_op_benchmark.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,21 @@ function gpu_op_benchmark {
316316
exit 0
317317
}
318318

319+
# The PR will pass quickly when get approval from specific person.
320+
# Xreki 12538138, luotao1 6836917, Avin0323 16167147
321+
set +x
322+
approval_line=$(curl -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/PaddlePaddle/Paddle/pulls/${GIT_PR_ID}/reviews?per_page=10000)
323+
if [ -n "${approval_line}" ]; then
324+
APPROVALS=$(echo ${approval_line} | python ${PADDLE_ROOT}/tools/check_pr_approval.py 1 16167147 12538138 6836917)
325+
LOG "[INFO] current pr ${GIT_PR_ID} got approvals: ${APPROVALS}"
326+
if [ "${APPROVALS}" == "TRUE" ]; then
327+
LOG "[INFO] ==================================="
328+
LOG "[INFO] current pr ${GIT_PR_ID} has got approvals. So, Pass CI directly!"
329+
LOG "[INFO] ==================================="
330+
exit 0
331+
fi
332+
fi
333+
set -x
319334

320335
case $1 in
321336
cpu_op_benchmark)

0 commit comments

Comments
 (0)