Skip to content

Commit 5c9fc32

Browse files
committed
docs: update release doc with more merge details
Added some additional details for how the caretaker should merge PRs, including a GitHub search which lists all pending PRs.
1 parent e40be06 commit 5c9fc32

File tree

1 file changed

+30
-11
lines changed

1 file changed

+30
-11
lines changed

docs/process/release.md

+30-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
> Hans Larsen (hansl@google.com)
2-
> June 8th, 2018
3-
4-
51
# Setting Up Local Repository
62

73
1. Clone the Angular-CLI repo. A local copy works just fine.
@@ -20,12 +16,24 @@ Caretaker calendar can be found [here](https://calendar.google.com/calendar?cid=
2016
TBD
2117

2218
## Merging PRs
23-
TBD
19+
20+
The list of PRs which are currently ready to merge (approved with passing status checks) can
21+
be found with [this search](https://github.com/angular/angular-cli/pulls?q=is%3Apr+is%3Aopen+review%3Aapproved+status%3Asuccess).
22+
This list should be checked daily and any ready PRs should be merged. For each
23+
PR, check the `PR target` label to understand where it should be merged to. If
24+
`master` is targetted, then click "Rebase and Merge". If the PR also targets a
25+
patch branch, see [Maintaining Patch Branches](#maintaining-patch-branches).
26+
Whatever the target, rebasing should be used over merging to avoid cluttering
27+
the Git history with merge commits.
2428

2529
### Maintaining Patch Branches
26-
Everytime a PR is merged, commits need to be cherry-picked to an associated branch;
27-
* the latest patch branch (e.g. `1.2.x` or `1.3.x-rc.0`) should also be updated by cherry-picking all _applicable_
28-
commits to it. `fix()`, `docs()`, `refactor()` and
30+
31+
When a PR is merged, if the `PR target` label includes a branch other than
32+
`master`, commits will need to be cherry-picked to an associated branch. In
33+
particular, the `patch` target simply refers to the latest patch branch (eg.
34+
`1.2.x` or `1.3.x-rc.0`). This branch should be updated by cherry-picking all
35+
_applicable_ commits to it, such as those with messages beginning with `fix()`,
36+
`docs()`, or `refactor()`.
2937

3038
Say the following PR is merged;
3139

@@ -54,6 +62,7 @@ git checkout <patch branch>
5462
# Cherry pick the commit. Use the hash from the commit which was merged
5563
# into upstream/master, which should be known to your local repo.
5664
git cherry-pick -x <commit hash from master>
65+
# If you have multiple cherry picks, you can do them all here.
5766

5867
# Resolve merge conflicts if necessary...
5968
# Or abort and ask author to submit a separate commit targeting patch-only.
@@ -62,6 +71,16 @@ git cherry-pick -x <commit hash from master>
6271
git push upstream <patch branch>
6372
```
6473

74+
If you get a `bad revision` error when cherry picking, make sure you are using
75+
the commit hash used when merged into `master`, _not_ the hash listed in the PR.
76+
Also verify that you have fetched `master` from `upstream` since that commit was
77+
merged.
78+
79+
If the commit is not merged to `master` (because it targets `patch only` for
80+
instance), then you will need to fetch the contributor's branch for your local
81+
Git instance to have knowledge of the commit being cherry picked onto the patch
82+
branch.
83+
6584
# Release
6685

6786
## Before releasing
@@ -88,10 +107,10 @@ git push upstream && git push upstream --tags
88107

89108
**It is a good idea to wait for CI to be green on the patch branch and tag before doing the release.**
90109

91-
Check out the patch tag (e.g. `v6.7.8`), then run:
110+
Check out the patch tag (e.g. `v6.7.8`), then run:
92111
```sh
93112
devkit-admin publish
94-
```
113+
```
95114

96115
Check out the minor tag (e.g. `v6.8.0-beta.0`), then run:
97116
```bash
@@ -123,7 +142,7 @@ For example, running the following command will output the release notes on stdo
123142

124143
```bash
125144
devkit-admin changelog --from=v1.2.3 --to=v1.2.4
126-
```
145+
```
127146

128147
Copy paste the output (you can use `| pbcopy` on MacOS or `|xclip` on Linux) and create the release notes on github for the tag just
129148
released. If you have an API token for GitHub you can create a draft automatically by using the `--githubToken` flag.

0 commit comments

Comments
 (0)