diff --git a/.changes/unreleased/Feature-20231030-150050.yaml b/.changes/unreleased/Feature-20231030-150050.yaml new file mode 100644 index 00000000..89b8e890 --- /dev/null +++ b/.changes/unreleased/Feature-20231030-150050.yaml @@ -0,0 +1,3 @@ +kind: Feature +body: add "parentTeam" field to "import teams" command and team command examples +time: 2023-10-30T15:00:50.727989-05:00 diff --git a/.changes/unreleased/Removed-20231030-150005.yaml b/.changes/unreleased/Removed-20231030-150005.yaml new file mode 100644 index 00000000..e306a2e7 --- /dev/null +++ b/.changes/unreleased/Removed-20231030-150005.yaml @@ -0,0 +1,3 @@ +kind: Removed +body: remove "group" field from "import teams" command +time: 2023-10-30T15:00:05.134799-05:00 diff --git a/src/cmd/team.go b/src/cmd/team.go index b0b5b117..da186891 100644 --- a/src/cmd/team.go +++ b/src/cmd/team.go @@ -20,9 +20,9 @@ var createTeamCmd = &cobra.Command{ Example: `opslevel create team my-team cat << EOF | opslevel create team my-team" -f - -managerEmail: "manager@example.com"" -group: - alias: "my-group" +managerEmail: "manager@example.com" +parentTeam: + alias: "parent-team" responsibilities: "all the things" EOF`, Args: cobra.ExactArgs(1), @@ -120,8 +120,8 @@ var updateTeamCmd = &cobra.Command{ Example: ` cat << EOF | opslevel update team my-team" -f - managerEmail: "manager@example.com"" -group: - alias: "my-group" +parentTeam: + alias: "parent-team-2" responsibilities: "all the things" EOF `, @@ -271,10 +271,10 @@ var importTeamsCmd = &cobra.Command{ Aliases: []string{"teams"}, Short: "Imports teams from a CSV", Long: `Imports a list of teams from a CSV file with the column headers: -Name,Manager,Responsibilities,Group`, +Name,Manager,Responsibilities,ParentTeam`, Example: ` cat << EOF | opslevel import teams -f - -Name,Manager,Responsibilities,Group +Name,Manager,Responsibilities,ParentTeam Platform,kyle@opslevel.com,Makes Tools,engineering Sales,john@opslevel.com,Sells Tools,product EOF @@ -289,9 +289,9 @@ EOF ManagerEmail: reader.Text("Manager"), Responsibilities: reader.Text("Responsibilities"), } - group := reader.Text("Group") - if group != "" { - input.Group = opslevel.NewIdentifier(group) + parentTeam := reader.Text("ParentTeam") + if parentTeam != "" { + input.ParentTeam = opslevel.NewIdentifier(parentTeam) } team, err := getClientGQL().CreateTeam(input) if err != nil {