Update patch PRs with additional content (#10180)

Co-authored-by: Shi Shu <shii@google.com>
This commit is contained in:
shishu314
2025-10-02 16:21:37 -04:00
committed by GitHub
parent 0c6f9d2898
commit f63561dce4
2 changed files with 41 additions and 24 deletions

View File

@@ -50,9 +50,10 @@ async function main() {
const releaseInfo = getLatestReleaseInfo(channel);
const latestTag = releaseInfo.currentTag;
const nextVersion = releaseInfo.nextVersion;
const releaseBranch = `release/${latestTag}-pr-${pullRequestNumber}`;
const hotfixBranch = `hotfix/${latestTag}/${channel}/cherry-pick-${commit.substring(0, 7)}`;
const hotfixBranch = `hotfix/${latestTag}/${nextVersion}/${channel}/cherry-pick-${commit.substring(0, 7)}`;
// Create the release branch from the tag if it doesn't exist.
if (!branchExists(releaseBranch)) {
@@ -190,8 +191,8 @@ async function main() {
console.log(
`Creating pull request from ${hotfixBranch} to ${releaseBranch}...`,
);
let prTitle = `fix(patch): cherry-pick ${commit.substring(0, 7)} to ${releaseBranch}`;
let prBody = `This PR automatically cherry-picks commit ${commit} to patch the ${channel} release.`;
let prTitle = `fix(patch): cherry-pick ${commit.substring(0, 7)} to ${releaseBranch} to patch version ${releaseInfo.currentTag} and create version ${releaseInfo.nextVersion}`;
let prBody = `This PR automatically cherry-picks commit ${commit} to patch version ${releaseInfo.currentTag} in the ${channel} release to create version ${releaseInfo.nextVersion}.`;
if (hasConflicts) {
prTitle = `fix(patch): cherry-pick ${commit.substring(0, 7)} to ${releaseBranch} [CONFLICTS]`;