2 Commits

Author SHA1 Message Date
  i-robot 679592cc24
!17989 [docs] [tools] modify ci_pipeline_gate_APIView 21 hours ago
  xuzhen a7b20c6a10 modify ci_pipeline_gate_APIView 23 hours ago
2 changed files with 3 additions and 7 deletions
Split View
  1. +0
    -4
      docs/mindspore/source_en/conf.py
  2. +3
    -3
      tools/ci_pipeline_gate_APIView/generate_pr_html.py

+ 0
- 4
docs/mindspore/source_en/conf.py View File

@@ -670,11 +670,7 @@ copy_image(src_dir, des_dir)
# copy RELEASENotes
src_release = os.path.join(repo_path, 'RELEASE.md')
des_release = "./RELEASE.md"
<<<<<<< HEAD
release_source = f'[![View Source On Gitee](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/{docs_branch}/resource/_static/logo_source_en.svg)](https://atomgit.com/mindspore/{copy_repo}/blob/{branch}/' + 'RELEASE.md)\n'
=======
release_source = f'[![View Source on AtomGit](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/{docs_branch}/resource/_static/logo_source_en.svg)](https://gitee.com/mindspore/{copy_repo}/blob/{branch}/' + 'RELEASE.md)\n'
>>>>>>> 2afcb0b0dc (update view source links)

with open(src_release, "r", encoding="utf-8") as f:
data = f.read()


+ 3
- 3
tools/ci_pipeline_gate_APIView/generate_pr_html.py View File

@@ -1252,14 +1252,14 @@ if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--pr_url', type=str, default="") # pr网址
parser.add_argument('--whl_path', type=str, default="") # 安装包地址
parser.add_argument('--atomgit_token', type=str, default="") # atomgit API访问令牌
args = parser.parse_args()

pr_url = args.pr_url
pr_whl_path = args.whl_path
atomgit_token = args.atomgit_token

# 获取Token
TOKEN = os.getenv("GITCODE_TOKEN")
headers = {"Private-Token": TOKEN} if TOKEN else {}
headers = {"Private-Token": atomgit_token} if atomgit_token else {}

# 参数处理(准备工作)
pr_info = re.match(r'https://(?:atomgit|gitcode)\.com/([^/]+)/([^/]+)/pull/(\d+)', pr_url)


Loading…
Cancel
Save
Baidu
map