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

Great client-side rename #1341

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This workflow compiles your mediator server and medic using a SLSA3 compliant
# This workflow compiles your minder server and client using a SLSA3 compliant
# build and then verifies the provenance of the built artifacts.
# It releases the following architectures: amd64, arm64, and armv7 on Linux,
# Windows, and macOS.
Expand Down
6 changes: 3 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
project_name: medic
project_name: minder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weren't we thinking to rename the command line to be mindctl?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eryn-muetzel -- I thought the CLI was going to be called minder, but 🤷

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I got the minder name from @meganbruce

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought minder was the server

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought minder was the server

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minder is the project. I think the idea was to have the CLI for the project use the name of the project, and we can caller the server minder-server or even a more-cute name if we want. Users will mostly be interacting using the client CLI, so we want that to attach to our brand in their minds.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

before:
hooks:
- go mod tidy
Expand Down Expand Up @@ -41,7 +41,7 @@ archives:
# This section defines how to release to homebrew.
brews:
- homepage: 'https://github.com/stacklok/mediator'
description: 'Medic is the client CLI for interacting with Mediator by Stacklok.'
description: 'minder is the client CLI for interacting with Minder by Stacklok.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mindctl?

folder: Formula
commit_author:
name: stacklokbot
Expand All @@ -51,7 +51,7 @@ brews:
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
test: |
system "#{bin}/medic --help"
system "#{bin}/minder --help"
# This section defines whether we want to release the source code too.
source:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ cli-docs:

build: ## build golang binary
# @go build -ldflags "-X main.version=$(shell git describe --abbrev=0 --tags)" -o bin/$(projectname)
CGO_ENABLED=0 go build -trimpath -o ./bin/medic ./cmd/cli
CGO_ENABLED=0 go build -trimpath -o ./bin/minder ./cmd/cli
CGO_ENABLED=0 go build -trimpath -o ./bin/$(projectname)-server ./cmd/server
CGO_ENABLED=0 go build -trimpath -o ./bin/medev ./cmd/dev

Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package apply provides the apply command for the medic CLI
// Package apply provides the apply command for the minder CLI
package apply

