Skip to content

Commit be36dc7

Browse files
authored
Merge pull request #40358 from windsonsea/approy
[zh] sync /review/for-approvers.md
2 parents 5ceffac + 70bf31d commit be36dc7

File tree

1 file changed

+145
-32
lines changed

1 file changed

+145
-32
lines changed

content/zh-cn/docs/contribute/review/for-approvers.md

Lines changed: 145 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ weight: 20
1515

1616
<!-- overview -->
1717
<!--
18-
SIG Docs [Reviewers](/docs/contribute/participate/#reviewers) and [Approvers](/docs/contribute/participate/#approvers) do a few extra things when reviewing a change.
18+
SIG Docs [Reviewers](/docs/contribute/participate/#reviewers) and
19+
[Approvers](/docs/contribute/participate/#approvers) do a few extra things
20+
when reviewing a change.
1921
20-
Every week a specific docs approver volunteers to triage
21-
and review pull requests. This
22-
person is the "PR Wrangler" for the week. See the
23-
[PR Wrangler scheduler](https://github.com/kubernetes/website/wiki/PR-Wranglers) for more information. To become a PR Wrangler, attend the weekly SIG Docs meeting and volunteer. Even if you are not on the schedule for the current week, you can still review pull
24-
requests (PRs) that are not already under active review.
22+
Every week a specific docs approver volunteers to triage and review pull requests.
23+
This person is the "PR Wrangler" for the week. See the
24+
[PR Wrangler scheduler](https://github.com/kubernetes/website/wiki/PR-Wranglers)
25+
for more information. To become a PR Wrangler, attend the weekly SIG Docs meeting
26+
and volunteer. Even if you are not on the schedule for the current week, you can
27+
still review pull requests (PRs) that are not already under active review.
2528
2629
In addition to the rotation, a bot assigns reviewers and approvers
2730
for the PR based on the owners for the affected files.
@@ -43,9 +46,12 @@ SIG Docs
4346
<!-- body -->
4447
<!--
4548
## Reviewing a PR
46-
Kubernetes documentation follows the [Kubernetes code review process](https://github.com/kubernetes/community/blob/master/contributors/guide/owners.md#the-code-review-process).
4749
48-
Everything described in [Reviewing a pull request](/docs/contribute/review/reviewing-prs) applies, but Reviewers and Approvers should also do the following:
50+
Kubernetes documentation follows the
51+
[Kubernetes code review process](https://github.com/kubernetes/community/blob/master/contributors/guide/owners.md#the-code-review-process).
52+
53+
Everything described in [Reviewing a pull request](/docs/contribute/review/reviewing-prs)
54+
applies, but Reviewers and Approvers should also do the following:
4955
-->
5056
## 评阅 PR
5157

@@ -55,17 +61,20 @@ Kubernetes 文档遵循 [Kubernetes 代码评阅流程](https://github.com/kuber
5561
不过评阅人和批准人还要做以下工作:
5662

5763
<!--
58-
- Using the `/assign` Prow command to assign a specific reviewer to a PR as needed. This is extra important
59-
when it comes to requesting technical review from code contributors.
64+
- Using the `/assign` Prow command to assign a specific reviewer to a PR as needed.
65+
This is extra important when it comes to requesting technical review from code contributors.
6066
6167
{{< note >}}
6268
Look at the `reviewers` field in the front-matter at the top of a Markdown file to see who can
6369
provide technical review.
6470
{{< /note >}}
6571
66-
- Making sure the PR follows the [Content](/docs/contribute/style/content-guide/) and [Style](/docs/contribute/style/style-guide/) guides; link the author to the relevant part of the guide(s) if it doesn't.
72+
- Making sure the PR follows the [Content](/docs/contribute/style/content-guide/)
73+
and [Style](/docs/contribute/style/style-guide/) guides; link the author to the
74+
relevant part of the guide(s) if it doesn't.
6775
- Using the GitHub **Request Changes** option when applicable to suggest changes to the PR author.
68-
- Changing your review status in GitHub using the `/approve` or `/lgtm` Prow commands, if your suggestions are implemented.
76+
- Changing your review status in GitHub using the `/approve` or `/lgtm` Prow commands,
77+
if your suggestions are implemented.
6978
-->
7079
- 根据需要使用 Prow 命令 `/assign` 指派特定的评阅人。如果某个 PR
7180
需要来自代码贡献者的技术审核时,这一点非常重要。
@@ -108,13 +117,6 @@ true:
108117
- If the PR author pushed their branch directly to the
109118
[https://github.com/kubernetes/website/](https://github.com/kubernetes/website/)
110119
repository. Only a reviewer with push access can commit to another user's PR.
111-
112-
{{< note >}}
113-
Encourage the author to push their branch to their fork before
114-
opening the PR next time.
115-
{{< /note >}}
116-
117-
- The PR author explicitly disallows edits from approvers.
118120
-->
119121
如果处于下列情况之一,你不可以向别人的 PR 提交内容:
120122

@@ -123,9 +125,16 @@ true:
123125
仓库。只有具有推送权限的评阅人才可以向他人的 PR 提交内容。
124126

125127
{{< note >}}
128+
<!--
129+
Encourage the author to push their branch to their fork before
130+
opening the PR next time.
131+
-->
126132
我们应鼓励作者下次将分支推送到自己的克隆副本之后再发起 PR。
127133
{{< /note >}}
128134

135+
<!--
136+
- The PR author explicitly disallows edits from approvers.
137+
-->
129138
- PR 作者明确地禁止批准人编辑他/她的 PR。
130139

131140
<!--
@@ -134,7 +143,9 @@ true:
134143
[Prow](https://github.com/kubernetes/test-infra/blob/master/prow/README.md) is
135144
the Kubernetes-based CI/CD system that runs jobs against pull requests (PRs). Prow
136145
enables chatbot-style commands to handle GitHub actions across the Kubernetes
137-
organization, like [adding and removing labels](#adding-and-removing-issue-labels), closing issues, and assigning an approver. Enter Prow commands as GitHub comments using the `/<command-name>` format.
146+
organization, like [adding and removing labels](#adding-and-removing-issue-labels),
147+
closing issues, and assigning an approver. Enter Prow commands as GitHub comments
148+
using the `/<command-name>` format.
138149
139150
The most common prow commands reviewers and approvers use are:
140151
-->
@@ -177,10 +188,13 @@ Prow 命令 | 角色限制 | 描述
177188

178189
要查看可以在 PR 中使用的命令,请参阅
179190
[Prow 命令指南](https://prow.k8s.io/command-help?repo=kubernetes%2Fwebsite)
191+
180192
<!--
181193
## Triage and categorize issues
182194
183-
In general, SIG Docs follows the [Kubernetes issue triage](https://github.com/kubernetes/community/blob/master/contributors/guide/issue-triage.md) process and uses the same labels.
195+
In general, SIG Docs follows the
196+
[Kubernetes issue triage](https://github.com/kubernetes/community/blob/master/contributors/guide/issue-triage.md)
197+
process and uses the same labels.
184198
185199
This GitHub Issue [filter](https://github.com/kubernetes/website/issues?q=is%3Aissue+is%3Aopen+-label%3Apriority%2Fbacklog+-label%3Apriority%2Fimportant-longterm+-label%3Apriority%2Fimportant-soon+-label%3Atriage%2Fneeds-information+-label%3Atriage%2Fsupport+sort%3Acreated-asc)
186200
finds issues that might need triage.
@@ -197,13 +211,14 @@ finds issues that might need triage.
197211
### Triaging an issue
198212
199213
1. Validate the issue
200-
- Make sure the issue is about website documentation. Some issues can be closed quickly by
201-
answering a question or pointing the reporter to a resource. See the
202-
[Support requests or code bug reports](#support-requests-or-code-bug-reports) section for details.
203-
- Assess whether the issue has merit.
204-
- Add the `triage/needs-information` label if the issue doesn't have enough
205-
detail to be actionable or the template is not filled out adequately.
206-
- Close the issue if it has both the `lifecycle/stale` and `triage/needs-information` labels.
214+
215+
- Make sure the issue is about website documentation. Some issues can be closed quickly by
216+
answering a question or pointing the reporter to a resource. See the
217+
[Support requests or code bug reports](#support-requests-or-code-bug-reports) section for details.
218+
- Assess whether the issue has merit.
219+
- Add the `triage/needs-information` label if the issue doesn't have enough
220+
detail to be actionable or the template is not filled out adequately.
221+
- Close the issue if it has both the `lifecycle/stale` and `triage/needs-information` labels.
207222
-->
208223

209224
### 评判 Issue {#triaging-an-issue}
@@ -222,9 +237,10 @@ finds issues that might need triage.
222237

223238
<!--
224239
2. Add a priority label (the
225-
[Issue Triage Guidelines](https://github.com/kubernetes/community/blob/master/contributors/guide/issue-triage.md#define-priority) define priority labels in detail)
240+
[Issue Triage Guidelines](https://github.com/kubernetes/community/blob/master/contributors/guide/issue-triage.md#define-priority)
241+
define priority labels in detail)
226242
227-
< table caption="Issue labels" >
243+
{{< table caption="Issue labels" >}}
228244
Label | Description
229245
:------------|:------------------
230246
`priority/critical-urgent` | Do this right now.
@@ -234,6 +250,8 @@ finds issues that might need triage.
234250
`priority/awaiting-more-evidence` | Placeholder for a potentially good issue so it doesn't get lost.
235251
`help` or `good first issue` | Suitable for someone with very little Kubernetes or SIG Docs experience. See [Help Wanted and Good First Issue Labels](https://kubernetes.dev/docs/guide/help-wanted/) for more information.
236252
253+
{{< /table >}}
254+
237255
At your discretion, take ownership of an issue and submit a PR for it
238256
(especially if it's quick or relates to work you're already doing).
239257
@@ -290,7 +308,8 @@ To remove a label, leave a comment in one of the following formats:
290308
In both cases, the label must already exist. If you try to add a label that does not exist, the command is
291309
silently ignored.
292310
293-
For a list of all labels, see the [website repository's Labels section](https://github.com/kubernetes/website/labels). Not all labels are used by SIG Docs.
311+
For a list of all labels, see the [website repository's Labels section](https://github.com/kubernetes/website/labels).
312+
Not all labels are used by SIG Docs.
294313
-->
295314
在以上两种情况下,标签都必须合法存在。如果你尝试添加一个尚不存在的标签,
296315
对应的命令会被悄悄忽略。
@@ -356,7 +375,9 @@ SIG Docs 常常会遇到以下类型的 Issue,因此对其处理方式描述
356375
<!--
357376
### Dead link issues
358377
359-
If the dead link issue is in the API or `kubectl` documentation, assign them `/priority critical-urgent` until the problem is fully understood. Assign all other dead link issues `/priority important-longterm`, as they must be manually fixed.
378+
If the dead link issue is in the API or `kubectl` documentation, assign them
379+
`/priority critical-urgent` until the problem is fully understood. Assign all
380+
other dead link issues `/priority important-longterm`, as they must be manually fixed.
360381
361382
### Blog issues
362383
@@ -429,3 +450,95 @@ https://github.com/kubernetes/kubernetes/issues.
429450
430451
If this is a documentation issue, please re-open this issue.
431452
```
453+
454+
<!--
455+
### Squashing
456+
457+
As an approver, when you review pull requests (PRs), there are various cases
458+
where you might do the following:
459+
460+
- Advise the contributor to squash their commits.
461+
- Squash the commits for the contributor.
462+
- Advise the contributor not to squash yet.
463+
- Prevent squashing.
464+
-->
465+
### 压缩(Squashing)提交
466+
467+
作为一名 Approver,当你评审 PR 时,可能会遇到以下几种情况:
468+
469+
- 建议贡献者压缩他们的提交。
470+
- 协助贡献者压缩提交。
471+
- 建议贡献者先不要压缩提交。
472+
- 阻止压缩提交。
473+
474+
<!--
475+
**Advising contributors to squash**: A new contributor might not know that they
476+
should squash commits in their pull requests (PRs). If this is the case, advise
477+
them to do so, provide links to useful information, and offer to arrange help if
478+
they need it. Some useful links:
479+
480+
- [Opening pull requests and squashing your commits](/docs/contribute/new-content/open-a-pr#squashing-commits)
481+
for documentation contributors.
482+
- [GitHub Workflow](https://www.k8s.dev/docs/guide/github-workflow/), including diagrams, for developers.
483+
-->
484+
**建议贡献者压缩提交**:新贡献者可能不知道要压缩 PR 中的提交。
485+
如果是这种情况,Approver 要给出压缩提交的建议,并贴附有用的链接,
486+
并在贡献者需要帮助时伸出援手。这里有一些有用的链接:
487+
488+
- 协助文档贡献者[提 PR 和压缩提交](/zh-cn/docs/contribute/new-content/open-a-pr#squashing-commits)
489+
- 面向开发者包括插图在内的 [GitHub 工作流程](https://www.k8s.dev/docs/guide/github-workflow/)
490+
491+
<!--
492+
**Squashing commits for contributors**: If a contributor might have difficulty
493+
squashing commits or there is time pressure to merge a PR, you can perform the
494+
squash for them:
495+
-->
496+
**协助贡献者压缩提交**:如果贡献者压缩提交遇到难题或合并 PR 的时间紧迫,
497+
你可以协助贡献者执行压缩提交的操作。
498+
499+
<!--
500+
- The kubernetes/website repo is
501+
[configured to allow squashing for pull request merges](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests).
502+
Simply select the *Squash commits* button.
503+
- In the PR, if the contributor enables maintainers to manage the PR, you can
504+
squash their commits and update their fork with the result. Before you squash,
505+
advise them to save and push their latest changes to the PR. After you squash,
506+
advise them to pull the squashed commit to their local clone.
507+
- You can get GitHub to squash the commits by using a label so that Tide / GitHub
508+
performs the squash or by clicking the *Squash commits* button when you merge the PR.
509+
-->
510+
- kubernetes/website
511+
仓库[被配置为允许压缩提交后合并 PR](https://docs.github.com/zh/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests)
512+
你只需选择 **Squash commits** 按钮。
513+
- 在 PR 中,如果贡献者允许 Maintainer 们管理 PR,你就可以为他们压缩提交并将其 fork 更新为最新结果。
514+
在你执行压缩提交之后,请建议贡献者将压缩后的提交拉到他们本地的克隆副本。
515+
- 你可以使用标签让 GitHub 压缩提交,这样 Tide / GitHub 就会对提交执行压缩;
516+
你还可以在合并 PR 时点选 **Squash commits** 按钮。
517+
518+
<!--
519+
**Advise contributors to avoid squashing**
520+
521+
- If one commit does something broken or unwise, and the last commit reverts this
522+
error, don't squash the commits. Even though the "Files changed" tab in the PR
523+
on GitHub and the Netlify preview will both look OK, merging this PR might create
524+
rebase or merge conflicts for other folks. Intervene as you see fit to avoid that
525+
risk to other contributors.
526+
-->
527+
**建议贡献者避免压缩提交**
528+
529+
- 如果一个提交做了一些破坏性或不明智的修改,那最后一个提交可用于回滚错误,这种情况不要压缩提交。
530+
即使通过 GitHub 上 PR 中的 "Files changed" 页签以及 Netlify 预览看起来都正常,
531+
合并这种 PR 可能会在其他 fork 中造成 rebase 或合并冲突。
532+
你看到这种情况要进行合理的干预,避免对其他贡献者造成麻烦。
533+
534+
<!--
535+
**Never squash**
536+
537+
- If you're launching a localization or releasing the docs for a new version,
538+
you are merging in a branch that's not from a user's fork, _never squash the commits_.
539+
Not squashing is essential because you must maintain the commit history for those files.
540+
-->
541+
**千万不要压缩提交**
542+
543+
- 如果你为新版本发起了一次本地化批量作业或为新版发布许多文档,那你要合并到的分支将与用户 fork 的分支不同,
544+
这种情况**千万不要压缩提交**。之所以不压缩提交,是因为你必须保持这些文件的提交历史记录。

0 commit comments

Comments
 (0)