add weekly report PR check workflows #11
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main works:
增加检查周报的导师点评的 workflows,可在 merge 前对周报 PR 进行检查。
判定规则:
对 pr 的 "Files Changed" 内容进行检查,如果 有以"[WeeklyReport]" 开头的文件,则认为其是 "周报文件"。如果该 pr 的 files changed 不包含"周报文件",则成功退出;如果包含"周报文件",则做进一步检查:检查是否存在 "### 导师点评"字段,如果不存在,失败退出;如果存在,则继续检查"### 导师点评"字段所在行下面的内容不为空或者不为"请联系导师填写",如果检查成功,则成功退出,否则失败退出
future works:
可以在 workflow 里加条件判断,如果 pr 包含了名为 "weekly reports" 的 label ,才进行进一步的检查。
进一步的,可以对不同类型的 pr 进行 workflows 的分发,以丰富 check 的内容