Skip to content

Commit 953a36a

Browse files
committed
feat(ng-dev): support target: feature in merge tooling (#831)
Support the usage of a target label for feature branches `target: feature`. PR Close #831
1 parent bdeffd7 commit 953a36a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

ng-dev/pr/common/targeting/labels.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,17 @@ export async function getTargetLabelsForActiveReleaseTrains(
137137
return [nextBranchName, releaseCandidate.branchName];
138138
},
139139
},
140+
{
141+
name: TargetLabelName.FEATURE_BRANCH,
142+
branches: (githubTargetBranch) => {
143+
if (isVersionBranch(githubTargetBranch) || githubTargetBranch === nextBranchName) {
144+
throw new InvalidTargetBranchError(
145+
'"target: feature" pull requests cannot target a releasable branch',
146+
);
147+
}
148+
return [githubTargetBranch];
149+
},
150+
},
140151
];
141152

142153
// LTS branches can only be determined if the release configuration is defined, and must be added

ng-dev/pr/common/targeting/target-label.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export enum TargetLabelName {
3333
PATCH = 'target: patch',
3434
RELEASE_CANDIDATE = 'target: rc',
3535
LONG_TERM_SUPPORT = 'target: lts',
36+
FEATURE_BRANCH = 'target: feature',
3637
}
3738

3839
/**

0 commit comments

Comments
 (0)