import (
Expand Down Expand Up @@ -65,8 +65,8 @@ func parseContent(data []byte) ([]objectParameters, error) {
// ApplyCmd is the root command for the apply subcommands
var ApplyCmd = &cobra.Command{
Use: "apply (-f FILENAME)",
Short: "Appy a configuration to a mediator control plane",
Long: `The medic apply command applies a configuration to a mediator control plane.`,
Short: "Appy a configuration to a minder control plane",
Long: `The minder apply command applies a configuration to a minder control plane.`,
PreRun: func(cmd *cobra.Command, args []string) {
err := viper.BindPFlags(cmd.Flags())
util.ExitNicelyOnError(err, "Error binding flags")
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/app/artifact/artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
// ArtifactCmd is the artifact subcommand
var ArtifactCmd = &cobra.Command{
Use: "artifact",
Short: "Manage artifacts within a mediator control plane",
Long: `The medic artifact commands allow the management of artifacts within a mediator control plane`,
Short: "Manage artifacts within a minder control plane",
Long: `The minder artifact commands allow the management of artifacts within a minder control plane`,
RunE: func(cmd *cobra.Command, args []string) error {
return cmd.Usage()
},
Expand Down
2 changes: 0 additions & 2 deletions cmd/cli/app/artifact/artifact_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import (
pb "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1"
)

// repo_listCmd represents the list command to list repos with the
// mediator control plane
var artifact_getCmd = &cobra.Command{
Use: "get",
Short: "Get artifact details",
Expand Down
8 changes: 4 additions & 4 deletions cmd/cli/app/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// It does make a good example of how to use the generated client code
// for others to use as a reference.

// Package auth provides the auth command project for the medic CLI.
// Package auth provides the auth command project for the minder CLI.
package auth

import (
Expand All @@ -31,9 +31,9 @@ import (
// AuthCmd represents the account command
var AuthCmd = &cobra.Command{
Use: "auth",
Short: "Authorize and manage accounts within a mediator control plane",
Long: `The medic auth command project lets you create accounts and grant or revoke
authorization to existing accounts within a mediator control plane.`,
Short: "Authorize and manage accounts within a minder control plane",
Long: `The minder auth command project lets you create accounts and grant or revoke
authorization to existing accounts within a minder control plane.`,
RunE: func(cmd *cobra.Command, args []string) error {
return cmd.Usage()
},
Expand Down
8 changes: 4 additions & 4 deletions cmd/cli/app/auth/auth_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ func userRegistered(ctx context.Context, client pb.UserServiceClient) (bool, *pb
// auth_loginCmd represents the login command
var auth_loginCmd = &cobra.Command{
Use: "login",
Short: "Login to a mediator control plane.",
Long: `Login to a mediator control plane. Upon successful login, credentials
will be saved to $XDG_CONFIG_HOME/mediator/credentials.json`,
Short: "Login to a minder control plane.",
Long: `Login to a minder control plane. Upon successful login, credentials
will be saved to $XDG_CONFIG_HOME/minder/credentials.json`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
cli.Print(cmd.ErrOrStderr(), "Error binding flags: %s\n", err)
Expand Down Expand Up @@ -178,7 +178,7 @@ will be saved to $XDG_CONFIG_HOME/mediator/credentials.json`,
cli.PrintCmd(cmd, cli.SuccessBanner.Render(
"You have been successfully registered. Welcome!"))
cli.PrintCmd(cmd, cli.WarningBanner.Render(
"Mediator is currently under active development and considered experimental, "+
"Minder is currently under active development and considered experimental, "+
" we therefore provide no data retention or service stability guarantees.",
))
cli.PrintCmd(cmd, cli.Header.Render("Here are your details:"))
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/app/auth/auth_logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import (
// auth_logoutCmd represents the logout command
var auth_logoutCmd = &cobra.Command{
Use: "logout",
Short: "Logout from mediator control plane.",
Long: `Logout from mediator control plane. Credentials will be removed from $XDG_CONFIG_HOME/mediator/credentials.json`,
Short: "Logout from minder control plane.",
Long: `Logout from minder control plane. Credentials will be removed from $XDG_CONFIG_HOME/minder/credentials.json`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
fmt.Fprintf(os.Stderr, "Error binding flags: %s\n", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/app/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package apply provides the apply command for the medic CLI
// Package apply provides the apply command for the minder CLI
package apply

import (
Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/profile/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
// ProfileCmd is the root command for the profile subcommands
var ProfileCmd = &cobra.Command{
Use: "profile",
Short: "Manage profiles within a mediator control plane",
Long: `The medic profile subcommands allows the management of profiles within
a mediator controlplane.`,
Short: "Manage profiles within a minder control plane",
Long: `The minder profile subcommands allows the management of profiles within
a minder controlplane.`,
RunE: func(cmd *cobra.Command, args []string) error {
return cmd.Usage()
},
Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/profile/profile_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ import (
// Profile_createCmd represents the profile create command
var Profile_createCmd = &cobra.Command{
Use: "create",
Short: "Create a profile within a mediator control plane",
Long: `The medic profile create subcommand lets you create new profiles for a project
within a mediator control plane.`,
Short: "Create a profile within a minder control plane",
Long: `The minder profile create subcommand lets you create new profiles for a project
within a minder control plane.`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
fmt.Fprintf(os.Stderr, "Error binding flags: %s\n", err)
Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/profile/profile_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (

var profile_deleteCmd = &cobra.Command{
Use: "delete",
Short: "Delete a profile within a mediator control plane",
Long: `The medic profile delete subcommand lets you delete profiles within a
mediator control plane.`,
Short: "Delete a profile within a minder control plane",
Long: `The minder profile delete subcommand lets you delete profiles within a
minder control plane.`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
fmt.Fprintf(os.Stderr, "Error binding flags: %s\n", err)
Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/profile/profile_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (

var profile_getCmd = &cobra.Command{
Use: "get",
Short: "Get details for a profile within a mediator control plane",
Long: `The medic profile get subcommand lets you retrieve details for a profile within a
mediator control plane.`,
Short: "Get details for a profile within a minder control plane",
Long: `The minder profile get subcommand lets you retrieve details for a profile within a
minder control plane.`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
fmt.Fprintf(os.Stderr, "Error binding flags: %s\n", err)
Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/profile/profile_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (

var profile_listCmd = &cobra.Command{
Use: "list",
Short: "List profiles within a mediator control plane",
Long: `The medic profile list subcommand lets you list profiles within a
mediator control plane for an specific project.`,
Short: "List profiles within a minder control plane",
Long: `The minder profile list subcommand lets you list profiles within a
minder control plane for an specific project.`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
fmt.Fprintf(os.Stderr, "Error binding flags: %s\n", err)
Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/profile_status/profile_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
// ProfileStatusCmd is the root command for the profile_status subcommands
var ProfileStatusCmd = &cobra.Command{
Use: "profile_status",
Short: "Manage profile status within a mediator control plane",
Long: `The medic profile_status subcommands allows the management of profile status within
a mediator controlplane.`,
Short: "Manage profile status within a minder control plane",
Long: `The minder profile_status subcommands allows the management of profile status within
a minder control plane.`,
RunE: func(cmd *cobra.Command, args []string) error {
return cmd.Usage()
},
Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/profile_status/profile_status_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (

var profilestatus_getCmd = &cobra.Command{
Use: "get",
Short: "Get profile status within a mediator control plane",
Long: `The medic profile_status get subcommand lets you get profile status within a
mediator control plane for an specific provider/project or profile id, entity type and entity id.`,
Short: "Get profile status within a minder control plane",
Long: `The minder profile_status get subcommand lets you get profile status within a
minder control plane for an specific provider/project or profile id, entity type and entity id.`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
fmt.Fprintf(os.Stderr, "Error binding flags: %s\n", err)
Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/profile_status/profile_status_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (

var profilestatus_listCmd = &cobra.Command{
Use: "list",
Short: "List profile status within a mediator control plane",
Long: `The medic profile_status list subcommand lets you list profile status within a
mediator control plane for an specific provider/project or profile id.`,
Short: "List profile status within a minder control plane",
Long: `The minder profile_status list subcommand lets you list profile status within a
minder control plane for an specific provider/project or profile id.`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
fmt.Fprintf(os.Stderr, "Error binding flags: %s\n", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/app/profile_status/table_render.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func guidanceOrEncouragement(status, guidance string) string {
return "No guidance available for this rule 😞"
}

// TODO: use a color scheme for mediator instead of a pre-defined one.
// TODO: use a color scheme for minder instead of a pre-defined one.
// Related-to: https://github.com/stacklok/mediator/issues/1006
renderedGuidance, err := glamour.Render(guidance, "dark")
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/app/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
// ProviderCmd is the root command for the provider subcommands
var ProviderCmd = &cobra.Command{
Use: "provider",
Short: "Manage providers within a mediator control plane",
Long: `The medic provider commands manage providers within a mediator control plane.`,
Short: "Manage providers within a minder control plane",
Long: `The minder provider commands manage providers within a minder control plane.`,
RunE: func(cmd *cobra.Command, args []string) error {
return cmd.Usage()
},
Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/provider/provider_enroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ func callBackServer(ctx context.Context, provider string, project string, port s

var enrollProviderCmd = &cobra.Command{
Use: "enroll",
Short: "Enroll a provider within the mediator control plane",
Long: `The medic provider enroll command allows a user to enroll a provider
such as GitHub into the mediator control plane. Once enrolled, users can perform
Short: "Enroll a provider within the minder control plane",
Long: `The minder provider enroll command allows a user to enroll a provider
such as GitHub into the minder control plane. Once enrolled, users can perform
actions such as adding repositories.`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
// RepoCmd is the root command for the repo subcommands
var RepoCmd = &cobra.Command{
Use: "repo",
Short: "Manage repositories within a mediator control plane",
Long: `The medic repo commands allow the management of repositories within a
mediator control plane.`,
Short: "Manage repositories within a minder control plane",
Long: `The minder repo commands allow the management of repositories within a
minder control plane.`,
RunE: func(cmd *cobra.Command, args []string) error {
return cmd.Usage()
},
Expand Down
6 changes: 2 additions & 4 deletions cmd/cli/app/repo/repo_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ const (
formatDefault = "" // it actually defaults to table
)

// repo_listCmd represents the list command to list repos with the
// mediator control plane
var repo_getCmd = &cobra.Command{
Use: "get",
Short: "Get repository in the mediator control plane",
Long: `Repo get is used to get a repo with the mediator control plane`,
Short: "Get repository in the minder control plane",
Long: `Repo get is used to get a repo with the minder control plane`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
fmt.Fprintf(os.Stderr, "error binding flags: %s", err)
Expand Down
6 changes: 2 additions & 4 deletions cmd/cli/app/repo/repo_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ import (
pb "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1"
)

// repo_listCmd represents the list command to list repos with the
// mediator control plane
var repo_listCmd = &cobra.Command{
Use: "list",
Short: "List repositories in the mediator control plane",
Long: `Repo list is used to register a repo with the mediator control plane`,
Short: "List repositories in the minder control plane",
Long: `Repo list is used to register a repo with the minder control plane`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
fmt.Fprintf(os.Stderr, "error binding flags: %s", err)
Expand Down
8 changes: 4 additions & 4 deletions cmd/cli/app/repo/repo_register.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ var errNoRepositoriesSelected = errors.New("No repositories selected")
var cfgFlagRepos string

// repo_registerCmd represents the register command to register a repo with the
// mediator control plane
// minder control plane
var repo_registerCmd = &cobra.Command{
Use: "register",
Short: "Register a repo with the mediator control plane",
Long: `Repo register is used to register a repo with the mediator control plane`,
Short: "Register a repo with the minder control plane",
Long: `Repo register is used to register a repo with the minder control plane`,
PreRun: func(cmd *cobra.Command, args []string) {
if err := viper.BindPFlags(cmd.Flags()); err != nil {
fmt.Fprintf(os.Stderr, "Error binding flags: %s\n", err)
Expand Down Expand Up @@ -225,7 +225,7 @@ func getSelectedRepositories(repoList []*pb.UpstreamRepositoryRef, flagRepos str
if len(allSelectedRepos) == 0 {
var userSelectedRepos []string
prompt := &survey.MultiSelect{
Message: "Select repositories to register with Mediator: \n",
Message: "Select repositories to register with Minder: \n",
Options: repoNames,
}
// Prompt the user to select repos, defaulting to 20 per page, but scrollable
Expand Down
10 changes: 5 additions & 5 deletions cmd/cli/app/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package app provides the root command for the medic CLI
// Package app provides the root command for the minder CLI
package app

import (
Expand All @@ -30,10 +30,10 @@ var (

// RootCmd represents the base command when called without any subcommands
RootCmd = &cobra.Command{
Use: "medic",
Short: "Medic controls mediator via the control plane",
Long: `For more information about mediator, please visit:
https://docs.stacklok.com/mediator/medic/overview.html`,
Use: "minder",
Short: "Minder controls the hosted minder service",
Long: `For more information about minder, please visit:
https://docs.stacklok.com/minder`,
}
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/cli/app/rule_type/rule_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
// ruleTypeCmd is the root command for the rule subcommands
var ruleTypeCmd = &cobra.Command{
Use: "rule_type",
Short: "Manage rule types within a mediator control plane",
Long: `The medic rule_type subcommands allows the management of rule types within
a mediator controlplane.`,
Short: "Manage rule types within a minder control plane",
Long: `The minder rule_type subcommands allows the management of rule types within
a minder control plane.`,
RunE: func(cmd *cobra.Command, args []string) error {
return cmd.Usage()
},
Expand Down
Loading