Skip to content

feat(ng-dev): support target: feature in merge tooling #831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ng-dev/pr/common/targeting/labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,17 @@ export async function getTargetLabelsForActiveReleaseTrains(
return [nextBranchName, releaseCandidate.branchName];
},
},
{
name: TargetLabelName.FEATURE_BRANCH,
branches: (githubTargetBranch) => {
if (isVersionBranch(githubTargetBranch) || githubTargetBranch === nextBranchName) {
throw new InvalidTargetBranchError(
'"target: feature" pull requests cannot target a releasable branch',
);
}
return [githubTargetBranch];
},
},
];

// LTS branches can only be determined if the release configuration is defined, and must be added
Expand Down
1 change: 1 addition & 0 deletions ng-dev/pr/common/targeting/target-label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export enum TargetLabelName {
PATCH = 'target: patch',
RELEASE_CANDIDATE = 'target: rc',
LONG_TERM_SUPPORT = 'target: lts',
FEATURE_BRANCH = 'target: feature',
}

/**
Expand Down