Skip to content

Commit

Permalink
Merge pull request #415 from virtomat/app-name-label
Browse files Browse the repository at this point in the history
fix: pr label longer than 50 characters not allowed on github
  • Loading branch information
jenkins-x-bot authored Jan 2, 2023
2 parents fcd99fc + c74d1c2 commit 17f6759
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/promote/pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ func (o *Options) PromoteViaPullRequest(envs []*jxcore.EnvironmentConfig, releas
source += "-" + envName
labels = append(labels, "env/"+envName)
}
labels = append(labels, "dependency/"+releaseInfo.FullAppName)

var dependencyLabel = "dependency/" + releaseInfo.FullAppName

if len(dependencyLabel) > 49 {
dependencyLabel = dependencyLabel[:49]
}
labels = append(labels, dependencyLabel)

if o.ReusePullRequest && o.PullRequestFilter == nil {
o.PullRequestFilter = &environments.PullRequestFilter{Labels: labels}
Expand Down

0 comments on commit 17f6759

Please sign in to comment.