Skip to content

Commit 7723bfd

Browse files
devversionjosephperrott
authored andcommitted
build: use new labeling and branching in merge script (angular#38428)
We introduced a new shared configuration for merge script labels that follow the proposal of: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU These label semantics and the branching are set up for the Angular framework with this commit. The goal is that labeling and merging is consistent between all Angular projects and that clear rules are defined for branching. This was previously not the case. PR Close angular#38428
1 parent e8ea839 commit 7723bfd

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

.ng-dev/merge.ts

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,25 @@
1-
import {MergeConfig} from '../dev-infra/pr/merge/config';
1+
import {DevInfraMergeConfig} from '../dev-infra/pr/merge/config';
2+
import {getDefaultTargetLabelConfiguration} from '../dev-infra/pr/merge/defaults';
3+
import {github} from './github';
24

35
/**
46
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
57
* are respected by the merge script (e.g. the target labels).
68
*/
7-
export const merge = (): MergeConfig => {
8-
// TODO: resume dynamically determining patch branch
9-
const patch = '10.0.x';
9+
export const merge: DevInfraMergeConfig['merge'] = async api => {
1010
return {
1111
githubApiMerge: false,
1212
claSignedLabel: 'cla: yes',
1313
mergeReadyLabel: /^PR action: merge(-assistance)?/,
1414
caretakerNoteLabel: 'PR action: merge-assistance',
1515
commitMessageFixupLabel: 'commit message fixup',
16-
labels: [
17-
{
18-
pattern: 'PR target: master-only',
19-
branches: ['master'],
20-
},
21-
{
22-
pattern: 'PR target: patch-only',
23-
branches: [patch],
24-
},
25-
{
26-
pattern: 'PR target: master & patch',
27-
branches: ['master', patch],
28-
},
29-
],
16+
labels: await getDefaultTargetLabelConfiguration(api, github, '@angular/core'),
3017
requiredBaseCommits: {
3118
// PRs that target either `master` or the patch branch, need to be rebased
3219
// on top of the latest commit message validation fix.
3320
// These SHAs are the commits that update the required license text in the header.
3421
'master': '5aeb9a4124922d8ac08eb73b8f322905a32b0b3a',
35-
[patch]: '27b95ba64a5d99757f4042073fd1860e20e3ed24'
22+
'10.0.x': '27b95ba64a5d99757f4042073fd1860e20e3ed24'
3623
},
3724
};
3825
};

0 commit comments

Comments
 (0)