From f50f1f750256e74aaf428f8974d7dbecf085f1aa Mon Sep 17 00:00:00 2001 From: David Bloss Date: Mon, 30 Oct 2023 14:56:57 -0500 Subject: [PATCH 1/2] add Parent Teams to add, create, import of teams --- src/cmd/team.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 { From d215da366fab5602de90518b394fb4ffd0992790 Mon Sep 17 00:00:00 2001 From: David Bloss Date: Mon, 30 Oct 2023 15:02:38 -0500 Subject: [PATCH 2/2] add changie logs --- .changes/unreleased/Feature-20231030-150050.yaml | 3 +++ .changes/unreleased/Removed-20231030-150005.yaml | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 .changes/unreleased/Feature-20231030-150050.yaml create mode 100644 .changes/unreleased/Removed-20231030-150005.yaml 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