diff --git a/.github/workflows/delete_old_runs.yml b/.github/workflows/delete_old_runs.yml index 5fabda8..86a721b 100644 --- a/.github/workflows/delete_old_runs.yml +++ b/.github/workflows/delete_old_runs.yml @@ -63,12 +63,13 @@ jobs: GITHUB_RUN_NUMBER: ${{ github.run_number }} GITHUB_RUN_ID: ${{ github.run_id }} run: | + # 运行主程序 # 判断 GITHUB_TOKEN 是否存在,如果不存在就退出 if [ -z "$GITHUB_TOKEN" ]; then exit 0 fi - # 运行主程序 + # 获取北京时间 export BEIJING_TIME="$(TZ='Asia/Shanghai' date +'%Y-%m-%d %H:%M:%S:%3N')" echo "BEIJING_TIME=$BEIJING_TIME" >> $GITHUB_OUTPUT @@ -108,6 +109,7 @@ jobs: echo "Author's Repository URL: https://github.com/NianBroken/ZFCheckScores/" echo "------" + # 运行主程序 python scripts/delete_old_runs.py - name: Delete __pycache__ folder diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b0c92e6..64f8738 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -137,6 +137,7 @@ jobs: echo "${first}${middle}${last}" # 组合首字符、中间部分的 '*' 和尾字符,并输出结果 fi } + # 定义 anonymize_domain 函数,接收一个 URL 作为输入参数 anonymize_domain() { local url=$1 # 获取输入参数并赋值给局部变量 url @@ -180,6 +181,7 @@ jobs: echo "Author's Repository URL: https://github.com/NianBroken/ZFCheckScores/" echo "------" + # 运行主程序 python main.py - name: Delete __pycache__ folder diff --git a/scripts/get_selected_courses.py b/scripts/get_selected_courses.py index ba39005..4d1f0ba 100644 --- a/scripts/get_selected_courses.py +++ b/scripts/get_selected_courses.py @@ -65,4 +65,4 @@ def get_selected_courses(student_client): except Exception: print(traceback.format_exc()) - return "------\n获取未公布成绩的课程时出错" + return "------\n未公布成绩的课程:\n获取未公布成绩的课程时出错" diff --git a/scripts/get_user_info.py b/scripts/get_user_info.py index a99d07f..432e5df 100644 --- a/scripts/get_user_info.py +++ b/scripts/get_user_info.py @@ -30,4 +30,4 @@ def get_user_info(student_client, output_type="none"): except Exception: print(traceback.format_exc()) - return "获取个人信息时出错" + return "个人信息:\n获取个人信息时出错"