瀏覽代碼

CONTRIBUTING, git-terminal: explain common contrib issues (#7107)

Sherman Hui 3 年之前
父節點
當前提交
8b531c09bb
共有 3 個文件被更改,包括 17 次插入2 次删除
  1. 11 0
      CONTRIBUTING.md
  2. 6 2
      contributing-guides/git-terminal.md
  3. 二進制
      images/commit-suggestion-button.png

+ 11 - 0
CONTRIBUTING.md

@@ -106,6 +106,9 @@ Some examples of valid locale tags:
 
 A list of translated templates for alias pages can be found in [here](contributing-guides/translation-templates/alias-pages.md).
 
+Pull requests that introduce translations are the exception to the single file change per Pull Request rule. It is
+acceptable for several pages to be translated in one pull request.
+
 ### Default language for newly added pages
 
 The default language used for pages is English (US). Pages written in English are stored in the default `pages` directory (notice the absence of a specific language tag). Although not strictly required, if you'd like to add a new page in a different language, please consider creating the English page too.
@@ -124,6 +127,14 @@ Check out the step-by-step instructions (with screenshots) on
 Alternatively, you can do most of the process
 [using Git on the command-line](contributing-guides/git-terminal.md).
 
+### Accepting suggestions within a pull request
+
+The easiest way to apply suggested changes is to accept the suggestion made on your pull request. Refer to the [GitHub docs](https://docs.github.com/en/enterprise-server@3.2/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request) for more details.
+
+To commit a suggestion to your pull request, simply click on `Commit suggestion`:
+
+![Commit suggestion button in Github](./images/commit-suggestion-button.png)
+
 ### Commit message
 
 For the commit message, use the following format:

+ 6 - 2
contributing-guides/git-terminal.md

@@ -14,6 +14,8 @@ The overall process should look somewhat like this:
 3. Create a feature branch, e.g. named after the command you plan to edit:
   `git checkout -b {{branch_name}}`
 
+  > :warning: It is bad practice to submit a PR from the `main` branch of your forked repository. Please create pull requests from a well named feature branch.
+
 4. Make your changes (edit existing files or create new ones)
 
 5. Commit the changes (following the [commit message guidelines][commit-msg]):
@@ -22,11 +24,13 @@ The overall process should look somewhat like this:
 6. Push the commit(s) to your fork:
   `git push origin {{branch_name}}`
 
+  > :warning: Please avoid force-pushing since it makes the review process harder.
+
 7. Go to the GitHub page for your fork and click the green "Compare & pull request" button.
 
 Please only send related changes in the same pull request.
-Typically a pull request will include changes in a single file.
-(Exceptions are [occasionally acceptable][mass-changes].)
+Typically a pull request will include changes in a single file **unless the pull request is introducing translations**.
+(Exceptions are [occasionally acceptable][mass-changes])
 
 [pr-howto]: ../CONTRIBUTING.md#submitting-a-pull-request
 [commit-msg]: ../CONTRIBUTING.md#commit-message

二進制
images/commit-suggestion-button.png