Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

Implementation Plan for SPDX Header Check Workflow

  • Create .github/workflows/spdx-check.yml file with the required configuration
  • Verify the workflow file follows YAML conventions used in the repository
  • Ensure workflow triggers on pull requests to main branch
  • Configure the workflow to use zccrs/github-actions-spdx-checker@main action
  • Set up proper exclusion patterns for vendor, node_modules, and 3rdparty directories
  • Test the workflow file for syntax correctness
  • Add checkout step for repository code access
  • Add explicit permissions for GITHUB_TOKEN security
  • Add event types filter for efficiency (opened, synchronize)
  • Review and finalize the implementation
Original prompt

Add SPDX Header Check Workflow

Overview

需要在 .github/workflows/ 目录下创建一个新的 GitHub Actions 工作流文件,用于自动检查 Pull Request 中文件的 SPDX 版权头部。

Requirements

创建文件

创建文件:.github/workflows/spdx-check.yml

文件内容

name: SPDX Header Check

on:
  pull_request:
    branches: [main]

jobs:
  spdx-check:
    runs-on: ubuntu-latest
    steps:
      - uses: zccrs/github-actions-spdx-checker@main
        with:
          base: origin/main
          exclude: 'vendor/**,node_modules/**,3rdparty/**'

工作流功能

  • 当有 PR 提交到 main 分支时自动触发
  • 使用 zccrs/github-actions-spdx-checker@main action 检查 SPDX 头部
  • 不限制文件类型,检查所有支持的文件
  • 自动排除 vendor、node_modules 和 3rdparty 目录
  • 验证新文件包含当前年份的 SPDX 头部
  • 确保修改文件正确更新年份范围

预期结果

  • 所有后续的 Pull Request 都会自动进行 SPDX 头部检查
  • 不符合规范的文件会导致检查失败
  • 提供中英文双语错误提示

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@deepin-ci-robot
Copy link
Contributor

Hi @Copilot. Thanks for your PR.

I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Co-authored-by: zccrs <13449038+zccrs@users.noreply.github.com>
@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Copilot

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copilot AI and others added 3 commits January 16, 2026 08:20
Co-authored-by: zccrs <13449038+zccrs@users.noreply.github.com>
Co-authored-by: zccrs <13449038+zccrs@users.noreply.github.com>
Co-authored-by: zccrs <13449038+zccrs@users.noreply.github.com>
@zccrs zccrs closed this Jan 16, 2026
Copilot AI requested a review from zccrs January 16, 2026 08:26
Copilot stopped work on behalf of zccrs due to an error January 16, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants