Skip to content

Conversation

@srenatus
Copy link
Contributor

This change allows users that build their own executable or "spin" of OPA to give it a name, and have it reference itself properly in help texts.

It's a vanity thing, but I think some people would appreciate it, hat tip to the international association of pedants.

@netlify
Copy link

netlify bot commented Jul 24, 2025

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 481c3e8
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/6881fbbf19e7cc00088f0beb
😎 Deploy Preview https://deploy-preview-7797--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@johanfylling johanfylling left a comment

Choose a reason for hiding this comment

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

LGTM 👍

}

func init() {
func initFmt(root *cobra.Command, _ string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a couple of examples in the long description here that say opa fmt .... Should they use root.Name()?

This change allows users that build their own executable or "spin" of
OPA to give it a name, and have it reference itself properly in help
texts.

It's a vanity thing, but I think some people would appreciate it, hat
tip to the international association of pedants.

Signed-off-by: Stephan Renatus <[email protected]>
Co-authored-by: kevinstyra <[email protected]>
@srenatus srenatus enabled auto-merge (rebase) July 24, 2025 09:24
@srenatus srenatus merged commit 94a9531 into open-policy-agent:main Jul 24, 2025
31 checks passed
@srenatus srenatus deleted the sr/qwxrznxzoupw branch July 24, 2025 09:38
philipaconrad added a commit to philipaconrad/opa that referenced this pull request Jul 31, 2025
This commit fixes an issue when upgrading codebases to OPA v1.7.0.

In PR open-policy-agent#7797, we introduced the ability to provide "branding"
information in OPA commands and help messages, which would
allow easier customized OPA distributions in the future.

However, this changeset removed the public symbol `cmd.RootCommand`,
and required refactoring to use `cmd.Command`, which breaks automated
upgrades, such as those done by Dependabot.

This PR adds back the missing symbol, with the original/default "OPA"
branding provided. This should allow existing codebases to upgrade
without requiring any code changes.

Signed-off-by: Philip Conrad <[email protected]>
philipaconrad added a commit to philipaconrad/opa that referenced this pull request Jul 31, 2025
This commit fixes an issue when upgrading codebases to OPA v1.7.0.

In PR open-policy-agent#7797, we introduced the ability to provide "branding"
information in OPA commands and help messages, which would
allow easier customized OPA distributions in the future.

However, this changeset removed the public symbol `cmd.RootCommand`,
and required refactoring to use `cmd.Command`, which breaks automated
upgrades, such as those done by Dependabot.

This PR adds back the missing symbol, with the original/default "OPA"
branding provided. This should allow existing codebases to upgrade
without requiring any code changes.

Signed-off-by: Philip Conrad <[email protected]>
philipaconrad added a commit that referenced this pull request Jul 31, 2025
This commit fixes an issue when upgrading codebases to OPA v1.7.0.

In PR #7797, we introduced the ability to provide "branding"
information in OPA commands and help messages, which would
allow easier customized OPA distributions in the future.

However, this changeset removed the public symbol `cmd.RootCommand`,
and required refactoring to use `cmd.Command`, which breaks automated
upgrades, such as those done by Dependabot.

This PR adds back the missing symbol, with the original/default "OPA"
branding provided. This should allow existing codebases to upgrade
without requiring any code changes.

Signed-off-by: Philip Conrad <[email protected]>
philipaconrad added a commit that referenced this pull request Jul 31, 2025
This commit fixes an issue when upgrading codebases to OPA v1.7.0.

In PR #7797, we introduced the ability to provide "branding"
information in OPA commands and help messages, which would
allow easier customized OPA distributions in the future.

However, this changeset removed the public symbol `cmd.RootCommand`,
and required refactoring to use `cmd.Command`, which breaks automated
upgrades, such as those done by Dependabot.

This PR adds back the missing symbol, with the original/default "OPA"
branding provided. This should allow existing codebases to upgrade
without requiring any code changes.

Signed-off-by: Philip Conrad <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants