Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## 变更说明 / Description



## 测试方式 / Test Plan



## 检查清单 / Checklist

- [ ] 我已阅读并同意 [贡献者许可协议 (CLA)](https://github.com/desirecore/docs/blob/main/CLA.md) / I have read and agree to the [Contributor License Agreement (CLA)](https://github.com/desirecore/docs/blob/main/CLA.md)
47 changes: 47 additions & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "CLA Check"
on:
pull_request_target:
types: [opened, edited, synchronize]

permissions:
pull-requests: read

jobs:
cla-check:
runs-on: ubuntu-latest
steps:
- name: Check CLA agreement
uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request;

// Skip bot accounts
const botList = ['dependabot[bot]', 'renovate[bot]', 'github-actions[bot]'];
if (botList.includes(pr.user.login)) {
console.log(`Skipping CLA check for bot: ${pr.user.login}`);
return;
}

// Skip internal contributors (org owners, members, collaborators).
// CLA is only required for external contributors (CONTRIBUTOR / FIRST_TIME_CONTRIBUTOR / FIRST_TIMER / NONE).
const internalAssociations = ['OWNER', 'MEMBER', 'COLLABORATOR'];
if (internalAssociations.includes(pr.author_association)) {
console.log(`Skipping CLA check for internal contributor: ${pr.user.login} (${pr.author_association})`);
return;
}

const body = pr.body || '';
const claChecked =
body.includes('[x] 我已阅读并同意 [贡献者许可协议 (CLA)]') ||
body.includes('[x] I have read and agree to the [Contributor License Agreement (CLA)]');
Comment on lines +35 to +37

if (!claChecked) {
core.setFailed(
'❌ CLA 检查未通过 / CLA check failed\n\n' +
'请在 PR 描述中勾选「我已阅读并同意贡献者许可协议 (CLA)」后再提交。\n' +
'Please check the "I have read and agree to the Contributor License Agreement (CLA)" checkbox in the PR description before submitting.\n\n' +
'如果 PR 描述中没有该选项,请使用仓库的 PR 模板重新创建。\n' +
'If the checkbox is missing, please recreate the PR using the repository PR template.'
);
}
47 changes: 47 additions & 0 deletions CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributor License Agreement (CLA)

## 贡献者许可协议

感谢你对 DesireCore 的贡献!为了确保项目能够在当前及未来的许可模式下持续运营,
所有向本项目提交 Pull Request 的贡献者需同意以下条款。

**提交 Pull Request 即视为同意本协议。**

---

### 1. 权利授予

你在此不可撤销地授予 **云南日冕科技有限公司**(Yunnan Solar Corona Technology Co., Ltd.)
及其继承人和受让人,对你提交的全部贡献内容(包括代码、文档、设计及其他材料):

- 使用、复制、修改、展示、分发、再许可及以其他方式利用的永久性、全球性、免版税、
非独占的权利
- 将贡献内容纳入本项目任意版本并以任意许可模式发布的权利(包括但不限于项目当前
LICENSE 文件中定义的 Part A、Part B、Part C 三种许可)
- 将贡献内容用于商业用途的权利

### 2. 原创声明

你声明并保证:

- 你提交的贡献是你的原创作品,或者你拥有授予上述权利的合法权限
- 你的贡献不侵犯任何第三方的知识产权、专利权、商标权或其他权利
- 如果你的贡献包含受雇期间创作的内容,你已获得雇主的书面许可

### 3. 道德权利

在适用法律允许的范围内,你同意不对贡献内容主张道德权利(moral rights),
或同意不以阻碍本项目合理使用的方式行使该等权利。

### 4. 无义务

本项目维护者没有义务接受或合并你的贡献。接受贡献不构成雇佣关系或任何其他法律关系。

### 5. 后续许可变更

你理解并同意,本项目的许可模式可能随版本迭代而变化(如 LICENSE 文件中描述的
版本流转机制),你授予的权利覆盖这些变化。

### 6. 适用法律

本协议受中华人民共和国法律管辖。
Loading