You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update docs to reflect new PR targeting methods for release trains (angular#38401)
As part of the migration to a common strategy/method for branching and releasing across
the main angular repositories, updates need to be made to the documentation. These changes
reflect the updates made and is based on the following document which describes the
merging label expectations: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU
PR Closeangular#38401
Copy file name to clipboardExpand all lines: docs/CARETAKER.md
+8-56Lines changed: 8 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,71 +4,23 @@ Caretaker is responsible for merging PRs into the individual branches and intern
4
4
5
5
## Responsibilities
6
6
7
-
- Draining the queue of PRs ready to be merged. (PRs with [`PR action: merge`](https://github.com/angular/angular/pulls?q=is%3Aopen+is%3Apr+label%3A%22PR+action%3A+merge%22) label)
7
+
- Draining the queue of PRs ready to be merged. (PRs with [`action: merge`](https://github.com/angular/angular/pulls?q=is%3Aopen+is%3Apr+label%3A%22action%3A+merge%22) label)
8
8
- Assigning [new issues](https://github.com/angular/angular/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) to individual component authors.
9
9
10
10
## Merging the PR
11
11
12
-
A PR needs to have `PR action: merge` and `PR target: *` labels to be considered
13
-
ready to merge. Merging is performed by running `merge-pr` with a PR number to merge.
12
+
A PR needs to have `action: merge` and `target: *` labels to be considered
13
+
ready to merge. Merging is performed by running `ng-dev pr merge` with a PR number to merge.
14
+
15
+
The tooling automatically verifies the given PR is ready for merge. If the PR passes the tests, the
16
+
tool will automatically merge it based on the applied target label.
14
17
15
18
To merge a PR run:
16
19
17
20
```
18
-
$ ./scripts/github/merge-pr 1234
21
+
$ yarn ng-dev pr merge <pr number>
19
22
```
20
23
21
-
The `merge-pr` script will:
22
-
- Ensure that all appropriate labels are on the PR.
23
-
- Fetches the latest PR code from the `angular/angular` repo.
24
-
- It will `cherry-pick` all of the SHAs from the PR into the current corresponding branches `master` and or `?.?.x` (patch).
25
-
- It will rewrite commit history by automatically adding `Close #1234` and `(#1234)` into the commit message.
26
-
27
-
NOTE: The `merge-pr` will land the PR on `master` and or `?.?.x` (patch) as described by `PR target: *` label.
28
-
29
24
### Recovering from failed `merge-pr` due to conflicts
30
25
31
-
When running `merge-pr` the script will output the commands which it is about to run.
If the `cherry-pick` command fails than resolve conflicts and use `git cherry-pick --continue` once ready. After the `cherry-pick` is done cut&paste and run the `filter-branch` command to properly rewrite the messages
43
-
44
-
## Cherry-picking PRs into patch branch
45
-
46
-
In addition to merging PRs into the master branch, many PRs need to be also merged into a patch branch.
47
-
Follow these steps to get patch branch up to date.
48
-
49
-
1. Check out the most recent patch branch: `git checkout 4.3.x`
50
-
2. Get a list of PRs merged into master: `git log master --oneline -n10`
51
-
3. For each PR number in the commit message run: `./scripts/github/merge-pr 1234`
52
-
- The PR will only merge if the `PR target:` matches the branch.
53
-
54
-
Once all of the PRs are in patch branch, push the all branches and tags to github using `push-upstream` script.
55
-
56
-
57
-
## Pushing merged PRs into github
58
-
59
-
Use `push-upstream` script to push all of the branch and tags to github.
Copy file name to clipboardExpand all lines: docs/COMMITTER.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Change approvals in our monorepo are managed via [PullApprove](https://docs.pull
12
12
# Merging
13
13
14
14
Once a change has all of the required approvals, either the last approver or the PR author (if PR author has the project collaborator status)
15
-
should mark the PR with the `PR action: merge` label and the correct [target label](https://github.com/angular/angular/blob/master/docs/TRIAGE_AND_LABELS.md#pr-target).
15
+
should mark the PR with the `action: merge` label and the correct [target label](https://github.com/angular/angular/blob/master/docs/TRIAGE_AND_LABELS.md#pr-target).
16
16
This signals to the caretaker that the PR should be merged. See [merge instructions](CARETAKER.md).
Copy file name to clipboardExpand all lines: docs/TRIAGE_AND_LABELS.md
+30-16Lines changed: 30 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,28 +125,28 @@ Triaging PRs is the same as triaging issues, except that the labels `frequency:
125
125
126
126
PRs also have additional label categories that should be used to signal their state.
127
127
128
-
Every triaged PR must have a `PR action` label assigned to it:
128
+
Every triaged PR must have a `action: *` label assigned to it:
129
129
130
-
*`PR action: discuss`: Discussion is needed, to be led by the author.
130
+
*`action: discuss`: Discussion is needed, to be led by the author.
131
131
*_**Who adds it:** Typically the PR author._
132
132
*_**Who removes it:** Whoever added it._
133
-
*`PR action: review` (optional): One or more reviews are pending. The label is optional, since the review status can be derived from GitHub's Reviewers interface.
133
+
*`action: review` (optional): One or more reviews are pending. The label is optional, since the review status can be derived from GitHub's Reviewers interface.
134
134
*_**Who adds it:** Any team member. The caretaker can use it to differentiate PRs pending review from merge-ready PRs._
135
135
*_**Who removes it:** Whoever added it or the reviewer adding the last missing review._
136
-
*`PR action: cleanup`: More work is needed from the author.
136
+
*`action: cleanup`: More work is needed from the author.
137
137
*_**Who adds it:** The reviewer requesting changes to the PR._
138
138
*_**Who removes it:** Either the author (after implementing the requested changes) or the reviewer (after confirming the requested changes have been implemented)._
139
-
*`PR action: merge`: The PR author is ready for the changes to be merged by the caretaker as soon as the PR is green (or merge-assistance label is applied and caretaker has deemed it acceptable manually). In other words, this label indicates to "auto submit when ready".
139
+
*`action: merge`: The PR author is ready for the changes to be merged by the caretaker as soon as the PR is green (or merge-assistance label is applied and caretaker has deemed it acceptable manually). In other words, this label indicates to "auto submit when ready".
140
140
*_**Who adds it:** Typically the PR author._
141
141
*_**Who removes it:** Whoever added it._
142
142
143
143
144
144
In addition, PRs can have the following states:
145
145
146
-
*`PR state: WIP`: PR is experimental or rapidly changing. Not ready for review or triage.
146
+
*`state: WIP`: PR is experimental or rapidly changing. Not ready for review or triage.
147
147
*_**Who adds it:** The PR author._
148
148
*_**Who removes it:** Whoever added it._
149
-
*`PR state: blocked`: PR is blocked on an issue or other PR. Not ready for merge.
149
+
*`state: blocked`: PR is blocked on an issue or other PR. Not ready for merge.
150
150
*_**Who adds it:** Any team member._
151
151
*_**Who removes it:** Any team member._
152
152
@@ -162,13 +162,27 @@ This decision is then honored when the PR is being merged by the caretaker.
162
162
163
163
To communicate the target we use the following labels:
164
164
165
-
*`PR target: master & patch`: the PR should me merged into the master branch and cherry-picked into the most recent patch branch. All PRs with fixes, docs and refactorings should use this target.
166
-
*`PR target: master-only`: the PR should be merged only into the `master` branch. All PRs with new features, API changes or high-risk changes should use this target.
167
-
*`PR target: patch-only`: the PR should be merged only into the most recent patch branch (e.g. 5.0.x). This target is useful if a `master & patch` PR can't be cleanly cherry-picked into the stable branch and a new PR is needed.
168
-
*`PR target: LTS-only`: the PR should be merged only into the active LTS branch(es). Only security and critical fixes are allowed in these branches. Always send a new PR targeting just the LTS branch and request review approval from @IgorMinar.
169
-
*`PR target: TBD`: the target is yet to be determined.
165
+
Targeting an active release train:
170
166
171
-
If a PR is missing the `PR target: *` label, or if the label is set to "TBD" when the PR is sent to the caretaker, the caretaker should reject the PR and request the appropriate target label to be applied before the PR is merged.
167
+
*`target: major`: Any breaking change
168
+
*`target: minor`: Any new feature
169
+
*`target: patch`: Bug fixes, refactorings, documentation changes, etc. that pose no or very low risk of adversely
170
+
affecting existing applications.
171
+
172
+
Special Cases:
173
+
*`target: rc`: A critical fix for an active release-train while it is in a feature freeze or RC phase
174
+
*`target: lts`: A criticial fix for a specific release-train that is still within the long term support phase
175
+
176
+
177
+
Notes:
178
+
- To land a change only in a patch/RC branch, without landing it in any other active release-train branch (such
179
+
as `master`), the patch/RC branch can be targeted in the Github UI with the appropriate
180
+
`target: patch`/`target: rc` label.
181
+
-`target: lts` PRs must target the specific LTS branch they would need to merge into in the Github UI, in
182
+
cases which a change is desired in multiple LTS branches, individual PRs for each LTS branch must be created
183
+
184
+
185
+
If a PR is missing the `target:*` label, it will be marked as pending by the angular robot status checks.
172
186
173
187
174
188
## PR Approvals
@@ -182,7 +196,7 @@ In any case, the reviewer should actually look through the code and provide feed
182
196
183
197
Note that approved state does not mean a PR is ready to be merged.
184
198
For example, a reviewer might approve the PR but request a minor tweak that doesn't need further review, e.g., a rebase or small uncontroversial change.
185
-
Only the `PR action: merge` label means that the PR is ready for merging.
199
+
Only the `action: merge` label means that the PR is ready for merging.
186
200
187
201
188
202
## Special Labels
@@ -201,7 +215,7 @@ Only issues with `cla:yes` should be merged into master.
201
215
202
216
Applying this label to a PR makes the angular.io preview available regardless of the author. [More info](../aio/aio-builds-setup/docs/overview--security-model.md)
203
217
204
-
### `PR action: merge-assistance`
218
+
### `action: merge-assistance`
205
219
*_**Who adds it:** Any team member._
206
220
*_**Who removes it:** Any team member._
207
221
@@ -211,7 +225,7 @@ The comment should be formatted like this: `merge-assistance: <explain what kind
211
225
212
226
For example, the PR owner might not be a Googler and needs help to run g3sync; or one of the checks is failing due to external causes and the PR should still be merged.
213
227
214
-
### `PR action: rerun CI at HEAD`
228
+
### `action: rerun CI at HEAD`
215
229
*_**Who adds it:** Any team member._
216
230
*_**Who removes it:** The Angular Bot, once it triggers the CI rerun._
0 commit comments