Skip to content

fix: update pull request template for clarity and formatting#44

Merged
chenyme merged 2 commits intolinux-do:masterfrom
OrenZhang:feat_pr_check
Jul 3, 2025
Merged

fix: update pull request template for clarity and formatting#44
chenyme merged 2 commits intolinux-do:masterfrom
OrenZhang:feat_pr_check

Conversation

@OrenZhang
Copy link
Copy Markdown
Contributor

@OrenZhang OrenZhang commented Jul 3, 2025

例行检查

  • 我已阅读并理解 贡献者公约
  • 我已阅读并同意 贡献者许可协议 (CLA),确认我的贡献将根据项目的 MIT 许可证进行许可,
  • 我知晓如果此 PR 并不做出实质性更改,或可被认为是为了PR被合并而提交PR的,则可能不会被合并,

变更内容

增加对于 PR 内容的检查 Workflow

变更原因

@OrenZhang OrenZhang requested review from chenyme and Copilot July 3, 2025 09:26
@OrenZhang OrenZhang self-assigned this Jul 3, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a GitHub Actions workflow to ensure all pull request template checklist items are checked before merging.

  • Introduce new pr-template-check.yml workflow triggered on PR opened/edited/synchronize
  • Uses actions/github-script@v7 to scan the PR body for checklist items
  • Fails the workflow if any checklist items remain unchecked
Comments suppressed due to low confidence (2)

.github/workflows/pr-template-check.yml:21

  • The workflow passes if no checklist items are present. Consider failing the job when matches.length === 0 to enforce inclusion of the checklist section in the PR body.
            const matches = prBody.match(checklistRegex) || [];

.github/workflows/pr-template-check.yml:20

  • [nitpick] The current regex only matches checklist items at the start of the line. To handle indented lists or nested sections, you could allow optional leading whitespace: /^\s*- \[( |x|X)\] .+$/gm.
            const checklistRegex = /^- \[( |x|X)\] .+$/gm;

Copy link
Copy Markdown
Collaborator

@TethysPlex TethysPlex left a comment

Choose a reason for hiding this comment

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

LGTM

@chenyme chenyme merged commit 58edd1c into linux-do:master Jul 3, 2025
9 of 10 checks passed
@OrenZhang OrenZhang deleted the feat_pr_check branch July 3, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants