Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add weekly report PR check workflows #11

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

MarioLulab
Copy link
Collaborator

@MarioLulab MarioLulab commented Oct 8, 2023

Main works:

增加检查周报的导师点评的 workflows,可在 merge 前对周报 PR 进行检查。
判定规则:
对 pr 的 "Files Changed" 内容进行检查,如果 有以"[WeeklyReport]" 开头的文件,则认为其是 "周报文件"。如果该 pr 的 files changed 不包含"周报文件",则成功退出;如果包含"周报文件",则做进一步检查:检查是否存在 "### 导师点评"字段,如果不存在,失败退出;如果存在,则继续检查"### 导师点评"字段所在行下面的内容不为空或者不为"请联系导师填写",如果检查成功,则成功退出,否则失败退出

future works:

可以在 workflow 里加条件判断,如果 pr 包含了名为 "weekly reports" 的 label ,才进行进一步的检查。
进一步的,可以对不同类型的 pr 进行 workflows 的分发,以丰富 check 的内容

@MarioLulab MarioLulab added the enhancement New feature or request label Oct 8, 2023
@MarioLulab MarioLulab requested a review from Ligoml October 8, 2023 12:18
@MarioLulab MarioLulab self-assigned this Oct 8, 2023

- name: Check Weekly Report
run: |
DEFAULT_VALUE="待填写"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c5df4e79b8e47f1bd4041625f4a741d0

周报模板中的DEFAULT_VALUE好像不是"待填写"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

收到。我统一了以下两处的 DEFAULT_VALUE 为 "请联系导师填写" :

  1. 周报提交指南issue
  2. ./WeeklyReports/ 文件下的 readme 文档

replace "待填写" with "请联系导师填写"
Copy link
Contributor

@Ligoml Ligoml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Ligoml Ligoml merged commit d7a7ed3 into PFCCLab:main Oct 9, 2023
@MarioLulab MarioLulab deleted the luqi/add_weeklyreport_pr_check branch November 7, 2023 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants