Skip to content

Commit

Permalink
Replace accidentally-removed public constants (#2370)
Browse files Browse the repository at this point in the history
These were removed in #2322, which made it an accidentally-semver-breaking
change. This unbreaks semver.

These should be removed at the next major version release or sooner if we decide
keeping semver is not important.

Signed-off-by: Zachary Newman <zjn@chainguard.dev>

Signed-off-by: Zachary Newman <zjn@chainguard.dev>
  • Loading branch information
znewman01 committed Oct 21, 2022
1 parent 429c1bc commit f101deb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/oci/mediatypes.go
Expand Up @@ -21,6 +21,11 @@ import (
"github.com/sigstore/cosign/pkg/cosign/env"
)

const (
// Deprecated: use `pkg/cosign/env/VariableDockerMediaTypes` instead.
DockerMediaTypesEnv = env.VariableDockerMediaTypes
)

func DockerMediaTypes() bool {
if b, err := strconv.ParseBool(env.Getenv(env.VariableDockerMediaTypes)); err == nil {
return b
Expand Down
7 changes: 7 additions & 0 deletions pkg/providers/github/github.go
Expand Up @@ -24,6 +24,13 @@ import (
"github.com/sigstore/cosign/pkg/providers"
)

const (
// Deprecated: use `env.VariableGitHubRequestToken` instead
RequestTokenEnvKey = env.VariableGitHubRequestToken
// Deprecated: use `env.VariableGitHubRequestURL` instead
RequestURLEnvKey = env.VariableGitHubRequestURL
)

func init() {
providers.Register("github-actions", &githubActions{})
}
Expand Down

0 comments on commit f101deb

Please sign in to comment.