File tree Expand file tree Collapse file tree 3 files changed +19
-15
lines changed
Expand file tree Collapse file tree 3 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 4949
5050# 构建评论内容
5151file_name = f"{ pr_number } .md"
52- file_url = f"https://gitee.com/XmacsLabs/moagn /blob/main /devel/{ file_name } "
52+ file_url = f"https://gitee.com/XmacsLabs/mogan /blob/{ source_branch } /devel/{ file_name } "
5353if doc_files :
5454 message_lines = [
5555 "[CI 自动评论]" ,
6767 elif flag != True :
6868 message_lines .append ("⚠️ 分支名和被修改的文档不匹配" )
6969 if len (doc_files ) > 1 :
70- message_lines .apeend ("⚠️ 注意此处修改了多个文档" )
70+ message_lines .append ("⚠️ 注意此处修改了多个文档" )
7171 message = "\n " .join (message_lines )
7272else :
7373 message_lines = [
8585
8686 message = "\n " .join (message_lines )
8787
88-
88+ print ( message )
8989
9090# 获取所有评论
9191existing_comments_url = f"{ api_base } /comments?access_token={ access_token } "
Original file line number Diff line number Diff line change 11version : ' 1.0'
2- name : ci_pr_comment
3- displayName : ci_pr_comment
2+ name : pr_comment
3+ displayName : pr_comment
44triggers :
55 trigger : auto
66 pr :
@@ -13,19 +13,17 @@ variables:
1313 - Comment_TOKEN
1414
1515stages :
16- - name : pr-comment
17- displayName : pr-comment
16+ - name : build_and_test
17+ displayName : build_and_test
1818 strategy : fast
1919 trigger : auto
2020 executor : []
2121 steps :
22- - step : execute@docker
23- name : pr-comment
24- displayName : 自动评论PR
25- certificate : ' '
26- image : docker.1ms.run/amd64/debian:bookworm
27- command :
28- - bash .workflow/aliyun_debian822_setup.sh
22+ - step : build@gcc
23+ name : build
24+ displayName : Build and Test
25+ gccVersion : ' 8.4'
26+ commands :
2927 - apt-get update
3028 - apt-get install -y python3 python3-requests
3129 - echo "开始执行 Python 自动评论脚本..."
@@ -35,3 +33,4 @@ stages:
3533 retry : ' 0'
3634 stepTimeout : 15
3735
36+
Original file line number Diff line number Diff line change 1- # [ 200_2 ] 添加自动PR评论修改文档的地址
1+ # [ 200_17 ] 添加自动PR评论修改文档的地址
22
33## 如何检测
44提交一个PR尝试即可
55
6+ ## 2025/07/29
7+
8+ ## What
9+ 因为Gitee的Docker源并不稳定,为保持pr稳定,修改为采用默认Ubuntu环境,并修改对应文件名以达到自动触发的目的。同时修改了对应py脚本,修复了语法问题。
10+
611## 2025/07/23
712
813### What
You can’t perform that action at this time.
0 commit comments