#. 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.)
#. 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.)
#. Create a branch in the local code workspace, modify the code, and commit the changes.
#. Create a branch in the local code workspace, modify the code, and commit the changes.
repo start branchname --all
``repo start branchname --all``
After the code is modified, run the following command in multiple repositories:
After the code is modified, run the following command in multiple repositories:
``git add .``
git add .
``git commit -m "xxxxxx"``
git commit -m "xxxxxx"
Alternatively, use the repo tool to batch add or commit the changes in the root directory of the code project:
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 add .'``
repo forall -c 'git commit -m "xxxxxx"'
#. Push the code. (repo upload is not supported.)
``repo forall -c 'git commit -m "xxxxxx"'``
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}
#. Push the code (repo upload is not supported).
Specify whether to directly generate a pull request (PR) during code push.
For example, if the PR is generated when the push code is selected, run the following command:
The value False indicates that a PR is not directly generated and needs to be manually generated in the fork warehouse.
repo config repo.pullrequest True
The value True indicates that a PR is generated when the code is pushed to the fork repository.
For example, if the PR is generated when the push code is selected, run the following command:
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:
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.
**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:
The tool automatically associates the PR with the issue.
On the editing page displayed, open the comment tags for the repository, branch, and commit.
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.
The tool automatically associates the PR with the issue.
Creating a Pull Request
Creating a Pull Request
***********************
***********************
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.)
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.
For details, visit https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/#how-it-works
.. notice::
.. 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:
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:
#. Create an issue in any of the code repositories.
#. Create an issue in any of the code repositories.
#. 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.
#. Associate PRs that need to be built and merged at the same time with the issue.
#. After the build is triggered, the build center identifies the PRs associated with the same issue, downloads the build,
#. 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.
and merges the PRs into the code library after the code is approved.
...
@@ -175,7 +203,9 @@ If the access control is passed, all PRs associated with the issue will be autom
...
@@ -175,7 +203,9 @@ If the access control is passed, all PRs associated with the issue will be autom
Reviewing Code
Reviewing Code
==============
==============
For details, visit https://gitee.com/help/articles/4304.
For details, visit https://docs.gitlab.com/ee/development/code_review.html#code-review-guidelines