-
Notifications
You must be signed in to change notification settings - Fork 110
docs: Add organization-wide GitHub Copilot instructions #773
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
Conversation
|
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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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>
|
@copilot 几个地方要纠正:
|
Co-authored-by: zccrs <13449038+zccrs@users.noreply.github.com>
BLumia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只涉及提示词,可以试下效果。
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, Copilot, zccrs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Creates
.github/copilot-instructions.mdto provide organization-wide Copilot guidance for all linuxdeepin repositories.Requirements Implemented
File Structure
Implementation Details
References the existing treeland repository implementation, adapted for organization-wide use. The
.githubrepository automatically provides these defaults to all org repositories.Original prompt
Add Organization-wide GitHub Copilot Instructions
Objective / 目标
Create a
.github/copilot-instructions.mdfile in the linuxdeepin/.github repository to provide organization-wide instructions for GitHub Copilot across all repositories in the linuxdeepin organization.为 linuxdeepin/.github 仓库创建
.github/copilot-instructions.md文件,为 linuxdeepin 组织中的所有仓库提供组织级的 GitHub Copilot 指导。Requirements / 需求
1. Bilingual Code Review Comments / 双语代码审查评论
Copilot must provide all code review comments in both English and Chinese. Never use English only.
Copilot 必须提供所有代码审查评论的中英文双语版本。绝不能只使用英文。
Format example / 格式示例:
2. SPDX Copyright Header Validation / SPDX 版权头验证
When reviewing code changes, Copilot must automatically check SPDX copyright headers for proper date formatting.
在审查代码更改时,Copilot 必须自动检查 SPDX 版权头的日期格式是否正确。
Required Format / 所需格式:
// SPDX-FileCopyrightText: YYYY[-YYYY] UnionTech Software Technology Co., Ltd.Validation Rules / 验证规则:
For new files / 对于新文件:
// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.For modified files / 对于修改的文件:
If file was created in the same year as modification: single year format
如果文件在与修改相同的年份创建:单年份格式
// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.If file was created in an earlier year: year range format (YYYY-YYYY)
如果文件在更早的年份创建:年份范围格式 (YYYY-YYYY)
// SPDX-FileCopyrightText: 2023-2026 UnionTech Software Technology Co., Ltd.Important: Only use range format (YYYY-YYYY) when the years differ. If they are the same, use single year format.
重要: 只有当年份不同时才使用范围格式 (YYYY-YYYY)。如果年份相同,使用单年份格式。
Copilot must remind developers if:
Copilot 必须提醒开发者如果:
3. Bilingual Commit Message Format / 双语提交消息格式
All commit messages generated by Copilot must follow this bilingual format:
所有由 Copilot 生成的提交消息都必须遵循这个双语格式:
Commit Types / 提交类型:
feat: New feature (新功能)fix: Bug fix (问题修复)docs: Documentation changes (文档更改)style: Code style/formatting (代码风格/格式化)refactor: Code refactoring (代码重构)perf: Performance improvements (性能优化)test: Test additions/modifications (测试添加/修改)chore: Build/tooling changes (构建/工具变更)Reference Example / 参考示例:
Reference the example from linuxdeepin/treeland repository:
参考 linuxdeepin/treeland 仓库的示例:
Implementation Details / 实现细节
Create the file at path:
.github/copilot-instructions.mdInclude clear sections for each requirement
Add examples and formatting templates
Explain that these are organization-wide defaults that can be supplemented by repository-specific instructions
Use proper markdown formatting
Include SPDX license identifier appropriate for the repository (check existing files for consistency)
在路径
.github/copilot-instructions.md创建文件为每个需求包含清晰的部分
添加示例和格式模板
说明这些是组织级默认设置,可以由特定仓库的指令补充
使用正确的 markdown 格式
包含适合该仓库的 SPDX 许可证标识符(检查现有文件以保持一致性)
Context / 背景
This is...
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.