File tree 1 file changed +4
-2
lines changed
src/main/kotlin/io/spinnaker/bumpdeps
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ class BumpDeps : CliktCommand() {
35
35
36
36
companion object {
37
37
const val REF_PREFIX = " refs/tags/v"
38
+ const val BRANCH_PREFIX = " origin/"
38
39
const val GITHUB_OAUTH_TOKEN_ENV_NAME = " GITHUB_OAUTH"
39
40
const val MAVEN_REPO_USERNAME_ENV_NAME = " NEXUS_USERNAME"
40
41
const val MAVEN_REPO_PASSWORD_ENV_NAME = " NEXUS_PASSWORD"
@@ -65,8 +66,9 @@ class BumpDeps : CliktCommand() {
65
66
.convert { convertReviewersArg(it) }
66
67
.default(Reviewers (), defaultForHelp = " " )
67
68
68
- private val baseBranch by option(help = " the name of the branch to target in pull requests" )
69
- .default(BASE_BRANCH )
69
+ private val baseBranch by option(help = " the name of the branch to target in pull requests" ).convert { ref ->
70
+ ref.trim().removePrefix(BRANCH_PREFIX )
71
+ }.required()
70
72
71
73
private val oauthToken by lazy {
72
74
System .getenv(GITHUB_OAUTH_TOKEN_ENV_NAME )
You can’t perform that action at this time.
0 commit comments