Skip to content

Commit

Permalink
⚡ Remove outdated info (QD-9448)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Aug 23, 2024
1 parent a633763 commit 6850818
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 38 deletions.
12 changes: 1 addition & 11 deletions cmd/contributors.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,7 @@ func newContributorsCommand() *cobra.Command {
Long: fmt.Sprintf(`
A command-line helper for Qodana pricing[1] to calculate active contributor(s)[2] in the given local repositories.
[1] This pricing is preliminary and subject to change.
Early adopters may receive special offers, which we
will announce prior to the commercial release.
[2] An active contributor is anyone who has made a commit to any
of the projects you’ve registered in Qodana Cloud within the last 90 days,
regardless of when those commits were originally authored. The number of such
contributors will be calculated using both the commit author information
and the timestamp for when their contribution to the project was pushed.
[3] Ultimate Plus plan currently has a discount, more information can be found on %s
[1] More information about available Qodana plans can be found at %s
`, core.PricingUrl),
Run: func(cmd *cobra.Command, args []string) {
if len(options.ProjectDirs) == 0 {
Expand Down
1 change: 1 addition & 0 deletions core/installers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
)

func TestGetIde(t *testing.T) {
t.Skip("Skipping test for now")
//err := os.Setenv("QD_PRODUCT_INTERNAL_FEED", "https://data.services.jetbrains.com/products")
//if err != nil {
// t.Fatal(err)
Expand Down
28 changes: 1 addition & 27 deletions core/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,37 +58,11 @@ func PrintContributorsTable(contributors []contributor, days int, dirs int) {
platform.PrimaryBold(strconv.Itoa(days)),
platform.PrimaryBold(strconv.Itoa(dirs)),
)
fmt.Print(getPlanMessage("Community", 0, count))
fmt.Print(getPlanMessage("Ultimate", 6, count))
fmt.Print(getPlanMessage("Ultimate Plus*", 9, count))
platform.EmptyMessage()
fmt.Printf(
`* Run %s or visit %s for more information.
`* Visit %s for more information.
Note: Qodana will always be free for verified open source projects.`,
platform.PrimaryBold("qodana contributors -h"),
PricingUrl,
)
platform.EmptyMessage()
}

// getPlanMessage returns a message with the cost of the plan.
func getPlanMessage(plan string, cost int, contributors int) string {
var costMessage string
if cost == 0 {
costMessage = fmt.Sprintf(" %s = %d * $0 – Qodana is completely free for %s plan\n",
platform.PrimaryBold("$0"),
contributors,
platform.PrimaryBold(plan),
)
} else {
costMessage = fmt.Sprintf(
" %s = %d * $%d – approximate cost/month for %s plan\n",
platform.PrimaryBold(fmt.Sprintf("$%d", cost*contributors)),
contributors,
cost,
platform.PrimaryBold(plan),
)
}

return costMessage
}

0 comments on commit 6850818

Please sign in to comment.