Skip to content

[main] Add missing LICENSE & enforce DCO #80

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

Merged
merged 3 commits into from
Apr 15, 2025
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
20 changes: 20 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR checks

on:
pull_request:
branches:
- main
- zh

jobs:
dco:
name: DCO compliance
runs-on: ubuntu-latest
steps:
- name: Run dco-check
uses: christophebedard/[email protected]
with:
python-version: '3.12'
args: '--verbose'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101 changes: 101 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Contributing to RuyiSDK

Thank you for your interest in contributing to RuyiSDK! This document provides guidelines and explains the requirements for contributions to this project.

Read in other languages:

* [中文](./CONTRIBUTING.zh.md)

## Code of Conduct

Please be respectful and considerate of others when contributing to RuyiSDK. We aim to foster an open and welcoming environment for all contributors.

Please follow [the RuyiSDK Code of Conduct](https://ruyisdk.org/en/code_of_conduct).

## Developer's Certificate of Origin (DCO)

We require that all contributions to RuyiSDK are covered under the [Developer's Certificate of Origin (DCO)](https://developercertificate.org/). The DCO is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing.

### What is the DCO?

The DCO is a declaration that you make when you sign-off a commit, simple
enough that the original text is fully reproduced below.

```
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```

### How to Sign-Off Commits

You need to add a `Signed-off-by` line to each commit message, which certifies that you agree with the DCO:

```
Signed-off-by: Your Name <[email protected]>
```

You can add this automatically by using the `-s` or `--signoff` flag when committing:

```
git commit -s -m "Your commit message"
```

Make sure that the name and email in the signature matches your Git configuration. You can set your Git name and email with:

```
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
```

### DCO enforcement in CI

All pull requests go through an automated DCO check in our continuous integration (CI) pipeline. This check verifies that all commits in your pull request have a proper DCO sign-off. If any commits are missing the sign-off, the CI check will fail, and your pull request cannot be merged until the issue is fixed.

## Pull Request Process

1. Fork the repository and create your branch from `main`.
2. Make your changes, ensuring they follow the project's coding style and conventions.
3. Add tests if applicable.
4. Ensure your commits are signed-off with the DCO.
5. Update documentation if necessary.
6. Submit a pull request to the main repository.

## Reporting Issues

If you find a bug or have a feature request, please create an issue in [the issue tracker](https://github.com/ruyisdk/docs/issues).

## License

By contributing to RuyiSDK, you agree that your contributions will be licensed under the [Apache 2.0 License](./LICENSE).
100 changes: 100 additions & 0 deletions CONTRIBUTING.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# 为 RuyiSDK 做贡献

感谢您有兴趣为 RuyiSDK 做贡献!本文档提供了贡献指南,并解释了为本项目做贡献的要求。

阅读本文的其它语言版本:

* [English](./CONTRIBUTING.md)

## 行为准则

在为 RuyiSDK 做贡献时,请尊重并考虑他人。我们旨在为所有贡献者营造一个开放和友好的环境。

请您遵守[《RuyiSDK 社区行为准则》](https://ruyisdk.org/en/code_of_conduct)。

## 开发者原创声明(DCO)

我们要求 RuyiSDK 的所有贡献都包含[开发者原创声明(DCO)](https://developercertificate.org/)。DCO 是一种轻量级方式,使贡献者可以证明他们编写或有权提交所贡献的代码。

### 什么是 DCO?

DCO 是您通过签署(sign-off)提交的方式而作出的声明。其全文非常简短,转载如下:

```
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```

### 如何签署提交

您需要在每个提交的说明中添加一行 `Signed-off-by`,证明您同意 DCO:

```
Signed-off-by: 您的姓名 <[email protected]>
```

您可以通过在提交时使用 `-s` 或 `--signoff` 参数自动添加此行:

```
git commit -s -m "您的提交说明"
```

确保签名中的姓名和电子邮件与您的 Git 配置匹配。您可以使用以下命令设置您的 Git 姓名和电子邮件:

```
git config --global user.name "您的姓名"
git config --global user.email "[email protected]"
```

### CI 中的 DCO 验证

所有拉取请求(PR)都会在我们的持续集成 (CI) 流程中接受自动化 DCO 检查。此检查会验证您的拉取请求中的所有提交是否都有适当的 DCO 签名。如果任何提交缺少签名,CI 检查将失败,在解决问题之前,您的拉取请求将无法被合并。

## 拉取请求流程

1. 从 `main` 分支派生(fork)相应的仓库并创建您的分支。
2. 进行更改,确保它们遵循项目的编码风格和约定。
3. 必要时添加测试。
4. 确保您的提交已包含 DCO 签名。
5. 必要时更新文档。
6. 向主仓库提交拉取请求。

## 报告问题

如果您发现错误或有功能请求,请在[工单系统](https://github.com/ruyisdk/docs/issues)中创建问题。

## 许可证

您同意您对 RuyiSDK 的贡献将遵循 [Apache 2.0 许可证](./LICENSE)。
Loading