Repository: cli/cli
Pull request #6219 (2022-09-08 14:38:12)

Bump github.com/google/go-cmp from 0.5.8 to 0.5.9
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.8 to 0.5.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/google/go-cmp/releases">github.com/google/go-cmp's releases</a>.</em></p>
<blockquote>
<h2>v0.5.9</h2>
<p>Reporter changes:</p>
<ul>
<li>(<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/299">#299</a>) Adjust heuristic for line-based versus byte-based diffing</li>
<li>(<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/306">#306</a>) Use <code>value.TypeString</code> in <code>PathStep.String</code></li>
</ul>
<p>Code cleanup changes:</p>
<ul>
<li>(<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/297">#297</a>) Use <code>reflect.Value.IsZero</code></li>
<li>(<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/304">#304</a>) Format with Go 1.19 formatter</li>
<li>(<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/300">#300</a> )Fix typo in Result documentation</li>
<li>(<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/302">#302</a>) Pre-declare global type variables</li>
<li>(<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/309">#309</a>) Run tests on Go 1.19</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/google/go-cmp/commit/a97318bf6562f2ed2632c5f985db51b1bc5bdcd0"><code>a97318b</code></a> Adjust heuristic for line-based versus byte-based diffing (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/299">#299</a>)</li>
<li><a href="https://github.com/google/go-cmp/commit/377d28384c85781079e04aab3937170479da8cd6"><code>377d283</code></a> Run tests on Go 1.19 (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/309">#309</a>)</li>
<li><a href="https://github.com/google/go-cmp/commit/6606d4d51e3239f038565f525940ac6043aff53e"><code>6606d4d</code></a> Use value.TypeString in PathStep.String (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/306">#306</a>)</li>
<li><a href="https://github.com/google/go-cmp/commit/f36a68d19a9bca43e070954ab9170a8305662d15"><code>f36a68d</code></a> Pre-declare global type variables (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/302">#302</a>)</li>
<li><a href="https://github.com/google/go-cmp/commit/5dac6aa44b75666a956f67df1b5bd4e2e044e1f8"><code>5dac6aa</code></a> Fix typo in Result documentation (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/300">#300</a>)</li>
<li><a href="https://github.com/google/go-cmp/commit/14ad8a02f30ba66e7e19f9814e69daab44219cb8"><code>14ad8a0</code></a> Format with Go 1.19 formatter (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/304">#304</a>)</li>
<li><a href="https://github.com/google/go-cmp/commit/a53d7e09b000ee6e0ca9f2676820299b5de8e89f"><code>a53d7e0</code></a> Use reflect.Value.IsZero (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/297">#297</a>)</li>
<li>See full diff in <a href="https://github.com/google/go-cmp/compare/v0.5.8...v0.5.9">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/google/go-cmp&package-manager=go_modules&previous-version=0.5.8&new-version=0.5.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/go.mod b/go.mod
index 9c50a336a..9565d2702 100644
--- a/go.mod
+++ b/go.mod
@@ -14,7 +14,7 @@ require (
 	github.com/cpuguy83/go-md2man/v2 v2.0.2
 	github.com/creack/pty v1.1.18
 	github.com/gabriel-vasile/mimetype v1.4.1
-	github.com/google/go-cmp v0.5.8
+	github.com/google/go-cmp v0.5.9
 	github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
 	github.com/gorilla/websocket v1.4.2
 	github.com/hashicorp/go-multierror v1.1.1
diff --git a/go.sum b/go.sum
index 29f737515..957cda064 100644
--- a/go.sum
+++ b/go.sum
@@ -127,8 +127,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
-github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
 github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
 github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
 github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
diff --git a/pkg/cmd/secret/delete/delete.go b/pkg/cmd/secret/delete/delete.go
index 4759dd1a2..bf1eb5c77 100644
--- a/pkg/cmd/secret/delete/delete.go
+++ b/pkg/cmd/secret/delete/delete.go
@@ -41,7 +41,7 @@ func NewCmdDelete(f *cmdutil.Factory, runF func(*DeleteOptions) error) *cobra.Co
 			Delete a secret on one of the following levels:
 			- repository (default): available to Actions runs or Dependabot in a repository
 			- environment: available to Actions runs for a deployment environment in a repository
-			- organization: available to Actions runs, Dependabot, or Codespaces within an organization
+			- organization: available to Actions runs or Dependabot within an organization
 			- user: available to Codespaces for your user
 		`),
 		Args: cobra.ExactArgs(1),
diff --git a/pkg/cmd/secret/list/list.go b/pkg/cmd/secret/list/list.go
index a7336570c..2a3d5a100 100644
--- a/pkg/cmd/secret/list/list.go
+++ b/pkg/cmd/secret/list/list.go
@@ -46,7 +46,7 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman
 			List secrets on one of the following levels:
 			- repository (default): available to Actions runs or Dependabot in a repository
 			- environment: available to Actions runs for a deployment environment in a repository
-			- organization: available to Actions runs, Dependabot, or Codespaces within an organization
+			- organization: available to Actions runs or Dependabot within an organization
 			- user: available to Codespaces for your user
 		`),
 		Aliases: []string{"ls"},
diff --git a/pkg/cmd/secret/secret.go b/pkg/cmd/secret/secret.go
index ea8d6f40d..8e331e813 100644
--- a/pkg/cmd/secret/secret.go
+++ b/pkg/cmd/secret/secret.go
@@ -15,7 +15,7 @@ func NewCmdSecret(f *cmdutil.Factory) *cobra.Command {
 		Short: "Manage GitHub secrets",
 		Long: heredoc.Doc(`
 			Secrets can be set at the repository, or organization level for use in
-			GitHub Actions or Dependabot. User, organization, and repository secrets can be set for
+			GitHub Actions or Dependabot. User and repository secrets can be set for
 			use in GitHub Codespaces. Environment secrets can be set for use in
 			GitHub Actions. Run "gh help secret set" to learn how to get started.
 `),
diff --git a/pkg/cmd/secret/set/set.go b/pkg/cmd/secret/set/set.go
index d56b3d074..2ba90b888 100644
--- a/pkg/cmd/secret/set/set.go
+++ b/pkg/cmd/secret/set/set.go
@@ -58,7 +58,7 @@ func NewCmdSet(f *cmdutil.Factory, runF func(*SetOptions) error) *cobra.Command
 			Set a value for a secret on one of the following levels:
 			- repository (default): available to Actions runs or Dependabot in a repository
 			- environment: available to Actions runs for a deployment environment in a repository
-			- organization: available to Actions runs, Dependabot, or Codespaces within an organization
+			- organization: available to Actions runs or Dependabot within an organization
 			- user: available to Codespaces for your user
 
 			Organization and user secrets can optionally be restricted to only be available to
diff --git a/pkg/cmd/secret/shared/shared.go b/pkg/cmd/secret/shared/shared.go
index 3b477aeeb..1e812ced3 100644
--- a/pkg/cmd/secret/shared/shared.go
+++ b/pkg/cmd/secret/shared/shared.go
@@ -85,7 +85,7 @@ func IsSupportedSecretEntity(app App, entity SecretEntity) bool {
 	case Actions:
 		return entity == Repository || entity == Organization || entity == Environment
 	case Codespaces:
-		return entity == User || entity == Organization || entity == Repository
+		return entity == User || entity == Repository
 	case Dependabot:
 		return entity == Repository || entity == Organization
 	default:


Test patch:
diff --git a/pkg/cmd/secret/delete/delete_test.go b/pkg/cmd/secret/delete/delete_test.go
index 3e4108703..30030b104 100644
--- a/pkg/cmd/secret/delete/delete_test.go
+++ b/pkg/cmd/secret/delete/delete_test.go
@@ -73,15 +73,6 @@ func TestNewCmdDelete(t *testing.T) {
 				Application: "Dependabot",
 			},
 		},
-		{
-			name: "Codespaces org",
-			cli:  "cool --app codespaces --org UmbrellaCorporation",
-			wants: DeleteOptions{
-				SecretName:  "cool",
-				OrgName:     "UmbrellaCorporation",
-				Application: "Codespaces",
-			},
-		},
 	}
 
 	for _, tt := range tests {
@@ -228,14 +219,6 @@ func Test_removeRun_org(t *testing.T) {
 			},
 			wantPath: "orgs/UmbrellaCorporation/dependabot/secrets/tVirus",
 		},
-		{
-			name: "Codespaces org",
-			opts: &DeleteOptions{
-				Application: "codespaces",
-				OrgName:     "UmbrellaCorporation",
-			},
-			wantPath: "orgs/UmbrellaCorporation/codespaces/secrets/tVirus",
-		},
 	}
 
 	for _, tt := range tests {
diff --git a/pkg/cmd/secret/set/set_test.go b/pkg/cmd/secret/set/set_test.go
index d9313f81f..ee86f1d10 100644
--- a/pkg/cmd/secret/set/set_test.go
+++ b/pkg/cmd/secret/set/set_test.go
@@ -165,18 +165,6 @@ func TestNewCmdSet(t *testing.T) {
 				Application:     "Dependabot",
 			},
 		},
-		{
-			name: "Codespaces org",
-			cli:  `random_secret -ocoolOrg -b"random value" -vselected -r"coolRepo,cli/cli" -aCodespaces`,
-			wants: SetOptions{
-				SecretName:      "random_secret",
-				Visibility:      shared.Selected,
-				RepositoryNames: []string{"coolRepo", "cli/cli"},
-				Body:            "random value",
-				OrgName:         "coolOrg",
-				Application:     "Codespaces",
-			},
-		},
 	}
 
 	for _, tt := range tests {
diff --git a/pkg/cmd/secret/shared/shared_test.go b/pkg/cmd/secret/shared/shared_test.go
index eb121f0a8..4b534522f 100644
--- a/pkg/cmd/secret/shared/shared_test.go
+++ b/pkg/cmd/secret/shared/shared_test.go
@@ -167,9 +167,9 @@ func TestIsSupportedSecretEntity(t *testing.T) {
 			supportedEntities: []SecretEntity{
 				User,
 				Repository,
-				Organization,
 			},
 			unsupportedEntities: []SecretEntity{
+				Organization,
 				Environment,
 				Unknown,
 			},