/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { Context } from "./context.js"; import { type ReleaseVersion, type VersionBumpType, type VersionChangeTypeExtended, type VersionScheme } from "@fluid-tools/version-tools"; import { type ReleaseGroup, type ReleasePackage, type ReleaseSource } from "../releaseGroups.js"; import type { DependencyUpdateType } from "./bump.js"; /** * Creates an appropriate branch for a release group and bump type. Does not commit! * * @param context - The {@link Context}. * @param releaseGroupOrPackage - The release group or independent package to create a branch for. * @param bumpType - The bump type. * @returns The name of the newly created branch. * * @remarks * * Generated branch names are of the form `bump___`. * * @internal */ export declare function createBumpBranch(context: Context, releaseGroupOrPackage: ReleaseGroup | ReleasePackage, bumpType: VersionBumpType): Promise; /** * Generates an appropriate branch name from a release group, bump type, and version. * * @param releaseGroupOrPackage - The release group or independent package to generate a branch name for. * @param bumpType - The bump type. * @param version - The current version of the release group or package. * @param scheme - The version scheme to use. If this is omitted the scheme will be detected using detectVersionScheme. * @returns The generated branch name. * * @remarks * * Generated branch names are of the form `bump___`. * * @internal */ export declare function generateBumpVersionBranchName(releaseGroupOrPackage: ReleaseGroup | ReleasePackage, bumpType: VersionChangeTypeExtended, version: ReleaseVersion, scheme?: VersionScheme): string; /** * Generates an appropriate branch name for bumping dependencies on a release group or package. * * @param bumpedDep - The release group on which dependencies were bumped. * @param bumpType - The bump type. * @param releaseGroup - If set, changes were made to only this release group. * @returns The generated branch name. * * @remarks * * Generated branch names are of the form `bump_deps__`. * * @internal */ export declare function generateBumpDepsBranchName(bumpedDep: ReleaseGroup | ReleasePackage, bumpType: DependencyUpdateType | VersionBumpType, releaseGroup?: ReleaseGroup): string; /** * Generates the correct branch name for the release branch of a given release group and branch. * * @param releaseGroup - The release group or package for which to generate a branch name. * @param version - The version for the release branch. Typically this is a major.minor version, but for release groups * using the Fluid internal or virtualPatch version schemes the versions may differ. * @returns The generated branch name. * * @remarks * * Generated branch names are of the form `release//`. * * @internal */ export declare function generateReleaseBranchName(releaseGroup: ReleaseGroup | ReleasePackage, version: string): string; /** * Generates an appropriate commit message when bumping a release group or package. * * @param releaseGroupOrPackage - The release group or independent package to generate a commit message for. * @param bumpType - The bump type. * @param version - The current version of the release group or package. * @param scheme - The version scheme to use. If this is omitted the scheme will be detected using detectVersionScheme. * @returns The generated commit message. * * @internal */ export declare function generateBumpVersionCommitMessage(releaseGroupOrPackage: ReleaseGroup | ReleasePackage, bumpType: VersionChangeTypeExtended, version: ReleaseVersion, scheme?: VersionScheme): string; /** * Generates an appropriate commit message when bumping the dependencies of release group or package. * * @param bumpedDep - The release group on which dependencies were bumped. * @param bumpType - The bump type. * @param releaseGroup - If set, changes were made to only this release group. * @returns The generated commit message. * * @internal */ export declare function generateBumpDepsCommitMessage(bumpedDep: ReleaseGroup | ReleasePackage | "prerelease", bumpType: DependencyUpdateType | VersionBumpType, releaseGroup?: ReleaseGroup): string; /** * Returns the default bump type for a branch. * * @param branchName - The branch name to check. * @returns The default {@link VersionBumpType} for the branch, or `undefined` if no default is set for the branch. * * @internal */ export declare function getDefaultBumpTypeForBranch(branchName: string, releaseGroup?: ReleaseGroup): VersionBumpType | undefined; /** * Returns the default {@link ReleaseSource} for a given release group or package. * * @internal */ export declare function getReleaseSourceForReleaseGroup(_releaseGroupOrPackage: ReleaseGroup | ReleasePackage): ReleaseSource; //# sourceMappingURL=branches.d.ts.map