Skip to content

Commit

Permalink
Merge pull request #3271 from scala-steward-org/topic/rm-vcs-options
Browse files Browse the repository at this point in the history
Remove `--vcs-*` options
  • Loading branch information
fthomas authored Dec 30, 2024
2 parents fa630e3 + e2fe76c commit 7dad28f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
6 changes: 0 additions & 6 deletions docs/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,10 @@ Options and flags:
Whether to signoff commits; default: false
--forge-type <forge-type>
One of azure-repos, bitbucket, bitbucket-server, github, gitlab, gitea; default: github
--vcs-type <forge-type>
deprecated in favor of --forge-type
--forge-api-host <uri>
API URL of the forge; default: https://api.github.com
--vcs-api-host <uri>
deprecated in favor of --forge-api-host
--forge-login <string>
The user name for the forge
--vcs-login <string>
deprecated in favor of --forge-login
--do-not-fork
Whether to not push the update branches to a fork; default: false
--add-labels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,40 +111,18 @@ object Cli {
private val gitCfg: Opts[GitCfg] =
(gitAuthor, gitAskPass, signCommits, signoff).mapN(GitCfg.apply)

private val vcsType =
option[ForgeType](
"vcs-type",
s"deprecated in favor of --${name.forgeType}",
visibility = Visibility.Partial
).validate(s"--vcs-type is deprecated; use --${name.forgeType} instead")(_ => false)

private val forgeType = {
val help = ForgeType.all.map(_.asString).mkString("One of ", ", ", "") +
s"; default: ${GitHub.asString}"
option[ForgeType](name.forgeType, help).orElse(vcsType).withDefault(GitHub)
option[ForgeType](name.forgeType, help).withDefault(GitHub)
}

private val vcsApiHost =
option[Uri](
"vcs-api-host",
s"deprecated in favor of --${name.forgeApiHost}",
visibility = Visibility.Partial
).validate(s"--vcs-api-host is deprecated; use --${name.forgeApiHost} instead")(_ => false)

private val forgeApiHost: Opts[Uri] =
option[Uri](name.forgeApiHost, s"API URL of the forge; default: ${GitHub.publicApiBaseUrl}")
.orElse(vcsApiHost)
.withDefault(GitHub.publicApiBaseUrl)

private val vcsLogin =
option[String](
"vcs-login",
s"deprecated in favor of --${name.forgeLogin}",
visibility = Visibility.Partial
).validate(s"--vcs-login is deprecated; use --${name.forgeLogin} instead")(_ => false)

private val forgeLogin: Opts[String] =
option[String](name.forgeLogin, "The user name for the forge").orElse(vcsLogin)
option[String](name.forgeLogin, "The user name for the forge")

private val doNotFork: Opts[Boolean] =
flag("do-not-fork", "Whether to not push the update branches to a fork; default: false").orFalse
Expand Down

0 comments on commit 7dad28f

Please sign in to comment.