Skip to content

Commit 761f6c6

Browse files
authored
[main] Add missing LICENSE & enforce DCO (#80)
* docs: add missing LICENSE Use the project-global default license of Apache-2.0. Signed-off-by: WANG Xuerui <[email protected]> * ci: add dco-check See: ruyisdk/ruyisdk#27 Signed-off-by: WANG Xuerui <[email protected]> * docs: add contribution guideline Signed-off-by: WANG Xuerui <[email protected]> --------- Signed-off-by: WANG Xuerui <[email protected]>
1 parent e8141c6 commit 761f6c6

File tree

5 files changed

+424
-0
lines changed

5 files changed

+424
-0
lines changed

.github/workflows/pr.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: PR checks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- zh
8+
9+
jobs:
10+
dco:
11+
name: DCO compliance
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Run dco-check
15+
uses: christophebedard/[email protected]
16+
with:
17+
python-version: '3.12'
18+
args: '--verbose'
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CONTRIBUTING.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Contributing to RuyiSDK
2+
3+
Thank you for your interest in contributing to RuyiSDK! This document provides guidelines and explains the requirements for contributions to this project.
4+
5+
Read in other languages:
6+
7+
* [中文](./CONTRIBUTING.zh.md)
8+
9+
## Code of Conduct
10+
11+
Please be respectful and considerate of others when contributing to RuyiSDK. We aim to foster an open and welcoming environment for all contributors.
12+
13+
Please follow [the RuyiSDK Code of Conduct](https://ruyisdk.org/en/code_of_conduct).
14+
15+
## Developer's Certificate of Origin (DCO)
16+
17+
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.
18+
19+
### What is the DCO?
20+
21+
The DCO is a declaration that you make when you sign-off a commit, simple
22+
enough that the original text is fully reproduced below.
23+
24+
```
25+
Developer Certificate of Origin
26+
Version 1.1
27+
28+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
29+
30+
Everyone is permitted to copy and distribute verbatim copies of this
31+
license document, but changing it is not allowed.
32+
33+
34+
Developer's Certificate of Origin 1.1
35+
36+
By making a contribution to this project, I certify that:
37+
38+
(a) The contribution was created in whole or in part by me and I
39+
have the right to submit it under the open source license
40+
indicated in the file; or
41+
42+
(b) The contribution is based upon previous work that, to the best
43+
of my knowledge, is covered under an appropriate open source
44+
license and I have the right under that license to submit that
45+
work with modifications, whether created in whole or in part
46+
by me, under the same open source license (unless I am
47+
permitted to submit under a different license), as indicated
48+
in the file; or
49+
50+
(c) The contribution was provided directly to me by some other
51+
person who certified (a), (b) or (c) and I have not modified
52+
it.
53+
54+
(d) I understand and agree that this project and the contribution
55+
are public and that a record of the contribution (including all
56+
personal information I submit with it, including my sign-off) is
57+
maintained indefinitely and may be redistributed consistent with
58+
this project or the open source license(s) involved.
59+
```
60+
61+
### How to Sign-Off Commits
62+
63+
You need to add a `Signed-off-by` line to each commit message, which certifies that you agree with the DCO:
64+
65+
```
66+
Signed-off-by: Your Name <[email protected]>
67+
```
68+
69+
You can add this automatically by using the `-s` or `--signoff` flag when committing:
70+
71+
```
72+
git commit -s -m "Your commit message"
73+
```
74+
75+
Make sure that the name and email in the signature matches your Git configuration. You can set your Git name and email with:
76+
77+
```
78+
git config --global user.name "Your Name"
79+
git config --global user.email "[email protected]"
80+
```
81+
82+
### DCO enforcement in CI
83+
84+
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.
85+
86+
## Pull Request Process
87+
88+
1. Fork the repository and create your branch from `main`.
89+
2. Make your changes, ensuring they follow the project's coding style and conventions.
90+
3. Add tests if applicable.
91+
4. Ensure your commits are signed-off with the DCO.
92+
5. Update documentation if necessary.
93+
6. Submit a pull request to the main repository.
94+
95+
## Reporting Issues
96+
97+
If you find a bug or have a feature request, please create an issue in [the issue tracker](https://github.com/ruyisdk/docs/issues).
98+
99+
## License
100+
101+
By contributing to RuyiSDK, you agree that your contributions will be licensed under the [Apache 2.0 License](./LICENSE).

CONTRIBUTING.zh.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# 为 RuyiSDK 做贡献
2+
3+
感谢您有兴趣为 RuyiSDK 做贡献!本文档提供了贡献指南,并解释了为本项目做贡献的要求。
4+
5+
阅读本文的其它语言版本:
6+
7+
* [English](./CONTRIBUTING.md)
8+
9+
## 行为准则
10+
11+
在为 RuyiSDK 做贡献时,请尊重并考虑他人。我们旨在为所有贡献者营造一个开放和友好的环境。
12+
13+
请您遵守[《RuyiSDK 社区行为准则》](https://ruyisdk.org/en/code_of_conduct)
14+
15+
## 开发者原创声明(DCO)
16+
17+
我们要求 RuyiSDK 的所有贡献都包含[开发者原创声明(DCO)](https://developercertificate.org/)。DCO 是一种轻量级方式,使贡献者可以证明他们编写或有权提交所贡献的代码。
18+
19+
### 什么是 DCO?
20+
21+
DCO 是您通过签署(sign-off)提交的方式而作出的声明。其全文非常简短,转载如下:
22+
23+
```
24+
Developer Certificate of Origin
25+
Version 1.1
26+
27+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
28+
29+
Everyone is permitted to copy and distribute verbatim copies of this
30+
license document, but changing it is not allowed.
31+
32+
33+
Developer's Certificate of Origin 1.1
34+
35+
By making a contribution to this project, I certify that:
36+
37+
(a) The contribution was created in whole or in part by me and I
38+
have the right to submit it under the open source license
39+
indicated in the file; or
40+
41+
(b) The contribution is based upon previous work that, to the best
42+
of my knowledge, is covered under an appropriate open source
43+
license and I have the right under that license to submit that
44+
work with modifications, whether created in whole or in part
45+
by me, under the same open source license (unless I am
46+
permitted to submit under a different license), as indicated
47+
in the file; or
48+
49+
(c) The contribution was provided directly to me by some other
50+
person who certified (a), (b) or (c) and I have not modified
51+
it.
52+
53+
(d) I understand and agree that this project and the contribution
54+
are public and that a record of the contribution (including all
55+
personal information I submit with it, including my sign-off) is
56+
maintained indefinitely and may be redistributed consistent with
57+
this project or the open source license(s) involved.
58+
```
59+
60+
### 如何签署提交
61+
62+
您需要在每个提交的说明中添加一行 `Signed-off-by`,证明您同意 DCO:
63+
64+
```
65+
Signed-off-by: 您的姓名 <[email protected]>
66+
```
67+
68+
您可以通过在提交时使用 `-s``--signoff` 参数自动添加此行:
69+
70+
```
71+
git commit -s -m "您的提交说明"
72+
```
73+
74+
确保签名中的姓名和电子邮件与您的 Git 配置匹配。您可以使用以下命令设置您的 Git 姓名和电子邮件:
75+
76+
```
77+
git config --global user.name "您的姓名"
78+
git config --global user.email "[email protected]"
79+
```
80+
81+
### CI 中的 DCO 验证
82+
83+
所有拉取请求(PR)都会在我们的持续集成 (CI) 流程中接受自动化 DCO 检查。此检查会验证您的拉取请求中的所有提交是否都有适当的 DCO 签名。如果任何提交缺少签名,CI 检查将失败,在解决问题之前,您的拉取请求将无法被合并。
84+
85+
## 拉取请求流程
86+
87+
1.`main` 分支派生(fork)相应的仓库并创建您的分支。
88+
2. 进行更改,确保它们遵循项目的编码风格和约定。
89+
3. 必要时添加测试。
90+
4. 确保您的提交已包含 DCO 签名。
91+
5. 必要时更新文档。
92+
6. 向主仓库提交拉取请求。
93+
94+
## 报告问题
95+
96+
如果您发现错误或有功能请求,请在[工单系统](https://github.com/ruyisdk/docs/issues)中创建问题。
97+
98+
## 许可证
99+
100+
您同意您对 RuyiSDK 的贡献将遵循 [Apache 2.0 许可证](./LICENSE)

0 commit comments

Comments
 (0)