提交 90eac65f 编写于 作者: 木得感情的openEuler机器人 提交者: Gitee

add check

上级 50131b2f
......@@ -20,6 +20,14 @@ import subprocess
import gitee
def check_repository_changes():
lst_files = subprocess.getoutput("git diff --name-only remotes/origin/master..")
for item in lst_files.splitlines():
if item.startswith("repository/src-openeuler.yaml"):
return True
else:
return False
def check_repository_mgmt_changes():
lst_files = subprocess.getoutput("git diff --name-only remotes/origin/master..")
for item in lst_files.splitlines():
if item.startswith("sig/sigs.yaml"):
......@@ -56,13 +64,16 @@ def review(pr):
for sig in sigs:
review_body += "[ ] Do other maintainers of {sig} also agree to add/remove his/her as a maintainer ?\n".format(sig=sig)
review_body += " {sig} 中的其他维护者是否同意 增加/删除 维护者 ?\n".format(sig=sig)
if check_repository_changes():
if check_repository_mgmt_changes():
review_body += "Changes in sigs.yaml detected: \n"
review_body += "发现 sigs.yaml 变更: \n"
review_body += "[ ] Are all changed repositories managed by proper SIG ?\n"
review_body += " 是否所有变更的代码仓都被恰当的 SIG 管理 ?\n"
review_body += "[ ] Do all affected SIG maintainers agree the change ?\n"
review_body += " 是否所有受影响的 SIG 的维护者都同意这个变更 ?\n"
if check_repository_changes():
review_body += "[ ] Do newly introduced repository license compatible with openEuler ?\n"
review_body += " 新引入的代码仓的license授权是否都与 openEuler 兼容 ?\n"
return review_body
def main():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册