Skip to content
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

[release-0.20] Update project bumps PR title for release branches #3477

Merged
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
10 changes: 8 additions & 2 deletions tools/version-tracker/pkg/commands/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,16 @@ func Run(upgradeOptions *types.UpgradeOptions) error {
if err != nil {
return fmt.Errorf("pushing updated project version files for [%s] project: %v", projectName, err)
}

// Update the title of the pull request depending on the base branch name.
title := commitMessage
if baseBranchName != constants.MainBranchName {
title = fmt.Sprintf("[%s] %s", baseBranchName, title)
}

// Create a pull request from the bramch in the head repository to the target branch in the aws/eks-anywhere-build-tooling repository.
// Create a pull request from the branch in the head repository to the target branch in the aws/eks-anywhere-build-tooling repository.
logger.Info("Creating pull request with updated files")
err = github.CreatePullRequest(client, projectOrg, projectRepo, commitMessage, pullRequestBody, baseRepoOwner, baseBranchName, headRepoOwner, headBranchName, currentRevision, latestRevision, addPatchWarningComment, patchesWarningComment)
err = github.CreatePullRequest(client, projectOrg, projectRepo, title, pullRequestBody, baseRepoOwner, baseBranchName, headRepoOwner, headBranchName, currentRevision, latestRevision, addPatchWarningComment, patchesWarningComment)
if err != nil {
return fmt.Errorf("creating pull request to %s repository: %v", constants.BuildToolingRepoName, err)
}
Expand Down