Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CheckPRTemplate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Check PR Template

on:
pull_request:
branches: [develop]
branches: [develop, release/**]
types: [opened, synchronize, reopened, edited]

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Codestyle-Check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Codestyle-Check

on:
pull_request:
branches: ["develop"]
branches: [develop, release/**]

jobs:
check-bypass:
Expand Down
10 changes: 5 additions & 5 deletions tools/CheckPRTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
REPO_TEMPLATE = {
"Paddle": r'''### PR Category(.*[^\s].*)### PR Types(.*[^\s].*)### Description(.*[^\s].*)### 是否引起精度变化(.*[^\s].*)'''
}
elif BRANCH.startswith("fleety_"):
elif BRANCH.startswith("release"):
REPO_TEMPLATE = {
"Paddle": r'''### PR Category(.*[^\s].*)### PR Types(.*[^\s].*)### Description(.*?devPR:https://github\.com/PaddlePaddle/Paddle/pull/.*?)(?:\n###|\Z)'''
}
Expand Down Expand Up @@ -109,13 +109,13 @@ def parameter_accuracy(body):
single_mess += f'{i}.'
if len(single_mess) != 0:
message += f'{key} should be in {test_list}. but now is [{single_mess}].'
if BRANCH.startswith("fleety_"):
if BRANCH.startswith("release"):
PR_dic['Description'] = body[changes_end + len('### Description') :]
des_pr_id = extract_pr_links(PR_dic['Description'])
if len(des_pr_id) == 0 or not check_link_accessible(
"https://github.com/PaddlePaddle/Paddle/pull/" + str(des_pr_id[0])
):
message += 'The PR link does not exist. To merge into the fleety branch, you need to merge into the develop branch first and then cherry-pick it to the fleety branch. Please merge into develop first and fill in the PR link in the Description'
message += 'The PR link does not exist. To merge into the release branch, you need to merge into the develop branch first and then cherry-pick it to the release branch. Please merge into develop first and fill in the PR link in the Description. Use this format: devPR:https://github.com/PaddlePaddle/Paddle/pull/xxxx'

if BRANCH.startswith("develop"):
accuracy_start = body.find('### 是否引起精度变化')
Expand Down Expand Up @@ -277,8 +277,8 @@ def checkPRTemplate(repo, body, CHECK_TEMPLATE):
elif result is None:
res = False
message = parameter_accuracy(body)
if BRANCH.startswith("fleety_") and len(message) == 0:
message = 'The PR link does not exist. To merge into the fleety branch, you need to merge into the develop branch first and then cherry-pick it to the fleety branch. Please merge into develop first and fill in the PR link in the Description'
if BRANCH.startswith("release") and len(message) == 0:
message = 'The PR link does not exist. To merge into the release branch, you need to merge into the develop branch first and then cherry-pick it to the release branch. Please merge into develop first and fill in the PR link in the Description. Use this format: devPR:https://github.com/PaddlePaddle/Paddle/pull/xxxx'
return res, message


Expand Down
Loading