Skip to content

Commit

Permalink
update CONTRIBUTING.md and add CONTRIBUTING-zh.md (#530)
Browse files Browse the repository at this point in the history
* update CONTRIBUTING.md and add CONTRIBUTING-zh.md

* polish up the PR description

* fix some typos
  • Loading branch information
geometryolife authored Jul 21, 2023
1 parent 6378874 commit aa496b5
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 32 deletions.
71 changes: 71 additions & 0 deletions CONTRIBUTING-zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 为 Rooch 做出贡献

感谢您有兴趣为 Rooch 做出贡献!做出贡献的方式有很多种,我们感谢所有这些方式。

- 在我们的 [Discord 频道](https://discord.gg/kgXEmHGB)交流,分享您的新想法,交流技术
- 学习 Rooch
- 报告 Bug
- 请求新特性
- 提交 PR

## 通过 GitHub 来贡献

为 Rooch 源代码或文档做出贡献,您需要拥有一个 GitHub 帐户。

提交 PR 的方式通常有两种:

- 一种是直接在 GitHub 网站上的仓库里进行编辑,提交更改后,直接推送到主分支上。这种方式特别适合提交修改错别字等简单的 PR,对于涉及多个文件或者更改的内容比较多时,不推荐使用这种方式。
- 另一种方式是,将 Rooch 的仓库 `fork` 到您自己的账户下,并将其 `clone` 到本地,完成修改后再将其推送到上游 `main` 分支(指 Rooch 组织),您自己 GitHub 上的分支称为远程分支。

## 方式二的详细操作流程

### 创建一个新分叉

首先,在您自己的帐户中创建 `rooch` 仓库的分支,以便您可以使用自己的副本。

1. 登录您的 Github 帐户。
2. 浏览 GitHub 上的 [Rooch 存储库](https:github.comrooch-networkrooch)
3. 选择右上角的 `Fork`,然后选择 `Create a new fork`
4. 对于**所有者**,选择您的用户名。
5. 对于**存储库名称**,我们建议保留名称 `rooch`,但您可以使用任何名称。
6. 可选。要做出贡献,您只需要存储库的主分支。要包含所有分支,请取消选中**仅复制 `main` 分支**的复选框。
7. 单击 `Create fork`

### 克隆您的分叉

接下来,将存储库的分支克隆到本地工作区。

1. 打开您分叉的仓库页面,然后单击 `Sync fork` 按钮(刚刚分叉通常不需要操作,如果你的分叉仓库提交落后上游仓库时,才需要同步)。
2. 单击 `Code`,然后单击 `HTTPS` 并复制显示的 Web URL。
3. 打开终端会话并导航到要使用的文件夹,然后运行以下命令,将 URL 替换为您从 GitHub 页面复制的 URL:

```shell
git clone https://github.com/<GITHUB-USER-NAME>/rooch.git`
```

### 新建分支

克隆完成后,就可以对 `rooch` 目录内的任意文件进行修改了,默认情况下克隆的是默认分支(可以在 GitHub 设定),通常情况下是 `main` 分支。

对 Rooch 的项目进行相应的修改前,需要进行**最重要的一步**:新建主题分支。

通常情况下,不建议您直接使用 `main` 分支向 Rooch 的上游提交 PR,这不利于 Rooch 的维护者与你进行协作。


## 新建拉取请求

当你完成了修改,将更改提交并推送到远程仓库后,你通常可以在 GitHub 的页面上看到一个 `Compare & pull request` 的弹出按钮,点击并填写相应信息即可。

内容通常会自动填充,如果你觉得标题或者这次 PR 的内容描述不够准确,可以继续修改。

修改完成后,点击下方的 `Create pull request` 按钮后,你的 PR 就会出现在 Rooch 的 `Pull requests` 页面了。

## 提交新问题

报告问题和提交特性请求通常在 `Issues` 页面提交对应的 issue 帖子即可。

**当您要报告 Bug 时**,请打开 [Rooch 的 GitHub Issues 页面](https://github.com/rooch-network/rooch/issues)。在上方的搜索栏,简单搜索一下您的问题,可能您发现的问题可能其他人已经提交过了,避免重复提交。如果没有您想报告的 Bug 帖子,此时请点击右上方的 `New issue` 按钮,输入描述当前 Bug 的简要描述作为标题,并在内容框里填写当前 Bug 的**详细描述**,包括*您的操作(系统)环境**使用的 Rooch 版本*以及*复现问题的流程*等。

**当您要请求一个新特性时**,在当前的 Issues 页面标题栏上填写特性的简介描述作为标题,并在标题前加上 `[Feature Request]` 作为标识。

填写好相关信息后,点击右侧的 `Lables`,打上相应的标签,并点击下方的 `Submit new issue` 按钮。
77 changes: 45 additions & 32 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,72 @@
# Contributing to Rooch

# Contributing
Thank you for your interest in contributing to Rooch! There are many ways to contribute and we appreciate all of them.

Our goal is to make contributing to Rooch Network easy and transparent.
- Communicating in our [Discord channel](https://discord.gg/kgXEmHGB), share your new ideas, talk technologies
- Learning Rooch
- Reporting bugs
- Requesting new features
- Submitting PRs

## Install Rooch to contribute
## Contributing via GitHub

To contribute to Rooch source code or documentation, you need only a GitHub account. You can commit updates and then submit a PR directly from the Github website, or create a fork of the repo to your local environment and use your favorite tools to make changes. Always submit PRs to the `main` branch.
To contribute to the Rooch source code or documentation, you need a GitHub account.

### Create a fork
There are usually two ways to submit a PR:

First, create a fork of the Rooch Network Rooch repo in your own account so that you can work with your own copy.
- One is to edit directly in the repository on the GitHub website, and after submitting the changes, push them directly to the main branch. This method is especially suitable for submitting simple PRs such as correcting typos. It is not recommended to use this method when multiple files are involved or there are many changes.

**To create a fork using the website**
- Another way is to `fork` the Rooch repository under your own account, and `clone` it locally, and then push it to the upstream `main` branch (referring to the Rooch organization) after the modification is completed. The branch on your own GitHub is called a remote branch.

## Detailed operation process of method 2

### Create a new fork

First, create a fork of the `rooch` repository in your own account so that you can use your own copy.

1. Log in to your Github account.
1. Browse to the [Rooch repo](https://github.com/rooch-network/rooch) on GitHub.
1. Choose **Fork** in the top-right, then choose **Create new fork**.
1. For **Owner**, select your username.
1. For **Repository name**, we suggest keeping the name rooch, but you can use any name.
1. Optional. To contribute you need only the main branch of the repo. To include all branches, unselect the checkbox for **Copy the `main` branch only**.
1. Click **Create fork**.
2. Browse the [Rooch repo](https://github.com/rooch-network/rooch) on GitHub.
3. Select `Fork` in the upper right corner, then select `Create a new fork`.
4. For **Owner**, select your username.
5. For the **Repository name**, we recommend keeping the name `rooch`, but you can use any name.
6. Optional. To contribute, you only need the main branch of the repository. To include all branches, uncheck the checkbox for **Copy the `main` branch only**.
7. Click `Create fork`.

### Clone your fork

Next, clone your fork of the repo to your local workspace.
Next, clone the fork of the repository to your local repository.

1. Open the repository page of your fork, and click the `Sync fork` button (no operation is usually required for the fork just now, and synchronization is only required if your forked repository commits lags behind the upstream repository).
2. Click on `Code`, then click on `HTTPS` and copy the displayed web URL.
3. Open a terminal session and navigate to the folder you want to use, then run the following command, replacing the URL with the one you copied from the GitHub page:

**To clone your fork to your local workspace**
1. Open the GitHub page for your fork of the repo, then click **Sync fork**.
1. Click **Code**, then click **HTTPS** and copy the web URL displayed.
1. Open a terminal session and navigate to the folder to use, then run the following command, replacing the URL with the URL you copied from the Git page:
```shell
git clone https://github.com/<GITHUB-USER-NAME>/rooch.git`
```

`git clone https://github.com/github-user-name/rooch.git`
### Create a new branch

The repo is automatically cloned into the `rooch` folder in your workspace.
Create a branch of your fork with following command (or follow the [GitHub topic on branching](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository))
After cloning is completed, you can modify any file in the `rooch` directory. By default, the clone is the default branch (can be set in GitHub), usually the `main` branch.

`git checkout -b your-branch-name`
Before making corresponding changes to Rooch's project, you need to perform **the most important step**: creating a new topic branch.
Use the following command to set the [remote upstream repo](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-repository-for-a-fork):
In general, it is not recommended to submit a PR to Rooch's upstream directly using the `main` branch, which is not conducive to the collaboration of Rooch maintainers with you.

`git remote add upstream https://github.com/rooch-network/rooch.git`
## Create a new pull request

When you're under the rooch dir, you can locally run `./scripts/dev_setup.sh` to ensure you have all development dependencies required for our workflows.

## Issues
When you have completed the modification, submitted and pushed the changes to the remote repository, you can usually see a `Compare & pull request` pop-up button on the GitHub page, just click and fill in the corresponding information.

Rooch Network uses [GitHub issues](https://github.com/rooch-network/rooch/issues) to track bugs. Please include necessary information and instructions to reproduce your issue.
The content is usually filled in automatically. If you feel that the title or the content description of this PR is not accurate enough, you can continue to modify it.

After the modification is complete, click the `Create pull request` button below, and your PR will appear on Rooch's `Pull requests` page.
## Pull Request Requirements
## Submitting new issues
You now have a fork of the Rooch repo set up in your local workspace. You can make changes to the files in the workspace, add commits, then push your changes to your fork of the repo to then create a Pull Request.
Reporting issues and submitting feature requests is usually done by submitting corresponding issue posts on the `Issues` page.
Rooch Network welcomes everyone to participate and contribute, after reading the contribution guidelines, we also invite you to take a look at the requirements for Pull Requests [PR-Guidelines](./docs/contribute/pr-requirements.md).
**When you want to report a bug**, please open [Rooch's GitHub Issues page](https://github.com/rooch-network/rooch/issues). In the search bar above, simply search for your question, maybe the question you found may have been submitted by others, so avoid duplicating submissions.If there is no bug post you want to report, please click the `New issue` button on the upper right, enter a brief description of the current bug as the title, and fill in the **detailed description** of the current bug in the content box, including *your operating (system) environment*, *the version of Rooch used*, and *the process of reproducing the problem*, etc.

## Coding Guidelines for Move Language
**When you want to request a new feature**, fill in the brief description of the feature on the title bar of the current Issues page as the title, and add `[Feature Request]` as the identifier before the title.

Please refer to [Move Coding Conventions](./docs/contribute/coding-conventions.md).
After filling in the relevant information, click on `Lables` on the right, label it accordingly, and click on the `Submit new issue` button below.

0 comments on commit aa496b5

Please sign in to comment.