Caretaker is responsible for merging PRs into the individual branches and internally at Google.
PR action: mergelabel)
A PR needs to have
PR action: merge and
PR target: * labels to be considered ready to merge. Merging is performed by running
merge-pr with a PR number to merge.
To merge a PR run:
$ ./scripts/github/merge-pr 1234
merge-pr script will: - Ensure that all appropriate labels are on the PR. - Fetches the latest PR code from the
angular/angular repo. - It will
cherry-pick all of the SHAs from the PR into the current corresponding branches
master and or
?.?.x (patch). - It will rewrite commit history by automatically adding
Close #1234 and
(#1234) into the commit message.
merge-pr will land the PR on
master and or
?.?.x (patch) as described by
PR target: * label.
merge-prdue to conflicts
merge-pr the script will output the commands which it is about to run.
$ ./scripts/github/merge-pr 1234 ====================== GitHub Merge PR Steps ====================== git cherry-pick angular/pr/1234~1..angular/pr/1234 git filter-branch -f --msg-filter "/home/misko/angular/scripts/github/utils/github.closes 1234" HEAD~1..HEAD
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
In addition to merging PRs into the master branch, many PRs need to be also merged into a patch branch. Follow these steps to get patch branch up to date.
git checkout 4.3.x
git log master --oneline -n10
PR target:matches the branch.
Once all of the PRs are in patch branch, push the all branches and tags to github using
push-upstream script to push all of the branch and tags to github.
$ ./scripts/github/push-upstream git push firstname.lastname@example.org:angular/angular.git master:master 4.3.x:4.3.x Counting objects: 25, done. Delta compression using up to 6 threads. Compressing objects: 100% (17/17), done. Writing objects: 100% (25/25), 2.22 KiB | 284.00 KiB/s, done. Total 25 (delta 22), reused 8 (delta 7) remote: Resolving deltas: 100% (22/22), completed with 18 local objects. To github.com:angular/angular.git 079d884b6..d1c4a94bb master -> master git push --tags -f email@example.com:angular/angular.git patch_sync:patch_sync Everything up-to-date