Skip to content
Snippets Groups Projects
Commit 6d73a9b1 authored by Gururaj Shetty's avatar Gururaj Shetty
Browse files

Merge branch 'Arul-master-patch-07899' into 'master'

Deleted Code of Conduct, Documentation/source/Contributing Process,...

See merge request docs/developer-guide!22
parents e006de81 7cd5da5b
No related branches found
No related tags found
No related merge requests found
# Code of Conduct<a name="EN-US_TOPIC_0000001055368056"></a>
The OpenHarmony community complies with the code of conduct specified in [Contributor Covenant](https://contributor-covenant.org/) of the open source community. For details, see [https://www.contributor-covenant.org/version/1/4/code-of-conduct/](https://www.contributor-covenant.org/version/1/4/code-of-conduct/).
To report insults, harassment, or other unacceptable behavior, you can contact the OpenHarmony technical committee at contact@openharmony.io.
**Our Pledge**
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
**Our Standards**
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
**Our Responsibilities**
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
**Scope**
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
Representation of a project may be further defined and clarified by project maintainers.
**Implementation**
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@openharmony.io.
All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
# Documentation Contribution<a name="EN-US_TOPIC_0000001053069234"></a>
You are welcome to make contributions to documentation. You can offer your feedback and contributions in various ways. You can evaluate available documents, make simple modifications, provide feedback on document quality, and contribute your original content.
Excellent contributors will be awarded and the contributions will be publicized in the developer community.
- [Contribution Method](#section5723203852414)
- [Writing Instructions](writing-instructions.md)
## Content Copyright<a name="section87752266272"></a>
The content and pictures submitted by users must be original content and must not infringe others' intellectual property rights.
OpenHarmony has the right to modify the content that is adopted according to the community regulations and specifications.
## License<a name="section460934180"></a>
[Creative Commons License version 4.0](https://creativecommons.org/licenses/by/4.0/legalcode)
## Contribution Method<a name="section5723203852414"></a>
## Simple Modification<a name="section1433285372417"></a>
You can perform the following steps to modify a document or supplement some content:
1. In the upper right corner of the document page, click **Edit** to go to the source file page in the Gitee project.
2. On the page of the source file in **.md** format, click **Edit** to modify or supplement the file.
3. After the modification, click **Preview** to confirm the modification result.
4. Enter your comments and supplementary information in the **Extended Information** text box and click **Submit**.
The document team will review your modifications and update the file content accordingly. You will be appreciated for your support and contributions for the OpenHarmony documentation.
For more information, see [Contribution Process](contribution-process.md).
## Feedback on Documentation<a name="section133341053162416"></a>
High-quality feedback helps us continuously improve the documents. The more detailed information you provide, the more helpful it is for us to solve problems.
1. On the Gitee page, click the **Issue** tab. On the displayed page, click **New issue**. Then enter the issue title and issue details.
2. Click **New** to submit the issue. The document team will confirm the issue.
>![](public_sys-resources/icon-note.gif) **NOTE:**
>**How can I provide a high-quality issue?**
>- Provide a clear description of the issue, including the missing, outdated, incorrect, or to-be-improved content.
>- Explain the impact of this issue on users.
>- Limit the scope of the given issue to a specific task. If many fields are involved, break the issue down into smaller ones. For example, "Documents need to be optimized" is a broad issue, whereas "XX development guide lacks introduction to step XXX" is specific and operable.
>- Search the list of existing issues to see if any related or similar issues have been submitted.
>- If an issue is associated with another issue or a pull request, you can use its full URL or PR number with the number sign \(\#\) to reference it.
## Content Creation<a name="section12616152517159"></a>
You are encouraged to summarize experience and create technical content during learning and development to help more developers quickly get started. Tutorials and FAQs are recommended. The following templates are for reference:
- [Tutorial: Title \(Task Name\)](tutorial-title-(task-name).md)
- [Title \(Briefly Describe the Key Information of the Issue.\)](title-(briefly-describe-the-key-information-of-the-issue-).md)
The writing templates are archived in the **contribute** folder in the **Docs** repository.
# Communication in Community<a name="EN-US_TOPIC_0000001054608107"></a>
If you encounter any problems when using OpenHarmony, please join the email group for discussion.
## How Do I Subscribe to a Mail List?<a name="en-us_topic_0000001051853133_section103251821112117"></a>
If you have never subscribed to a mail list before, follow the steps below:
1. Click the name of the mail list that you want to subscribe to.
2. Wait until the browser goes to the subscription page of the mail list, which provides instructions on how to subscribe.
3. Read the subscription instructions and provide an email address that you want to use to subscribe to the mail list.
4. Enter your email address and click **Subscribe**. You will receive an email asking you to confirm the subscription.
5. Reply the email to confirm your subscription.
6. At last, you will receive a welcome email from the email list.
**Table 1** Email list
<a name="en-us_topic_0000001051853133_table198701222219"></a>
<table><thead align="left"><tr id="en-us_topic_0000001051853133_row16871202215210"><th class="cellrowborder" valign="top" width="20.757924207579244%" id="mcps1.2.4.1.1"><p id="en-us_topic_0000001051853133_p128719221213"><a name="en-us_topic_0000001051853133_p128719221213"></a><a name="en-us_topic_0000001051853133_p128719221213"></a>Email Address</p>
</th>
<th class="cellrowborder" valign="top" width="11.65883411658834%" id="mcps1.2.4.1.2"><p id="en-us_topic_0000001051853133_p9227211844"><a name="en-us_topic_0000001051853133_p9227211844"></a><a name="en-us_topic_0000001051853133_p9227211844"></a>Introduction</p>
</th>
<th class="cellrowborder" valign="top" width="67.58324167583241%" id="mcps1.2.4.1.3"><p id="en-us_topic_0000001051853133_p28717224216"><a name="en-us_topic_0000001051853133_p28717224216"></a><a name="en-us_topic_0000001051853133_p28717224216"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0000001051853133_row1487115222219"><td class="cellrowborder" valign="top" width="20.757924207579244%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001051853133_p142153615915"><a name="en-us_topic_0000001051853133_p142153615915"></a><a name="en-us_topic_0000001051853133_p142153615915"></a>contact@openharmony.io</p>
</td>
<td class="cellrowborder" valign="top" width="11.65883411658834%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001051853133_p72211218412"><a name="en-us_topic_0000001051853133_p72211218412"></a><a name="en-us_topic_0000001051853133_p72211218412"></a>Public mailbox</p>
</td>
<td class="cellrowborder" valign="top" width="67.58324167583241%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001051853133_p1087114221623"><a name="en-us_topic_0000001051853133_p1087114221623"></a><a name="en-us_topic_0000001051853133_p1087114221623"></a>Public mailbox of the <span id="en-us_topic_0000001051853133_text11580114031511"><a name="en-us_topic_0000001051853133_text11580114031511"></a><a name="en-us_topic_0000001051853133_text11580114031511"></a>OpenHarmony</span> community. You can send emails to this mailbox to sign the Contributor License Agreement (CLA).</p>
</td>
</tr>
<tr id="en-us_topic_0000001051853133_row107737404215"><td class="cellrowborder" valign="top" width="20.757924207579244%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001051853133_p148951611957"><a name="en-us_topic_0000001051853133_p148951611957"></a><a name="en-us_topic_0000001051853133_p148951611957"></a>dev@openharmony.io</p>
</td>
<td class="cellrowborder" valign="top" width="11.65883411658834%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001051853133_p822122113410"><a name="en-us_topic_0000001051853133_p822122113410"></a><a name="en-us_topic_0000001051853133_p822122113410"></a>Development mail list</p>
</td>
<td class="cellrowborder" valign="top" width="67.58324167583241%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001051853133_p16774144174210"><a name="en-us_topic_0000001051853133_p16774144174210"></a><a name="en-us_topic_0000001051853133_p16774144174210"></a><span id="en-us_topic_0000001051853133_text20103211124216"><a name="en-us_topic_0000001051853133_text20103211124216"></a><a name="en-us_topic_0000001051853133_text20103211124216"></a>OpenHarmony</span> community development discussion group. Any topics related to community development can be discussed here. Any one can <a href="https://lists.openatom.io/postorius/lists/dev.openharmony.io" target="_blank" rel="noopener noreferrer">subscribe</a> to it.</p>
</td>
</tr>
<tr id="en-us_topic_0000001051853133_row7871622728"><td class="cellrowborder" valign="top" width="20.757924207579244%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001051853133_p44601613113817"><a name="en-us_topic_0000001051853133_p44601613113817"></a><a name="en-us_topic_0000001051853133_p44601613113817"></a>cicd@openharmony.io</p>
</td>
<td class="cellrowborder" valign="top" width="11.65883411658834%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001051853133_p222202115413"><a name="en-us_topic_0000001051853133_p222202115413"></a><a name="en-us_topic_0000001051853133_p222202115413"></a>CI mail list</p>
</td>
<td class="cellrowborder" valign="top" width="67.58324167583241%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001051853133_p16871822628"><a name="en-us_topic_0000001051853133_p16871822628"></a><a name="en-us_topic_0000001051853133_p16871822628"></a>The <span id="en-us_topic_0000001051853133_text174641244154914"><a name="en-us_topic_0000001051853133_text174641244154914"></a><a name="en-us_topic_0000001051853133_text174641244154914"></a>OpenHarmony</span> community CI/CD builds a mail list that any developer can <a href="https://lists.openatom.io/postorius/lists/cicd.openharmony.io" target="_blank" rel="noopener noreferrer">subscribe</a> to.</p>
</td>
</tr>
<tr id="en-us_topic_0000001051853133_row8715135275716"><td class="cellrowborder" valign="top" width="20.757924207579244%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001051853133_p3716452175711"><a name="en-us_topic_0000001051853133_p3716452175711"></a><a name="en-us_topic_0000001051853133_p3716452175711"></a>pmc@openharmony.io</p>
</td>
<td class="cellrowborder" valign="top" width="11.65883411658834%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001051853133_p112292113412"><a name="en-us_topic_0000001051853133_p112292113412"></a><a name="en-us_topic_0000001051853133_p112292113412"></a>PMC mail list</p>
</td>
<td class="cellrowborder" valign="top" width="67.58324167583241%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001051853133_p1571612525573"><a name="en-us_topic_0000001051853133_p1571612525573"></a><a name="en-us_topic_0000001051853133_p1571612525573"></a>Mail list for PMC discussion. It can be <a href="https://lists.openatom.io/postorius/lists/pmc.openharmony.io/" target="_blank" rel="noopener noreferrer">subscribed</a> to by PMC members.</p>
</td>
</tr>
<tr id="en-us_topic_0000001051853133_row77591655145717"><td class="cellrowborder" valign="top" width="20.757924207579244%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001051853133_p311833519387"><a name="en-us_topic_0000001051853133_p311833519387"></a><a name="en-us_topic_0000001051853133_p311833519387"></a>scy@openharmony.io</p>
</td>
<td class="cellrowborder" valign="top" width="11.65883411658834%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001051853133_p11530134203816"><a name="en-us_topic_0000001051853133_p11530134203816"></a><a name="en-us_topic_0000001051853133_p11530134203816"></a>Mail list for security issues</p>
</td>
<td class="cellrowborder" valign="top" width="67.58324167583241%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001051853133_p20127152355810"><a name="en-us_topic_0000001051853133_p20127152355810"></a><a name="en-us_topic_0000001051853133_p20127152355810"></a>Email address for you to report <span id="en-us_topic_0000001051853133_text162005351389"><a name="en-us_topic_0000001051853133_text162005351389"></a><a name="en-us_topic_0000001051853133_text162005351389"></a>OpenHarmony</span> security issues.</p>
</td>
</tr>
<tr id="en-us_topic_0000001051853133_row1713010314581"><td class="cellrowborder" valign="top" width="20.757924207579244%" headers="mcps1.2.4.1.1 "><p id="en-us_topic_0000001051853133_p311943316586"><a name="en-us_topic_0000001051853133_p311943316586"></a><a name="en-us_topic_0000001051853133_p311943316586"></a>scy-priv@openharmony.io</p>
</td>
<td class="cellrowborder" valign="top" width="11.65883411658834%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001051853133_p10231211144"><a name="en-us_topic_0000001051853133_p10231211144"></a><a name="en-us_topic_0000001051853133_p10231211144"></a>Security group mail list</p>
</td>
<td class="cellrowborder" valign="top" width="67.58324167583241%" headers="mcps1.2.4.1.3 "><p id="en-us_topic_0000001051853133_p17119183319584"><a name="en-us_topic_0000001051853133_p17119183319584"></a><a name="en-us_topic_0000001051853133_p17119183319584"></a>The security group members can <a href="https://lists.openatom.io/postorius/lists/scy-priv.openharmony.io/" target="_blank" rel="noopener noreferrer">subscribe</a> to this email list to discuss security issues.</p>
</td>
</tr>
</tbody>
</table>
## How Do I Send Emails to a Mail List?<a name="en-us_topic_0000001051853133_section09801118222"></a>
To send an email to a specified mail list, send your email to the address listed in the table above.
In this way, all community members in this mail list will receive your email.
# Contribution Process<a name="EN-US_TOPIC_0000001052970939"></a>
- [Preparations](#section124971410183614)
- [Downloading Code](#section6125202333611)
- [Committing Code](#section338918220422)
- [Creating a Pull Request](#section28261522124316)
- [Building Access Control](#section981124754415)
- [Reviewing Code](#section17823849145014)
## Preparations<a name="section124971410183614"></a>
- Install, configure, and use Git. For details, visit [https://gitee.com/help/categories/43](https://gitee.com/help/categories/43).
- Register an SSH public key. For details, visit [https://gitee.com/help/articles/4181](https://gitee.com/help/articles/4181).
- Find the repository that you are interested in on the code hosting platform of OpenHarmony.
## Downloading Code<a name="section6125202333611"></a>
## Forking a Code Branch from the Cloud<a name="section8365811818"></a>
1. Find and open the homepage of the repository.
2. Click the **Fork** button in the upper right corner, and create an individual cloud fork branch as prompted.
## Downloading the Fork Repository to the Local Host<a name="section49051646201819"></a>
Perform the following steps to download the code in the repository to your computer:
1. Create a local working directory.
A local working directory is used for searching and managing local code.
```
mkdir ${your_working_dir}
```
2. Clone the remote repository to the local host.
1. Switch to the local path.
```
mkdir -p ${your_working_dir}
cd ${your_working_dir}
```
2. Clone the remote repository.
- You can copy the address of the remote repository on the repository page.
**Figure 1** <a name="fig1772512534014"></a>
- Run the following command on the local host:
```
git clone $remote_link
```
## Using the repo Tool to Download Code Repositories in Batches<a name="section15763252468"></a>
1. Download the repo tool. \(For details, see [https://gitee.com/help/articles/4316](https://gitee.com/help/articles/4316).\)
```
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo
chmod a+x /usr/local/bin/repo
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple requests
```
2. Download code repositories. \(There is no **repo branch** parameter.\)
```
repo init -u https://gitee.com/openharmony/manifest.git -b master
repo sync -c
```
## Committing Code<a name="section338918220422"></a>
## Committing a Repository \(git clone\)<a name="section669715742719"></a>
1. **Update the branch.**
Update your local branch.
```
git fetch origin
git checkout master
git pull --rebase
```
Update the local debugging branch \(**myfeature** branch\) based on the remote **master** branch.
```
git branch myfeature origin/master
git checkout myfeature
```
Then, edit and modify the code in the **myfeature** branch.
2. **Commit the changes in the local working directory.**
```
git add .
git commit -m "Reason"
```
You may continue to edit and test more content after the previous commit. You can use **commit --amend** to commit these changes.
3. **Push the changes to your remote directory.**
If you plan to review \(or just establish a remote backup of your work\), push the branch to your fork repository:
```
git push -f origin myfeature
```
## Committing Multiple Repositories \(repo init/sync\)<a name="section6560046192910"></a>
1. Configure the token of the global environment.
```
repo config --global repo.token {TOKEN}
```
The token is generated by choosing **Settings** \> **Security Settings** \> **Private Token** on Gitee. Example:
```
repo config --global repo.token 211XXXXXXXXXXXXXXXXXXXXXXXX
```
2. Create an issue under any repository to be modified on Gitee, and record the issue number \(for example, \#I1TVV4 in the following figure\). \(The issue provides a function similar to changeID of Gerrit and is used to associate multiple repositories to be modified. Skip this step if modification of multiple repositories is not involved.\)
3. Create a branch in the local code workspace, modify the code, and commit the changes.
```
repo start branchname --all
```
After the code is modified, run the following command in multiple repositories:
```
git add .
git commit -m "xxxxxx"
```
Alternatively, use the repo tool to batch add or commit the changes in the root directory of the code project:
```
repo forall -c 'git add .'
repo forall -c 'git commit -m "xxxxxx"'
```
4. Push the code. \(repo upload is not supported.\)
Specify whether to directly generate a pull request \(PR\) during code push. The value **False** indicates that a PR is not directly generated and needs to be manually generated in the fork warehouse. The value **True** indicates that a PR is generated when the code is pushed to the fork repository.
```
repo config repo.pullrequest {True/False}
```
For example, if the PR is generated when the push code is selected, run the following command:
```
repo config repo.pullrequest True
```
Run the following command to push the code:
```
repo push --br={BRANCH} --d={DEST_BRANCH} --content={PR_CONTENT}
```
**BRANCH** indicates the local branch, **DEST\_BRANCH** indicates the destination branch \(trunk branch\), which is usually **master**, and **PR\_CONTENT** indicates the PR description. If multi-repository committing is involved, the issue number must be entered. Example:
```
repo push --br="20200903" --d="master" --content="#I1TVV4"
```
On the editing page displayed, open the comment tags for the repository, branch, and commit.
![](figures/无标题2.png)
Save the settings and exit. The repo tool automatically pushes the local branch to the remote fork repository \(creates a fork repository if there is no fork repository\) and generates a PR.
![](figures/无标题3.png)
The tool automatically associates the PR with the issue.
## Creating a Pull Request<a name="section28261522124316"></a>
Access the fork repository on Gitee, click the button for creating a PR, and select the **myfeature** branch to generate a PR. \(Skip this step if a PR has been automatically created using the repo tool.\)
For details, visit [https://gitee.com/help/articles/4128](https://gitee.com/help/articles/4128).
>![](public_sys-resources/icon-notice.gif) **NOTICE:**
>**How do I create PRs at the same time if multiple code repositories have compilation dependencies?**
>During the development of the operating system \(OS\), it is common that multiple code repositories have compilation dependencies. Therefore, the PRs need to be created and merged at the same time. For this reason, Gitee uses issues as the dependency identifiers for code repositories with compilation dependencies to commit the PRs. Follow the operations below:
>1. Create an issue in any of the code repositories.
>2. Associate PRs that need to be built and merged at the same time with the issue. For details, visit [https://gitee.com/help/articles/4142](https://gitee.com/help/articles/4142).
>3. After the build is triggered, the build center identifies the PRs associated with the same issue, downloads the build, and merges the PRs into the code library after the code is approved.
## Building Access Control<a name="section981124754415"></a>
## Creating an Issue<a name="section979820334458"></a>
1. Go to the homepage of the repository.
2. Click the **Issues** tab in the upper left corner. Then, click the issue creation button on the right, and create a dedicated task as prompted to execute continuous integration \(CI\) access control for associated code \(feature development/bug fixing\).
## Associating the Issue with the PR<a name="section5470144853615"></a>
When creating a PR or compiling an existing PR, enter **\#+I+_five-digit issue ID_** in the description box to associate the issue with the PR.
**Constraints**
- One PR can be associated with only one issue. Otherwise, CI cannot be triggered.
- If feature development or bug fixing involves multiple code repositories, multiple PRs can be associated with the same issue.
- Among the PRs associated with the issue, no PR that has been merged or closed is allowed. Otherwise, the CI cannot be triggered.
- If an issue has been associated with a merged or closed PR, the issue cannot be reused. In this case, create another issue and associate it with an open PR.
## Triggering Code Access Control<a name="section11163175420406"></a>
Comment "start build" in the PR to trigger CI access control.
If multiple PRs are associated with the same issue, the comment "start build" on any PR can trigger the CI access control of the issue.
After the access control is executed, the execution result will be automatically commented in all the PRs associated with the issue.
If the access control is passed, all PRs associated with the issue will be automatically marked as "Passed".
## Reviewing Code<a name="section17823849145014"></a>
For details, visit [https://gitee.com/help/articles/4304](https://gitee.com/help/articles/4304).
Related topic: [FAQs](faqs.md)
# Contributing Code<a name="EN-US_TOPIC_0000001055088095"></a>
## Start Contributions<a name="en-us_topic_0000001051566732_section123657169441"></a>
**Code Style**
Develop, review, and test code following the OpenHarmony coding standards. Make sure the code is written in the same style.
- [C++ Coding Style Guide](OpenHarmony-cpp-coding-style-guide.md)
- [C Coding Style Guide](OpenHarmony-c-coding-style-guide.md)
- [JavaScript Coding Style Guide](OpenHarmony-JavaScript-coding-style-guide.md)
- [Python Coding Style Guide](https://pep8.org/)
## Contribution Workflow<a name="en-us_topic_0000001051566732_section15769105812369"></a>
For details, see [Contribution Process](contribution-process.md).
## Security Issue Disclosure<a name="en-us_topic_0000001051566732_section725624119448"></a>
- Security handling procedure
- Security disclosure information
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment